0 Replies Latest reply on Apr 24, 2008 2:47 PM by Madhav Inamti

    java.lang.LinkageError:

    Madhav Inamti Novice

      I need to run an EAR on JBoss 4.2.2.
      This EAR works fine on JBoss 4.0.2.

      The EAR contents are as follows

      common.jar
      ..
      JAR
      WAR ( WEB-INF/lib also has common.jar)

      In addition the EAR accesses a Resource Adapter that also has a common.jar

      I changed conf/jboss-service, ear-deployer to set Isolated to true and CallByValue to true. Also the conf/jboss-service in deploy/jboss-web-deployer has

      <attribute name="Java2ClassLoadingCompliance">false</attribute>
      <attribute name="UseJBossWebLoader">false</attribute>


      On JBoss 4.2.2, I get the following error. Looks like a classloading and classcast issue....

      javax.servlet.ServletException: java.lang.reflect.UndeclaredThrowableException
       com.foo.connector.test.MFStatelessServlet.performTask(Unknown Source)
       com.foo.connector.test.MFStatelessServlet.doPost(Unknown Source)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      java.lang.reflect.UndeclaredThrowableException
       org.jboss.invocation.InvokerInterceptor.invokeLocalMarshalled(InvokerInterceptor.java:306)
       org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:61)
       org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
       org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
       org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
       org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
       $Proxy66.create(Unknown Source)
       com.foo.connector.test.MFStatelessServlet.performTask(Unknown Source)
       com.foo.connector.test.MFStatelessServlet.doPost(Unknown Source)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      java.lang.LinkageError: loader constraints violated when linking com/foo/connector/test/Calculatores class
       java.lang.Class.getDeclaredFields0(Native Method)
       java.lang.Class.privateGetDeclaredFields(Class.java:2259)
       java.lang.Class.getDeclaredField(Class.java:1852)
       java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1582)
       java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
       java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408)
       java.security.AccessController.doPrivileged(Native Method)
       java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
       java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
       java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:491)
       java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1508)
       java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
       java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
       java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:91)
       org.jboss.invocation.InvokerInterceptor.invokeLocalMarshalled(InvokerInterceptor.java:297)
       org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:61)
       org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
       org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
       org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
       org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
       $Proxy66.create(Unknown Source)
       com.foo.connector.test.MFStatelessServlet.performTask(Unknown Source)
       com.foo.connector.test.MFStatelessServlet.doPost(Unknown Source)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      


      Thanks,

      M