RE: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class
> I have only 1 session bean and many entity bean in different > jar.(session bean facade model). > > I did not why . I can remove entity bean without any error before. > I have tried it in jboss2.2.1 and jboss2.1 and hit the same error > message. > > I did not know why. My guess is that something to do with ClassLoader. > It is mine also. I think My problem is a bit different, as I have an ejb jar A contains the session bean and ejb jar B contains the entity that will be removed through the session bean. I have verified that the EntityEnterpriseContext of ejbjar B have an object in it that has a Classloader of ejbjar A. I am still looking how it can happen since my understanding of EntityInstanceInterceptor is that access to EntityEntrepriseContext "object" can only be done through the EntityCache which is attached to the entity so to the ejbjar B classloader. I have also verified that access to EntityEnterpriseContext may be done without going to EntityInstanceInterceptor. Before removing your entity, can you try to run any getter method on the remote interface. just before calling remove(), it should solve your problem. >Thanks wt. > Vincent. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class
Hi Vincent , I have only 1 session bean and many entity bean in different jar.(session bean facade model). I did not why . I can remove entity bean without any error before. I have tried it in jboss2.2.1 and jboss2.1 and hit the same error message. I did not know why. My guess is that something to do with ClassLoader. Thanks wt. Vincent Harcq wrote: > > I am pretty sure there is a problem in the instances pool somewhere, I also > receive something similar to that. > The trick is tio call any dummy remote method before calling remove. > Please help me figure out what happen : > Do you play with 2 session beans in 2 different ejb jar here ? > Thanks. > > > -Message d'origine- > > De : [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]De la part de Russell > > Envoye : mercredi 16 mai 2001 7:02 > > A : [EMAIL PROTECTED] > > Objet : Re: [JBoss-user] java.lang.Illegal.Argument Exception : object > > is not instance of the class > > > > > > Hi Toby , Thanks > > > > The complete exception is below : > > > > java.rmi.ServerException: RemoteException occurred in server thread; > > nested exception is: > > javax.transaction.TransactionRolledbackException: Load > > failed; nested > > exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > java.rmi.ServerException: Load failed; nested exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > javax.transaction.TransactionRolledbackException: Load > > failed; nested > > exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > java.rmi.ServerException: Load failed; nested exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class > > javax.transaction.TransactionRolledbackException: Load failed; nested > > exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > java.rmi.ServerException: Load failed; nested exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > javax.transaction.TransactionRolledbackException: Load > > failed; nested > > exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > java.rmi.ServerException: Load failed; nested exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class > > javax.transaction.TransactionRolledbackException: Load failed; nested > > exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class; nested exception is: > > java.rmi.ServerException: Load failed; nested exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class > > java.rmi.ServerException: Load failed; nested exception is: > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class > > java.lang.IllegalArgumentException: object is not an instance of > > declaring class > > at > > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Str > > eamRemoteCall.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.invoke(Unknown > > Source) > > at > > org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke > > (StatelessSessionProxy.java:188) > > at $Proxy1.adminDeleteCompany(Unknown Source) > > at > > com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38) > > > > > > > > > > Toby Allsopp wrote: > > > > > > On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote: > > > > > > > > Hi all , > > > > > > > >I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1. > > > > > > > >When i tried to remove entity , i have the error below : > > > > > > > > java.lang.Illegal.Argument Exception : object is not > > instance of the > > > > class... >
RE: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class
I am pretty sure there is a problem in the instances pool somewhere, I also receive something similar to that. The trick is tio call any dummy remote method before calling remove. Please help me figure out what happen : Do you play with 2 session beans in 2 different ejb jar here ? Thanks. > -Message d'origine- > De : [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]De la part de Russell > Envoye : mercredi 16 mai 2001 7:02 > A : [EMAIL PROTECTED] > Objet : Re: [JBoss-user] java.lang.Illegal.Argument Exception : object > is not instance of the class > > > Hi Toby , Thanks > > The complete exception is below : > > java.rmi.ServerException: RemoteException occurred in server thread; > nested exception is: > javax.transaction.TransactionRolledbackException: Load > failed; nested > exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > java.rmi.ServerException: Load failed; nested exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > javax.transaction.TransactionRolledbackException: Load > failed; nested > exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > java.rmi.ServerException: Load failed; nested exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class > javax.transaction.TransactionRolledbackException: Load failed; nested > exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > java.rmi.ServerException: Load failed; nested exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > javax.transaction.TransactionRolledbackException: Load > failed; nested > exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > java.rmi.ServerException: Load failed; nested exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class > javax.transaction.TransactionRolledbackException: Load failed; nested > exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class; nested exception is: > java.rmi.ServerException: Load failed; nested exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class > java.rmi.ServerException: Load failed; nested exception is: > java.lang.IllegalArgumentException: object is not an instance of > declaring class > java.lang.IllegalArgumentException: object is not an instance of > declaring class > at > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Str > eamRemoteCall.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.invoke(Unknown > Source) > at > org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke > (StatelessSessionProxy.java:188) > at $Proxy1.adminDeleteCompany(Unknown Source) > at > com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38) > > > > > Toby Allsopp wrote: > > > > On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote: > > > > > > Hi all , > > > > > >I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1. > > > > > >When i tried to remove entity , i have the error below : > > > > > > java.lang.Illegal.Argument Exception : object is not > instance of the > > > class... > > > > Please, when reporting exceptions, use copy and paste and include THE > > ENTIRE STACKTRACE. Sorry for shouting, but this really gets on ones > > nerves after a while. > > > > >And the code is : > > > > > > Remote r = home.findByPrimaryKey(new HomePK(3)); > > > r.remove() --> error here. > > > > That looks reasonable to me. The complete stacktrace might shed some > > more light on the matter. > > > > Toby. > > > > > Anybody have any idea why like that ?? Is this a bug in jboss ?? > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > http://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class
Hi Toby , Thanks The complete exception is below : java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class java.rmi.ServerException: Load failed; nested exception is: java.lang.IllegalArgumentException: object is not an instance of declaring class java.lang.IllegalArgumentException: object is not an instance of declaring class 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.invoke(Unknown Source) at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:188) at $Proxy1.adminDeleteCompany(Unknown Source) at com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38) Toby Allsopp wrote: > > On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote: > > > > Hi all , > > > >I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1. > > > >When i tried to remove entity , i have the error below : > > > > java.lang.Illegal.Argument Exception : object is not instance of the > > class... > > Please, when reporting exceptions, use copy and paste and include THE > ENTIRE STACKTRACE. Sorry for shouting, but this really gets on ones > nerves after a while. > > >And the code is : > > > > Remote r = home.findByPrimaryKey(new HomePK(3)); > > r.remove() --> error here. > > That looks reasonable to me. The complete stacktrace might shed some > more light on the matter. > > Toby. > > > Anybody have any idea why like that ?? Is this a bug in jboss ?? > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class
On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote: > > Hi all , > >I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1. > >When i tried to remove entity , i have the error below : > > java.lang.Illegal.Argument Exception : object is not instance of the > class... Please, when reporting exceptions, use copy and paste and include THE ENTIRE STACKTRACE. Sorry for shouting, but this really gets on ones nerves after a while. >And the code is : > > Remote r = home.findByPrimaryKey(new HomePK(3)); > r.remove() --> error here. That looks reasonable to me. The complete stacktrace might shed some more light on the matter. Toby. > Anybody have any idea why like that ?? Is this a bug in jboss ?? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user