• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejbStore problem  RSS feed

 
happyjava2001
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I use ejbCreate to insert a row to database,
I meet a wrong message:
----------------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync = weblogic.ejb20.internal.TxManager$TxListener@33551e
Error writing from beforeCompletion - with nested exception:
[weblogic.utils.NestedRuntimeException: Error writing from beforeCompletion - with nested exception:
[java.rmi.NoSuchObjectException: Exception from ejbStore:javax.ejb.NoSuchEntityException: Row does not exist]]
<<no stack trace available>>
------------------------------------------
I found it beacause the program go to the ejbStore() method which will update row in database.it seems it cannot find any row when update a row,why this happened? will the ejbCreate() use the ejbStore()???

any suggestion will be helpful.
thanks.
 
Afshir Irani
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that the container calls the ejbStore after the call to ejbCreate is completed. You will have to set the state of your bean in your ejbCreate. Your variables in the Entity Bean have not been set, so the ejbStore is failing.
Not sure if the call to ejbStore after ejbCreate is in the EJB Specifications or it is an implementation of the container.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!