• 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

Help required(Exceptions)

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to catch it in your client program then.
reply
    Bookmark Topic Watch Topic
  • New Topic