bean reload after deletion of a row
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, June 6, 2002 02:35 AM

hiho, my problem is: i`' ve coded a tool that allows to create update and delete tables of an oracle database. i am also using jboss2.4.5 and javabeans (CMP) if i delete a row from a table (directly in the database and not over the beans), then - of course - the row is deleted in the table but not in the bean. if i now try to insert the row again (over the javabeans), then i get the following exception: -------------------------------------------------------------------- java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: INSERTING AN ALREADY EXISTING BEAN, ID = 3   More>>


hiho,

my problem is:

i`' ve coded a tool that allows to create update and delete tables of an oracle database.

i am also using jboss2.4.5 and javabeans (CMP)

if i delete a row from a table (directly in the database and not over the beans), then - of course - the row is deleted in the table but not in the bean.

if i now try to insert the row again (over the javabeans), then i get the following exception:

--------------------------------------------------------------------

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
javax.transaction.TransactionRolledbackException:

INSERTING AN ALREADY EXISTING BEAN, ID = 3; nested exception is:

java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = 3

javax.transaction.TransactionRolledbackException:

INSERTING AN ALREADY EXISTING BEAN, ID = 3; nested exception is:

java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = 3

java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = 3

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)


at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)


at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)


at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)


at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:258)


at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)


at $Proxy0.create(Unknown Source)


at net.infosim.stablenet.svc.impl.core.entity.testFrame$21.mouseClicked(testFrame.java:2185)


at java.awt.Component.processMouseEvent(Component.java:3718)


at java.awt.Component.processEvent(Component.java:3544)


at java.awt.Button.processEvent(Button.java:305)


at java.awt.Component.dispatchEventImpl(Component.java:2593)


at java.awt.Component.dispatchEvent(Component.java:2497)


at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)


at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)


at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)


at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

--------------------------------------------------------------------

i know that i have to reload the beans.

but i am not really sure about how to do this.

add anything in the deployment descriptor?

any other suggestions?

thx for your help,


locutus

   <<Less

Re: bean reload after deletion of a row

Posted By:   Parag_Bharambe  
Posted On:   Monday, June 10, 2002 04:54 AM

Hi,
Have to commited after deleting the record?
I think this error is not caused by oracle, otherwise it should be java.sql.SQlException and then oracle code.
Parag
About | Sitemap | Contact