Re: Re: Re: Strange ClassCastException when looking up SLSB RemoteHome from "external" .war webapp
"Hans J. Prueller" <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Organization | LBS logics GmbH |
| Message-ID | <1295778596.2161.20.camel@kodos> |
unzippped the nightly build,
created a new jonas_base,
set local.registry to FALSE,
set security.manager to TRUE,
deployed my datasources and the ear and the axis2-war
---> now the exceptions are gone, works for me now. thank you guillaume!
regards,
HANS
Am Freitag, den 21.01.2011, 14:46 +0100 schrieb Guillaume Sauthier:
> I created an issue for this:
> http://jira.ow2.org/browse/JONAS-315
>
> Fortunately, I may have a fix for this.
> I has been committed just some minutes ago, it will be in the next 5.2
> nightly build:
> http://maven.ow2.org/maven2-snapshot/org/ow2/jonas/assemblies/profiles/jonas-full/5.2.0-M4-SNAPSHOT/
>
> Tell me if that solves your issue.
> If so, I'll close the bug and backport it into 5.1.
>
> Thanks
> --G
>
> Le 20/01/2011 18:35, Hans J. Prueller a écrit :
>
> > Ok, current status summary:
> >
> > with default setting (carol.jvm.rmi.local.registry=true) this
> > strange class-cast error occurs.
> >
> > - switching
> >
> > > carol.jvm.rmi.local.registry=false
> > >
> >
> >
> > results in errors that the EJB homes cannot be registered at
> > deployment time (this is what you wanted to have from me,
> > Guillaume!):
> >
> > 2011-01-20 18:26:04,518 : JHome.register : Cannot register bean
> > 2011-01-20 18:26:04,519 : JOnASEJBService.__createContainer : Can't
> > deploy bean 'JobManagementBean'
> > javax.ejb.EJBException: JobManagementBean Cannot register home
> > at
> > org.ow2.jonas.lib.ejb21.JSessionFactory.<init>(JSessionFactory.java:139)
> > at
> > org.ow2.jonas.lib.ejb21.JStatelessFactory.<init>(JStatelessFactory.java:86)
> > at org.ow2.jonas.lib.ejb21.JContainer.addBean(JContainer.java:301)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.__createContainer(JOnASEJBService.java:872)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.createContainer(JOnASEJBService.java)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.__deployJars(JOnASEJBService.java:1495)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.deployJars(JOnASEJBService.java)
> > at
> > org.ow2.jonas.ear.internal.EarDeployer.deployEJB21s(EarDeployer.java:1224)
> > at
> > org.ow2.jonas.ear.internal.EarDeployer.doDeploy(EarDeployer.java:777)
> > at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer
> > $1.execute(AbsDeployer.java:96)
> > at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer
> > $1.execute(AbsDeployer.java:95)
> > at
> > org.ow2.util.execution.helper.RunnableHelper.execute(RunnableHelper.java:77)
> > at
> > org.ow2.util.ee.deploy.impl.deployer.AbsDeployer.deploy(AbsDeployer.java:94)
> > at
> > org.ow2.util.ee.deploy.impl.deployer.DeployerManager.deploy(DeployerManager.java:129)
> > at
> > org.ow2.jonas.deployablemonitor.DeployableMonitor.detectNewArchives(DeployableMonitor.java:483)
> > at
> > org.ow2.jonas.deployablemonitor.DeployableMonitor.checkNewArchives(DeployableMonitor.java:305)
> > at
> > org.ow2.jonas.deployablemonitor.DeployableMonitor.run(DeployableMonitor.java:215)
> > Caused by: java.lang.RuntimeException: Cannot register bean:
> > at org.ow2.jonas.lib.ejb21.JHome.register(JHome.java:216)
> > at
> > org.ow2.jonas.lib.ejb21.JSessionFactory.<init>(JSessionFactory.java:137)
> > ... 16 more
> > Caused by: javax.naming.NamingException: Cannot perform rebind [Root
> > exception is javax.naming.CommunicationException [Root exception is
> > java.rmi.ServerException: RemoteException occurred in server thread;
> > nested exception is:
> > java.rmi.UnmarshalException: error unmarshalling arguments; nested
> > exception is:
> > java.lang.ClassNotFoundException:
> > org.ow2.jonas_gen.com.lbslogics.ims.app.interfaces.JOnASJobManagementBean1409141165Home_Stub (no security manager: RMI class loader disabled)]]
> > at
> > org.ow2.carol.jndi.intercept.spi.InterceptableContext.namingException(InterceptableContext.java:823)
> > at
> > org.ow2.carol.jndi.intercept.spi.InterceptableContext.rebind(InterceptableContext.java:224)
> > at
> > org.ow2.carol.jndi.spi.VirtualJNDILookup.rebind(VirtualJNDILookup.java:375)
> > at javax.naming.InitialContext.rebind(InitialContext.java:408)
> > at org.ow2.carol.util.csiv2.SasHelper.rebind(SasHelper.java:62)
> > at org.ow2.jonas.lib.ejb21.JHome$1.execute(JHome.java:208)
> > at org.ow2.jonas.lib.ejb21.JHome$1.execute(JHome.java:207)
> > at
> > org.ow2.jonas.lib.execution.RunnableHelper.execute(RunnableHelper.java:60)
> > at org.ow2.jonas.lib.ejb21.JHome.register(JHome.java:212)
> > ... 17 more
> > Caused by: javax.naming.CommunicationException [Root exception is
> > java.rmi.ServerException: RemoteException occurred in server thread;
> > nested exception is:
> > java.rmi.UnmarshalException: error unmarshalling arguments; nested
> > exception is:
> > java.lang.ClassNotFoundException:
> > org.ow2.jonas_gen.com.lbslogics.ims.app.interfaces.JOnASJobManagementBean1409141165Home_Stub (no security manager: RMI class loader disabled)]
> > at
> > com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:142)
> > at javax.naming.InitialContext.rebind(InitialContext.java:412)
> > at org.ow2.carol.jndi.spi.AbsContext.rebind(AbsContext.java:190)
> > at org.ow2.carol.jndi.spi.AbsContext.rebind(AbsContext.java:200)
> > at javax.naming.InitialContext.rebind(InitialContext.java:408)
> > at org.ow2.carol.jndi.spi.MultiContext.rebind(MultiContext.java:167)
> > at
> > org.ow2.carol.jndi.intercept.operation.StringRebindInterceptionContext.executeLast(StringRebindInterceptionContext.java:48)
> > at
> > org.ow2.carol.jndi.intercept.operation.AbstractInterceptionContext.proceed(AbstractInterceptionContext.java:57)
> > at
> > org.ow2.jonas.jndi.interceptors.impl.datasource.DataSourceLeakDetectorContextInterceptor.intercept(DataSourceLeakDetectorContextInterceptor.java:63)
> > at
> > org.ow2.carol.jndi.intercept.operation.AbstractInterceptionContext.proceed(AbstractInterceptionContext.java:55)
> > at
> > org.ow2.carol.jndi.intercept.spi.InterceptableContext.rebind(InterceptableContext.java:222)
> > ... 24 more
> > Caused by: java.rmi.ServerException: RemoteException occurred in
> > server thread; nested exception is:
> > java.rmi.UnmarshalException: error unmarshalling arguments; nested
> > exception is:
> > java.lang.ClassNotFoundException:
> > org.ow2.jonas_gen.com.lbslogics.ims.app.interfaces.JOnASJobManagementBean1409141165Home_Stub (no security manager: RMI class loader disabled)
> > at
> > sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
> > at
> > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
> > at sun.rmi.transport.Transport$1.run(Transport.java:159)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> > at
> > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run0(TCPTransport.java:790)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run(TCPTransport.java:649)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.runTask(ThreadPoolExecutor.java:886)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > at
> > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
> > at
> > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
> > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
> > at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
> > at
> > com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:140)
> > ... 34 more
> > Caused by: java.rmi.UnmarshalException: error unmarshalling
> > arguments; nested exception is:
> > java.lang.ClassNotFoundException:
> > org.ow2.jonas_gen.com.lbslogics.ims.app.interfaces.JOnASJobManagementBean1409141165Home_Stub (no security manager: RMI class loader disabled)
> >
> >
> >
> > --> then I tried to enable the security manager as Florent
> > suggested:
> >
> > this once again results in Errors at deployment time: "cannot
> > register home" caused by: NoClassDefFoundError:
> > javax.ejb.EJBHome !!!
> >
> > see stack trace here:
> >
> > 2011-01-20 18:32:43,485 : JHome.register : Cannot register bean
> > 2011-01-20 18:32:43,486 : JOnASEJBService.__createContainer : Can't
> > deploy bean 'JobManagementBean'
> > javax.ejb.EJBException: JobManagementBean Cannot register home
> > at
> > org.ow2.jonas.lib.ejb21.JSessionFactory.<init>(JSessionFactory.java:139)
> > at
> > org.ow2.jonas.lib.ejb21.JStatelessFactory.<init>(JStatelessFactory.java:86)
> > at org.ow2.jonas.lib.ejb21.JContainer.addBean(JContainer.java:301)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.__createContainer(JOnASEJBService.java:872)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.createContainer(JOnASEJBService.java)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.__deployJars(JOnASEJBService.java:1495)
> > at
> > org.ow2.jonas.ejb2.internal.JOnASEJBService.deployJars(JOnASEJBService.java)
> > at
> > org.ow2.jonas.ear.internal.EarDeployer.deployEJB21s(EarDeployer.java:1224)
> > at
> > org.ow2.jonas.ear.internal.EarDeployer.doDeploy(EarDeployer.java:777)
> > at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer
> > $1.execute(AbsDeployer.java:96)
> > at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer
> > $1.execute(AbsDeployer.java:95)
> > at
> > org.ow2.util.execution.helper.RunnableHelper.execute(RunnableHelper.java:77)
> > at
> > org.ow2.util.ee.deploy.impl.deployer.AbsDeployer.deploy(AbsDeployer.java:94)
> > at
> > org.ow2.util.ee.deploy.impl.deployer.DeployerManager.deploy(DeployerManager.java:129)
> > at
> > org.ow2.jonas.deployablemonitor.DeployableMonitor.detectNewArchives(DeployableMonitor.java:483)
> > at
> > org.ow2.jonas.deployablemonitor.DeployableMonitor.checkNewArchives(DeployableMonitor.java:305)
> > at
> > org.ow2.jonas.deployablemonitor.DeployableMonitor.run(DeployableMonitor.java:215)
> > Caused by: java.lang.RuntimeException: Cannot register bean:
> > at org.ow2.jonas.lib.ejb21.JHome.register(JHome.java:216)
> > at
> > org.ow2.jonas.lib.ejb21.JSessionFactory.<init>(JSessionFactory.java:137)
> > ... 16 more
> > Caused by: javax.naming.NamingException: Cannot perform rebind [Root
> > exception is javax.naming.NamingException [Root exception is
> > java.rmi.ServerError: Error occurred in server thread; nested
> > exception is:
> > java.lang.NoClassDefFoundError: javax/ejb/EJBHome]]
> > at
> > org.ow2.carol.jndi.intercept.spi.InterceptableContext.namingException(InterceptableContext.java:823)
> > at
> > org.ow2.carol.jndi.intercept.spi.InterceptableContext.rebind(InterceptableContext.java:224)
> > at
> > org.ow2.carol.jndi.spi.VirtualJNDILookup.rebind(VirtualJNDILookup.java:375)
> > at javax.naming.InitialContext.rebind(InitialContext.java:408)
> > at org.ow2.carol.util.csiv2.SasHelper.rebind(SasHelper.java:62)
> > at org.ow2.jonas.lib.ejb21.JHome$1.execute(JHome.java:208)
> > at org.ow2.jonas.lib.ejb21.JHome$1.execute(JHome.java:207)
> > at
> > org.ow2.jonas.lib.execution.RunnableHelper.execute(RunnableHelper.java:60)
> > at org.ow2.jonas.lib.ejb21.JHome.register(JHome.java:212)
> > ... 17 more
> > Caused by: javax.naming.NamingException [Root exception is
> > java.rmi.ServerError: Error occurred in server thread; nested
> > exception is:
> > java.lang.NoClassDefFoundError: javax/ejb/EJBHome]
> > at
> > com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:142)
> > at javax.naming.InitialContext.rebind(InitialContext.java:412)
> > at org.ow2.carol.jndi.spi.AbsContext.rebind(AbsContext.java:190)
> > at org.ow2.carol.jndi.spi.AbsContext.rebind(AbsContext.java:200)
> > at javax.naming.InitialContext.rebind(InitialContext.java:408)
> > at org.ow2.carol.jndi.spi.MultiContext.rebind(MultiContext.java:167)
> > at
> > org.ow2.carol.jndi.intercept.operation.StringRebindInterceptionContext.executeLast(StringRebindInterceptionContext.java:48)
> > at
> > org.ow2.carol.jndi.intercept.operation.AbstractInterceptionContext.proceed(AbstractInterceptionContext.java:57)
> > at
> > org.ow2.jonas.jndi.interceptors.impl.datasource.DataSourceLeakDetectorContextInterceptor.intercept(DataSourceLeakDetectorContextInterceptor.java:63)
> > at
> > org.ow2.carol.jndi.intercept.operation.AbstractInterceptionContext.proceed(AbstractInterceptionContext.java:55)
> > at
> > org.ow2.carol.jndi.intercept.spi.InterceptableContext.rebind(InterceptableContext.java:222)
> > ... 24 more
> > Caused by: java.rmi.ServerError: Error occurred in server thread;
> > nested exception is:
> > java.lang.NoClassDefFoundError: javax/ejb/EJBHome
> > at
> > sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:393)
> > at
> > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
> > at sun.rmi.transport.Transport$1.run(Transport.java:159)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> > at
> > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run0(TCPTransport.java:790)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run(TCPTransport.java:649)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.runTask(ThreadPoolExecutor.java:886)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > at
> > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
> > at
> > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
> > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
> > at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
> > at
> > com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:140)
> > ... 34 more
> > Caused by: java.lang.NoClassDefFoundError: javax/ejb/EJBHome
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> > at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> > at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> > at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> > at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:247)
> > at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:434)
> > at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
> > at java.rmi.server.RMIClassLoader
> > $2.loadClass(RMIClassLoader.java:620)
> > at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
> > at
> > sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
> > at
> > java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
> > at
> > java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
> > at
> > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
> > at
> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> > at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
> > at
> > sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
> > at
> > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
> > at sun.rmi.transport.Transport$1.run(Transport.java:159)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> > at
> > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run0(TCPTransport.java:790)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run(TCPTransport.java:649)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.runTask(ThreadPoolExecutor.java:886)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > Caused by: java.lang.ClassNotFoundException: javax.ejb.EJBHome
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> > ... 46 more
> > 2011-01-20 18:32:43,541 : JHome.register : Cannot register bean
> > 2011-01-20 18:32:43,541 : JOnASEJBService.__createContainer : Can't
> > deploy bean 'EventManagerBean'
> > javax.ejb.EJBException: EventManagerBean Cannot register home
> >
> >
> >
> >
> > Seems like basic javax.ejb.* package is not in classpath ?
> >
> >
> > regards,
> > HANS
> >
> > Am Donnerstag, den 20.01.2011, 13:56 +0100 schrieb Guillaume
> > Sauthier:
> >
> > > Oops I meant disabled (local.registry=false)
> > > --G
> > >
> > > Le 20/01/2011 13:54, Guillaume Sauthier a écrit :
> > >
> > > > Yeah, I received it.
> > > > just need some time to take a closer look at what carol is
> > > > exactly doing with this flag enabled :)
> > > > --G
> > > >
> > > > Le 20/01/2011 12:47, Hans J. Prueller a écrit :
> > > >
> > > > > did you receive my last mail containing the full stack trace?
> > > > >
> > > > > any new information on this issue?
> > > > >
> > > > > regards,
> > > > > hans
> > > > >
> > > > > Am Mittwoch, den 19.01.2011, 16:45 +0100 schrieb Guillaume
> > > > > Sauthier:
> > > > >
> > > > > > Can you give us the full stack trace please ?
> > > > > > --G
> > > > > >
> > > > > > Le 19/01/2011 16:42, Hans J. Prueller a écrit :
> > > > > >
> > > > > > > tried it out, classcast problem gone but another error
> > > > > > > occurs:
> > > > > > >
> > > > > > > javax.naming.NamingException: Cannot perform lookup [Root
> > > > > > > exception is javax.naming.NameNotFoundException:
> > > > > > > Guardian2Home]
> > > > > > > at
> > > > > > > org.ow2.carol.jndi.intercept.spi.InterceptableContext.namingException(InterceptableContext.java:823)
> > > > > > > at
> > > > > > > org.ow2.carol.jndi.intercept.spi.InterceptableContext.lookup(InterceptableContext.java:126)
> > > > > > > at
> > > > > > > org.ow2.carol.jndi.spi.VirtualJNDILookup.lookup(VirtualJNDILookup.java:109)
> > > > > > > at
> > > > > > > javax.naming.InitialContext.lookup(InitialContext.java:392)
> > > > > > >
> > > > > > > hans
> > > > > > >
> > > > > > >
> > > > > > > Am Mittwoch, den 19.01.2011, 10:45 +0100 schrieb Guillaume
> > > > > > > Sauthier:
> > > > > > >
> > > > > > > > Can you try with local.registry set to false ?
> > > > > > > > --G
> > > > > > > >
> > > > > > > > Le 19/01/2011 10:32, Hans J. Prueller a écrit :
> > > > > > > >
> > > > > > > > > Guillaume,
> > > > > > > > >
> > > > > > > > > thank you. I know about the fact you mentioned
> > > > > > > > >
> > > > > > > > > >>That means that you can have the same class (same
> > > > > > > > > name, same bytecode, same everything), loaded by 2
> > > > > > > > > different classloaders
> > > > > > > > > >> but that will be incompatible (you cannot cast one
> > > > > > > > > of them into the other).
> > > > > > > > >
> > > > > > > > > and I already "suspected" a classloader issue being
> > > > > > > > > responsible for the classcast problem ;-) I already
> > > > > > > > > tried to remove the EJB API from
> > > > > > > > > the WEB-INF/lib of the axis2 webapp, but that didn't
> > > > > > > > > solve the problem but lead to a classnotfound or
> > > > > > > > > noclassdeffound error.
> > > > > > > > >
> > > > > > > > > I did not change carol.properites - I am simply using
> > > > > > > > > JOnAS 5.1.5 with its default values!
> > > > > > > > >
> > > > > > > > > carol.jvm.rmi.local.call = false
> > > > > > > > > carol.jvm.rmi.local.registry = true
> > > > > > > > >
> > > > > > > > > regards,
> > > > > > > > > Hans
> > > > > > > > >
> > > > > > > > > Am Mittwoch, den 19.01.2011, 10:25 +0100 schrieb
> > > > > > > > > Guillaume Sauthier:
> > > > > > > > >
> > > > > > > > > > Hi Hans
> > > > > > > > > >
> > > > > > > > > > A Class object is defined by its name AND the
> > > > > > > > > > ClassLoader that loaded it.
> > > > > > > > > > That means that you can have the same class (same
> > > > > > > > > > name, same bytecode, same everything), loaded by 2
> > > > > > > > > > different classloaders but that will be incompatible
> > > > > > > > > > (you cannot cast one of them into the other).
> > > > > > > > > >
> > > > > > > > > > So in your case, you have 2 places where your EJB
> > > > > > > > > > API is available: inside the EAR and inside the
> > > > > > > > > > WEB-INF/lib of the axis2 webapp. So they are not
> > > > > > > > > > sharing the same Class definition for your EJB API.
> > > > > > > > > > What seems to happen is that JNDI returns an
> > > > > > > > > > instance coming from your EAR.
> > > > > > > > > >
> > > > > > > > > > Did you change your carol.properties ?
> > > > > > > > > > Can you show me the value of the following
> > > > > > > > > > properties:
> > > > > > > > > > * carol.jvm.rmi.local.call
> > > > > > > > > > * carol.jvm.rmi.local.registry
> > > > > > > > > >
> > > > > > > > > > --G
> > > > > > > > > >
> > > > > > > > > > Le 19/01/2011 08:10, Hans J. Prueller a écrit :
> > > > > > > > > >
> > > > > > > > > > > Hi,
> > > > > > > > > > >
> > > > > > > > > > > we are still working on migrating our JOnAS 4.10
> > > > > > > > > > > based Java EE 1.4 EAR to JOnAS 5.1.5. One (seems
> > > > > > > > > > > really to be the last) open issue
> > > > > > > > > > > we have is the following:
> > > > > > > > > > >
> > > > > > > > > > > Our Java EE 1.4 Application is packaged as EAR, it
> > > > > > > > > > > contains the EjB-JAR.JAR containing the EJB 2.1
> > > > > > > > > > > SLSB's. It also contains 2 or 3
> > > > > > > > > > > webapps as .WAR file (war files within the EAR
> > > > > > > > > > > file), which are looking up the remote homes and
> > > > > > > > > > > remote interfaces of the SLSB's
> > > > > > > > > > > which works fine.
> > > > > > > > > > >
> > > > > > > > > > > Then we have another webapp, based on AXIS2 which
> > > > > > > > > > > provides webservices to external clients. The
> > > > > > > > > > > axis2 war file provies web-services,
> > > > > > > > > > > which also lookup the Remote Homes and Remote
> > > > > > > > > > > Interfaces of some of the SLSB's contained in the
> > > > > > > > > > > ear mentioned above.
> > > > > > > > > > >
> > > > > > > > > > > Therefore the remote home and remote interface
> > > > > > > > > > > stubs are packaged as .jar file in web-inf/lib of
> > > > > > > > > > > the axis2.war webapp.
> > > > > > > > > > >
> > > > > > > > > > > Basically this is all as it is meant to be by the
> > > > > > > > > > > Java EE standard, this is what remote home and
> > > > > > > > > > > remote interfaces of EJB's are for, and it
> > > > > > > > > > > really works fine and smooth on JOnAS 4.10.X
> > > > > > > > > > >
> > > > > > > > > > > When we now deploy our .EAR file and the axis2.WAR
> > > > > > > > > > > on JOnAS 5.1.5 and make a test-invocation of
> > > > > > > > > > > the web-service, we get a really strange
> > > > > > > > > > > ClassCastException:
> > > > > > > > > > >
> > > > > > > > > > > Cannot cast
> > > > > > > > > > > 'org.ow2.jonas_gen.com.lbslogics.ims.guardian.interfaces.JOnASGuardian2Bean1797447629Home' in 'com.lbslogics.ims.guardian.interfaces.Guardian2Home'
> > > > > > > > > > >
> > > > > > > > > > > When I check the source file
> > > > > > > > > > > (JOnASGuardian2Bean1797447629Home) generated by
> > > > > > > > > > > GenIC, it explicitly says:
> > > > > > > > > > >
> > > > > > > > > > > public class JOnASGuardian2Bean1797447629Home
> > > > > > > > > > > extends JSessionHome implements
> > > > > > > > > > > com.lbslogics.ims.guardian.interfaces.Guardian2Home {
> > > > > > > > > > >
> > > > > > > > > > > // JOnAS version used to deploy
> > > > > > > > > > > public static final String JONAS_VERSION =
> > > > > > > > > > > "5.1.5";
> > > > > > > > > > >
> > > > > > > > > > > [ ..... ]
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ======> so, the cast has to be possible. (and
> > > > > > > > > > > btw this works fine with all other .WAR's
> > > > > > > > > > > contained in the EAR itself doing the same). So
> > > > > > > > > > > why or what
> > > > > > > > > > > is the problem here ???
> > > > > > > > > > >
> > > > > > > > > > > Any ideas are appreciated because we cannot
> > > > > > > > > > > migrate our production servers unless also the
> > > > > > > > > > > webservices are working!
> > > > > > > > > > >
> > > > > > > > > > > regards,
> > > > > > > > > > > Hans
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > >
> > > > >
(unnamed)
(image/png, 1 KB) - not displayed