1 Reply Latest reply on Mar 10, 2011 10:30 PM by Sandy Noa

    Exception under Seam and GWT

    mat Newbie

      When using our GWT client to the seam components the following java.lang.LinkageError exceptions occur;
      The exceptions don't happen every time and its occurens is unpredictable;
      We are only using Stateless EJB3 Seam components called by seam remoting for GWT;
      Your help is greatly appreciated;
      Environment:
      JBoss-4.2.2.GA
      Seam-2.0.1


      Many thanks



      
      
      19:50:53,687 ERROR [[/projectContextName]] Exception while dispatching incoming RPC call
      
      javax.ejb.EJBException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: userDAO
      
              at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
      
              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
      
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
      
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
      
              at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
      
              at $Proxy166.getUser(Unknown Source)
      
              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:597)
      
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      
              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      
              at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      
              at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
      
              at org.javassist.tmp.java.lang.Object_$$_javassist_7.getUser(Object_$$_javassist_7.java)
      
              at com.mycompany.server.modules.user.UserServiceBean.getUser(UserServiceBean.java:30)
      
              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:597)
      
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      
              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      
              at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      
              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      
              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      
              at com.mycompany.server.modules.user.UserServiceBean_$$_javassist_4.getUser(UserServiceBean_$$_javassist_4.java)
      
              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:597)
      
              at org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAdapter.java:100)
      
              at org.jboss.seam.remoting.gwt.GWTService.processCall(GWTService.java:246)
      
              at org.jboss.seam.remoting.gwt.GWTService$1.process(GWTService.java:146)
      
              at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
      
              at org.jboss.seam.remoting.gwt.GWTService.getResource(GWTService.java:130)
      
              at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:75)
      
              at org.jboss.seam.servlet.SeamResourceServlet.doPost(SeamResourceServlet.java:92)
      
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      
              at java.lang.Thread.run(Thread.java:619)
      
      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: userDAO
      
              at org.jboss.seam.Component.newInstance(Component.java:1970)
      
              at org.jboss.seam.Component.getInstance(Component.java:1873)
      
              at org.jboss.seam.Component.getInstance(Component.java:1840)
      
              at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2182)
      
              at org.jboss.seam.Component.getValueToInject(Component.java:2134)
      
              at org.jboss.seam.Component.injectAttributes(Component.java:1598)
      
              at org.jboss.seam.Component.inject(Component.java:1416)
      
              at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.jav
      
      a:27)
      
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      
              at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
      
              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:597)
      
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      
              at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerIntercep
      
      tor.java:54)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      
              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      
              ... 89 more
      
      Caused by: java.lang.RuntimeException: by java.lang.LinkageError: loader (instance of  org/jboss/mx/loading/UnifiedClass
      
      Loader3): attempted  duplicate class definition for name: "org/javassist/tmp/java/lang/Object_$$_javassist_8"
      
              at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:190)
      
              at org.jboss.seam.Component.createProxyFactory(Component.java:2260)
      
              at org.jboss.seam.Component.getProxyFactory(Component.java:1375)
      
              at org.jboss.seam.Component.wrap(Component.java:1366)
      
              at org.jboss.seam.Component.instantiateSessionBean(Component.java:1288)
      
              at org.jboss.seam.Component.instantiate(Component.java:1273)
      
              at org.jboss.seam.Component.newInstance(Component.java:1966)
      
              ... 117 more
      
      Caused by: javassist.CannotCompileException: by java.lang.LinkageError: loader (instance of  org/jboss/mx/loading/Unifie
      
      dClassLoader3): attempted  duplicate class definition for name: "org/javassist/tmp/java/lang/Object_$$_javassist_8"
      
              at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
      
              at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:186)
      
              ... 123 more
      
      Caused by: java.lang.LinkageError: loader (instance of  org/jboss/mx/loading/UnifiedClassLoader3): attempted  duplicate
      
      class definition for name: "org/javassist/tmp/java/lang/Object_$$_javassist_8"
      
              at java.lang.ClassLoader.defineClass1(Native Method)
      
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      
              at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
      
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      
              at java.lang.reflect.Method.invoke(Method.java:597)
      
              at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:177)
      
              at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
      
              ... 124 more
      
      
      
      
      
      
      
      
      
      
      
      
      
      @Stateless
      
      @Name("userDAO")
      
      public class UserDAOBean implements UserDAO 
      
      {
      
          
      
          
      
          @In
      
          private EntityManager entityManager;  
      
          ....