4 Replies Latest reply on Oct 26, 2005 10:25 AM by Scott Stark

    java.lang.LinkageError: loader constraints violated when lin

    Davis Varkey Newbie

      Dear All,

      I am getting the following Linkage Error while deploying my application ear in JBOss. Can some one enlight me the cause of this error ?, any hint will also will be fine.

      java.lang.LinkageError: loader constraints violated when linking com/sns/base/Response class
      com.sns.member.dao.MemEnquirySessionAdapter.retrieveRoleByMemId(MemEnquirySessionAdapter.java:643)
      com.crimson.elearning.ilms.login.servlet.Ilms_LoginManagerServlet.LaunchRoleSelectionPage(Unknown Source)
      com.crimson.elearning.ilms.login.servlet.Ilms_LoginManagerServlet.doGet(Unknown Source)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:697)

      Thanks in advance.

      Regards,
      Davis

        • 1. Re: java.lang.LinkageError: loader constraints violated when
          Davis Varkey Newbie

          To give more info on this problem - actually, the jar (sfcUtil.jar) contains this Response class is there in both EAR and WAR file. But when removing the jar from WAR and keeping only in EAR, failing to deploy the application fully.

          Could you please direct me some packaging doc with regards to this problem ?.

          Thanks in advance.

          Regards,
          Davis

          • 2. Re: java.lang.LinkageError: loader constraints violated when
            Amit Bhayani Newbie

            From 4.0.2 JBoss has changed to the Servlet spec classloading model, i.e. it uses the Tomcat classloader.

            Try setting UseJBossWebLoader to true in jboss-4.x.x\server\XXX\deploy\jbossweb-tomcat50.sar\jboss-service.xml

            Amit.

            • 3. Re: java.lang.LinkageError: loader constraints violated when
              Davis Varkey Newbie

              Hi Amit,

              We have tried your suggession making the UseJBossWebloader property to true, but this time both the cases not able to fully deploy the application. Meaning, case 1. placing the sfcutil.jar file in EAR alone
              Case 2. Placing sfcUtil.jar file in both EAR and WAR files.

              The deployer is stuck where its trying to load a particular Servlet as shown in the below console messages. The bold part is actually coming when specifying the UseJBossWebloader property to false in the case 2, but getting the linkageError as posted earlier.


              @@@@@@@@@@@@@@@@@@@@clientRootChildLevel1.getChild(date-format).getText()dd/mm/yyyy
              4:59:30,755 INFO [STDOUT] *********Tahoma
              4:59:30,786 INFO [STDOUT] Inside the PortalConfigParser no problem here 6
              4:59:30,786 INFO [STDOUT] !!!!!!!!!!!!!The portal Configuration bean list is9
              4:59:30,786 INFO [STDOUT] Initializeing the Library in the Context
              4:59:30,786 INFO [STDOUT] The Library successfuly Initialized in the Context
              4:59:30,786 INFO [STDOUT] Initializing the application logger
              4:59:30,786 INFO [STDOUT] The Application Logger was initialized
              4:59:30,801 INFO [STDOUT] inside Ilms_Logger===>Entered into the Static block of Loggercom.crimson.elearning.ilms.objectFactory.Ilms_ObjectFactory@ffab0a
              4:59:30,801 INFO [STDOUT] The Object factory got iscom.crimson.elearning.ilms.objectFactory.Ilms_ObjectFactory@ffab0a



              4:59:31,130 INFO [STDOUT] *** MemberBaseServlet init***
              4:59:31,208 INFO [STDOUT] *** CmsAPIList - connecting to NewCMS database
              4:59:31,239 INFO [STDOUT] *** Invoking com.sns.cms.comn.api.CmsAPIList.LstOfMemberSalutations --- Wed Oct 26 14:59:31 SGT 2005
              4:59:33,786 INFO [STDOUT] *** Invoked --- return class com.sns.base.Response --- Wed Oct 26 14:59:33 SGT 2005
              4:59:33,786 INFO [STDOUT] value=/sns/infrastructure/member/lib/util/DBConnectorNCMS.xml
              4:59:33,786 INFO [STDOUT] *** CmsAPIList - connecting to NewCMS database
              4:59:33,786 INFO [STDOUT] *** Invoking com.sns.cms.comn.api.CmsAPIList.LstOfMemberCountryCodes --- Wed Oct 26 14:59:33 SGT 2005


              I really appreciate your kind help on this.

              Regards,
              Davis