• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing persist method in SLSB from my SFSB

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have an issue with an order i try to persist. I use Hibernate 4 with JPA and Jboss 7.1. I have a shopping cart which is a SFSB :


In the executeSale method I'm using methods from my SLSB DAO (I'm only going to display the first one which is where it fails since it's first) :




The error occurs line "entityManager.persist(transientInstance);" with a NPE. See the full stacktrace here. I checked on debug and my Commande object isn't null, so I guess it's coming from my Persistence Context, but I don't know what the problem is exactly. Any help is appreciated. Thanks.


EDIT : Nevermind, just forgot some annotations like another @EJB and @PersistenceContext...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic