This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Accessing persist method in SLSB from my SFSB Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Accessing persist method in SLSB from my SFSB" Watch "Accessing persist method in SLSB from my SFSB" New topic
Author

Accessing persist method in SLSB from my SFSB

Julien Marchal
Greenhorn

Joined: Jul 14, 2012
Posts: 8
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...
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Accessing persist method in SLSB from my SFSB
 
Similar Threads
Hibernate Tool custom template
Set not initialised on lazy loading
hibernate update in single transcation
java.lang.NoClassDefFoundError: org/hibernate/criterion/Criterion
jboss-ejb-Stateless?