The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Visual Age for java version 4.0, EJB,remove from DB

Posted by Espen Lysvik on February 12, 2002 at 6:35 AM

I am trying to delete a row in a DB2 table. Have mapped the Entity beans against the DB tables, and made several SessionBeans.
It seems that version 3.5 and 4.0 are working different concerning removing entries from the DB tables?
In my SessionBean I have the following.
public void removeKonsulent(short ansnr) throws Exception {

{java.util.Hashtable p = new java.util.Hashtable();
p.put"java.naming.factory.initial", "");
InitialContext ctx = new InitialContext(p);
//get homeinterface
Object o = ctx.lookup("com_capgemini_no_heh_ejbentity_Konsulent");
KonsulentHome konshome = (KonsulentHome)javax.rmi.PortableRemoteObject.narrow(o, Class.forName(""));
//Remove a Konsulent
Konsulent kons = konshome.findByPrimaryKey(new KonsulentKey(ansnr));
} catch(Exception ex){
throw new Exception(ex.getMessage());


And I get this errormessage: ; nested exception is: java.lang.Exception: CORBA TRANSACTION_ROLLEDBACK 0 No; nested exception is: org.omg.CORBA.TRANSACTION_ROLLEDBACK: java.lang.Throwable() java.lang.Exception() java.rmi.RemoteException() void ++++++++++

Regards Espen Lysvik


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us