0 Replies Latest reply on Mar 5, 2015 6:49 AM by Nilesh pitale

    java.lang.LinkageError: loader constraint violation: when resolving interface method

    Nilesh pitale Newbie

      Hello,

       

      I am getting Error java.lang.LinkageError: loader constraint violation: when resolving interface method

      At last of this post , I have metioned error in details.

       

       

      After migration from  old environment to new environment. And as well as replace some of jar from old to new, which I have mentioned below.


      Error Describe below

      OLD Environment

      Eclipse Java EE IDE for Web Developers. Version: Galilio  Release Build id: 20100218-1602

      JDK 1.5

      jboss-4.2.3.GA

      apache-ant-1.8.0

       

       

      New Environment

      Eclipse Java EE IDE for Web Developers.Version: Luna  Service Release 1a (4.4.1)

      JDK 1.8.0_31

      jboss-eap-6.3

      apache-ant-1.9.2 (Default from elipse)

       

      Old JARSNew JARs
      cglib-full-2.0.1.jarcactus-1.7.jar
      commons-beanutils.jarcommons-beanutils-1.8.3.redhat-6.jar(fromJboss)
      commons-codec.jarcommons-codec-1.9.jar
      commons-collections-2.1.jarcommons-collections-3.2.1.redhat-3.jar(fromJboss)
      commons-digester-1.7.jarcommons-digester-2.1.jar
      commons-io-1.3.2.jarcommons-io-2.1.jar
      commons-lang-1.0.1.jarcommons-lang-2.6.redhat-3.jar(fromJboss)
      commons-logging-1.0.3.jarcommons-logging-1.1.3.jar
      commons-validator-1.4.1.jar
      dom4j-1.4.jardom4j-1.6.1.redhat-6.jar(fromJboss)
      DynamicJasper-3.0.14.jarDynamicJasper-5.0.2.jar
      hibernate3.jarhibernate-core-4.3.8.Final.jar
      hibernate-tools.jar
      iText-2.1.7.jaritextpdf-5.5.4.jar
      itext-pdfa-5.5.4.jar
      jasperreports-3.5.0.jarjasperreports-6.0.0.jar
      jcommon-1.0.10.jarjcommon-1.0.15.jar
      jdom.jarjdom-1.1.2.redhat-4.jar(fromJboss)
      junit-3.8.1.jarjunit-4.11.jar
      jxl-2.6.jarjxl-2.6.12.jar
      log4j.jarlog4j-1.2.17.jar
      poi-3.1-FINAL-20080629.jarpoi-3.11-20141221.jar
      poi-scratchpad-3.1-FINAL-20080629.jarpoi-scratchpad-3.11-20141221.jar
      poi-scratchpad-3.5-beta5-20090219.jar
      velocity-1.4.jarvelocity-1.7.redhat-3.jar(fromJboss)
      velocity-dep-1.4.jarvelocity-1.7-dep.jar
      velocity-tools-1.1.jarvelocity-tools-2.0.jar

       

       

       

       

       

       

      14:15:21,656 ERROR [org.apache.struts.actions.DispatchAction] (http-/127.0.0.1:8080-1) Dispatch[/processExpressionSearch] to method 'count' returned an exception: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_31]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_31]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_31]

          at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_31]

          at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) [struts-1.2.7.jar:1.2.7]

          at net.voicelog.callRecording.gui.actions.VoiceLogAction.dispatchMethod(VoiceLogAction.java:38) [classes:]

          at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.7.jar:1.2.7]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at net.voicelog.callRecording.servlet.SecurityFilter.doFilter(SecurityFilter.java:66) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at net.voicelog.callRecording.servlet.CompressionFilter.doFilter(CompressionFilter.java:241) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at net.voicelog.callRecording.servlet.TimingFilter.doFilter(TimingFilter.java:48) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]

      Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "net.voicelog.callRecording.ejb.HQLQuerySessionLocal.getQueryCount(Lnet/voicelog/callRecording/entities/Client;Lnet/voicelog/callRecording/entities/User;Lnet/voicelog/callRecording/utility/PreferenceHelper;Z)I" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, net/voicelog/callRecording/gui/actions/search/ProcessSearchAction, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class, net/voicelog/callRecording/ejb/HQLQuerySessionLocal, have different Class objects for the type net/voicelog/callRecording/utility/PreferenceHelper used in the signature

          at net.voicelog.callRecording.gui.actions.search.ProcessSearchAction.count(ProcessSearchAction.java:377) [classes:]

          ... 35 more

       

      14:15:21,672 ERROR [net.voicelog.callRecording.gui.actions.VoicelogExceptionHandler] (http-/127.0.0.1:8080-1) ERROR OCCURRED: [VoicelogExceptionHandler: javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "net.voicelog.callRecording.ejb.HQLQuerySessionLocal.getQueryCount(Lnet/voicelog/callRecording/entities/Client;Lnet/voicelog/callRecording/entities/User;Lnet/voicelog/callRecording/utility/PreferenceHelper;Z)I" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, net/voicelog/callRecording/gui/actions/search/ProcessSearchAction, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class, net/voicelog/callRecording/ejb/HQLQuerySessionLocal, have different Class objects for the type net/voicelog/callRecording/utility/PreferenceHelper used in the signature

          at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:298) [struts-1.2.7.jar:1.2.7]

          at net.voicelog.callRecording.gui.actions.VoiceLogAction.dispatchMethod(VoiceLogAction.java:38) [classes:]

          at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) [struts-1.2.7.jar:1.2.7]

          at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.7.jar:1.2.7]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at net.voicelog.callRecording.servlet.SecurityFilter.doFilter(SecurityFilter.java:66) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at net.voicelog.callRecording.servlet.CompressionFilter.doFilter(CompressionFilter.java:241) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at net.voicelog.callRecording.servlet.TimingFilter.doFilter(TimingFilter.java:48) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]

      Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "net.voicelog.callRecording.ejb.HQLQuerySessionLocal.getQueryCount(Lnet/voicelog/callRecording/entities/Client;Lnet/voicelog/callRecording/entities/User;Lnet/voicelog/callRecording/utility/PreferenceHelper;Z)I" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, net/voicelog/callRecording/gui/actions/search/ProcessSearchAction, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class, net/voicelog/callRecording/ejb/HQLQuerySessionLocal, have different Class objects for the type net/voicelog/callRecording/utility/PreferenceHelper used in the signature

          at net.voicelog.callRecording.gui.actions.search.ProcessSearchAction.count(ProcessSearchAction.java:377) [classes:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_31]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_31]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_31]

          at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_31]

          at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) [struts-1.2.7.jar:1.2.7]

       

       

      Thank in advance

      Nilesh Pitale

      npitale@mcl.in

      9833144401