[jboss-user] [EJB 3.0] - Re: NamingException: Could not dereference object - EJB 3.0

htran_888 do-not-reply at jboss.com
Wed Feb 21 19:35:28 EST 2007


I managed to overcome this issue by carrying out the the following changes which worked on Sun System Java Application Server PE 9.0 only:

( i ) Re-create a single titan ejb project to include all 3 session beans (TravelAgent, TransactionPersistenceContext, ExtendedPersistenceContext) & 1 entity class (Cabin) in one titan.jar file. More importantly, have all classes pointing to 1 persistence unit (titan).

The persistence.xml file was the root to my problem.

( ii ) Re-create Client with these syntax:

ref = jndiContext.lookup("travelagent.TransactionPersistenceContextRemote");
  | ref = jndiContext.lookup("travelagent.ExtendedPersistenceContextRemote");
As a result, the Client output from Netbeans is:

no cabin should be null: null
Master Suite
Updating detached cabin instance with new bed count of 4
Finding cabin to see it has been updated with a merge() on server
new bed count is: 4
Set up transaction persistence context stateful bean
Cabin bed count will still be 4: 4
Set up extended persistence context stateful bean
Cabin bed count will be 5: 5

However, I still could not find a solution when running in JBoss AS 4.0.5.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020344#4020344

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020344

More information about the jboss-user mailing list