Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help required(Exceptions)

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have entity bean with container managed relationship.
when i try to insert duplicate primary key the entity bean throws exception as expected.
At client side i get remote exception as "java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback."

In log file exception is "Some remote or transactional roll back exception occurred com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
insert into "STUDENTBEAN"("FIRSTNAME", "LASTNAME", "STUDENTID") values ( ?, ?, ?)"

I am using the facade pattern to control my entity ejb's, via local interfaces only.

in session bean i am inserting row in student table as follows.


I want to get DuplicateKeyException at client side but i am getting java.rmi.RemoteException

Please help me to get DuplicateKeyException at client side.

Thanks
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to catch it in your client program then.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic