0 Replies Latest reply on Mar 19, 2010 2:18 AM by Eitan Eibschutz

    Jboss 5.1.0 class cast exception in EJB

    Eitan Eibschutz Newbie

      Hi,

       

      I'm trying to call a web service from an EJB, but I'm getting the exception below. When calling the same web service from another application running on the same AS(not in an ejb), everything works just fine.

       

      Caused by: org.jboss.serial.exception.SerializationException: Excepted to be long
      2010-03-19 16:57:33,445 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readLong(DataContainer.java:1064)
      2010-03-19 16:57:33,450 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.classmetamodel.StreamingClass.readStream(StreamingClass.java:102)
      2010-03-19 16:57:33,454 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:381)
      2010-03-19 16:57:33,459 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      2010-03-19 16:57:33,463 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
      2010-03-19 16:57:33,468 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
      2010-03-19 16:57:33,473 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
      2010-03-19 16:57:33,477 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
      2010-03-19 16:57:33,483 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
      2010-03-19 16:57:33,487 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      2010-03-19 16:57:33,492 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
      2010-03-19 16:57:33,497 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
      2010-03-19 16:57:33,501 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
      2010-03-19 16:57:33,506 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
      2010-03-19 16:57:33,510 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
      2010-03-19 16:57:33,514 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      2010-03-19 16:57:33,519 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
      2010-03-19 16:57:33,524 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
      2010-03-19 16:57:33,530 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
      2010-03-19 16:57:33,535 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
      2010-03-19 16:57:33,540 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
      2010-03-19 16:57:33,549 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      2010-03-19 16:57:33,555 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
      2010-03-19 16:57:33,562 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
      2010-03-19 16:57:33,568 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:93)
      2010-03-19 16:57:33,573 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
      2010-03-19 16:57:33,586 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      2010-03-19 16:57:33,592 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
      2010-03-19 16:57:33,620 ERROR [STDERR] (http-127.0.0.1-8080-1)     at $Proxy567.invoke(Unknown Source)
      2010-03-19 16:57:33,624 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
      2010-03-19 16:57:33,632 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
      2010-03-19 16:57:33,642 ERROR [STDERR] (http-127.0.0.1-8080-1)     ... 85 more
      2010-03-19 16:57:33,647 ERROR [STDERR] (http-127.0.0.1-8080-1) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.jboss.serial.finalcontainers.LongContainer
      2010-03-19 16:57:33,654 ERROR [STDERR] (http-127.0.0.1-8080-1)     at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readLong(DataContainer.java:1060)
      2010-03-19 16:57:33,661 ERROR [STDERR] (http-127.0.0.1-8080-1)     ... 115 more

       

      any ideas what may be causing this?

       

      Thanks,

      Eitan