1 Reply Latest reply on Oct 4, 2004 7:51 AM by stefanfreyr

    UnmarshallException in JBoss 4.0 but not in JBoss 3.2.3

    stefanfreyr Newbie

      Hi.

      I have been trying to move our applications to run on JBoss 4.0 but I'm running into a problem.

      To begin with, let me describe the scenario.

      I'm using JDK 1.5. To get JBoss 3.2.3 to run on that I had to create a specific JBoss_JDK 1.5 in which I removed the javax.management package from the rt.jar file. JBoss 4.0 doesn't seem to have a problem with the vanilla JDK 1.5 so no special handling is done there.

      I have created an EAR file with my J2EE application in it and deployed _the same file_ on both the JBoss 3.2.3 and 4.0 installations. I then use the _same client_ to connect to the running instance. I, of course, only run either one at a time (either the 3.2.3 or the 4.0).

      When I run the 3.2.3 everything works like a charm. But when I run 4.0 I get the following exception _on the client side_:

      WARNING: A naming exception occurred when trying to perform an EJB lookup.
      javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
       java.io.InvalidClassException: org.jnp.interfaces.MarshalledValuePair; local class incompatible: stream classdesc serialVersionUID = -6485622724173581497, local class serialVersionUID = -3403843515711139134]
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:611)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at is.althingi.embla.clientframework.openapi.Framework.lookupSessionEJB(Framework.java:270)
       at is.althingi.embla.client.parliamentarysession.data.ParliamentSessionConnection.getConnection(ParliamentSessionConnection.java:41)
       at is.althingi.embla.client.parliamentarysession.data.ParliamentSessionDelegator.getConnection(ParliamentSessionDelegator.java:133)
       at is.althingi.embla.client.parliamentarysession.data.ParliamentSessionDelegator.getCurrentSessionCardinal(ParliamentSessionDelegator.java:143)
       at is.althingi.embla.client.parliamentarysession.data.ParliamentSessionDelegator.getDelegator(ParliamentSessionDelegator.java:164)
       at is.althingi.embla.client.parliamentarysession.action.DisplayMpRecordListAction.actionPerformedImpl(DisplayMpRecordListAction.java:38)
       at is.althingi.embla.clientframework.openapi.EmblaFrameworkAction.actionPerformed(EmblaFrameworkAction.java:65)
       at is.althingi.embla.clientframework.plugin.PluginManager.invokeStartupActions(PluginManager.java:165)
       at is.althingi.embla.clientframework.ClientFramework.pluginInit(ClientFramework.java:276)
       at is.althingi.embla.clientframework.ClientFramework.init(ClientFramework.java:120)
       at is.althingi.embla.clientframework.ClientFramework.main(ClientFramework.java:374)
      Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
       java.io.InvalidClassException: org.jnp.interfaces.MarshalledValuePair; local class incompatible: stream classdesc serialVersionUID = -6485622724173581497, local class serialVersionUID = -3403843515711139134
       at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:157)
       at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
       ... 13 more
      Caused by: java.io.InvalidClassException: org.jnp.interfaces.MarshalledValuePair; local class incompatible: stream classdesc serialVersionUID = -6485622724173581497, local class serialVersionUID = -3403843515711139134
       at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
       at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
       at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
       at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
       ... 15 more
      

      Nothing appears on the server side.

        • 1. Re: UnmarshallException in JBoss 4.0 but not in JBoss 3.2.3
          stefanfreyr Newbie

          Arrrgh... figures.

          I didn't update the jbossall-client.jar file that the client was user. After that I at least got further but now I'm stuck at some user permission stuff that used to work. I'm getting some errors stating:

          getCallerPrincipal should not be access from this bean method: IN_EJB_CREATE
          

          I somehow doubt thought that this is the real source for my errors because later I'm getting a few of these exceptions:
          11:37:36,680 ERROR [SecurityInterceptor] Insufficient method permissions, runAsPrincipal=anonymous, method=create, interface=LOCALHOME, requiredRoles=[speech, dev], runAsRoles=[embla-system]
          11:37:36,680 ERROR [LogInterceptor] EJBException in method: public abstract is.althingi.embla.ejbservice.documentcreation.LocalDocumentCreation is.althingi.embla.ejbservice.documentcreation.LocalDocumentCreationHome.create() throws javax.ejb.CreateException, causedBy:
          java.lang.SecurityException: Insufficient method permissions, runAsPrincipal=anonymous, method=create, interface=LOCALHOME,requiredRoles=[speech, dev], runAsRoles=[embla-system]
           at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:235)
           at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:96)
           at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
           at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
           at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
           at org.jboss.ejb.Container.invoke(Container.java:876)
           at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
           at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
           at $Proxy64.create(Unknown Source)
           at is.althingi.embla.ejbservice.documentcreation.DocumentTimerMDB.onMessage(DocumentTimerMDB.java:151)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
           at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
           at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
           at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
           at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
           at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:153)
           at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32)
           at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:87)
           at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:95)
           at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
           at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
           at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
           at org.jboss.ejb.Container.invoke(Container.java:854)
           at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:920)
           at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1213)
           at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
           at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:877)
           at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
           at org.jboss.mq.SpySession.run(SpySession.java:351)
           at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
           at java.lang.Thread.run(Thread.java:595)
          

          And what strikes me as weird is this:
          runAsPrincipal=anonymous
          because I specifically logged in as user stefanf and I get an error if I try to log in using an invalid username/password. So why am I being authenticated as "anonymous"?