Relation EJB Entity CMP
aebourki Sep 29, 2005 1:03 PM
hello,
For the management of the realtions between ejb entity CMP it's necessary to use interfaces ejbLocalHome and ejbLocal?
I have only to specify the realtions in the file ejb-jar.xml but i have error :
[java] javax.ejb.CreateException: Could not create entity:java.sql.SQLException: Duplicate key or integrity constraint violation message from server: "Cannot add or update a child row: a foreign key constraint fails"
[java] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:305)
[java] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
[java] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
[java] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
[java] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
[java] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:766)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
[java] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
[java] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
[java] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
[java] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
[java] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
[java] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:117)
[java] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
[java] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
[java] at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
[java] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
[java] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
[java] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
[java] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:99)
[java] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
[java] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
[java] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
[java] at org.jboss.ejb.Container.invoke(Container.java:891)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
[java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
[java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
[java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
[java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
[java] at java.lang.Thread.run(Thread.java:534)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
[java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
[java] at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
[java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
[java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
[java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
[java] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
[java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
[java] at $Proxy0.create(Unknown Source)
[java] at com.cadeauxavenue.argaze.clients.TestWishlistEJB.main(TestWishlistEJB.java:32)