|
Hi,
I'm trying to populate the jboss default DB
(Hypersonic)
using CMR but
it doesn't work (I use JBoss 3.0):
I have 2 entity bean (Person and Element) which
have
a relationship 'one-to-many'
unidirectionnal.
When I deploy my component in jboss, it
automatically
create 2 tables in the DB : Element (with a
relation column)
and Person => OK
When I create a Person entity, jboss just add it
in the Person table =>
OK When I create an Element entity, jboss just
add it
in the Element table (leaving relation column at
'null').=> OK
(I didn't chose to pass a 'Person' directly in the
ejbCreate()
method of the Element entity bean, but just to have
setPerson() and
getPerson() methods)
But when I call myElement.setPerson(myPerson), I
get this
error message :
[java] java.rmi.ServerException: RemoteException
occurred in server thread; nested exception
is:
[java] java.rmi.ServerException: null; CausedByException is: [java] $Proxy82; nested exception is: [java] javax.ejb.EJBException: null; CausedByException is: [java] $Proxy82 [java] java.rmi.ServerException: null; CausedByException is: [java] $Proxy82; nested exception is: [java] javax.ejb.EJBException: null; CausedByException is: [java] $Proxy82 [java] javax.ejb.EJBException: null; CausedByException is: [java] $Proxy82 [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245) [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) [java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) [java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128) [java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108) [java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73) [java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76) [java] at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116) [java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) [java] at $Proxy8.setPerson(Unknown Source) [java] at DataPopulate.createElements(DataPopulate.java:397) [java] at
DataPopulate.main(DataPopulate.java:45)
[java] java.lang.ClassCastException: $Proxy82 [java] <<no stack trace available>> [java] Could anyone explain to me whats
wrong?
Thanks for any advice.
S. Chausson |
- Re: [JBoss-user] CMR... Sebastien CHAUSSON
- Re: [JBoss-user] CMR... Asif R. Ahmed
