Announcement Announcement Module
Collapse
No announcement yet.
getting noClassDef found error eventhough correct jar is present Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getting noClassDef found error eventhough correct jar is present

    Hi,

    I am getting following exception during deployment of application

    Exception stacktrace:
    Code:
    Exception:weblogic.management.ApplicationException: start() failed.
    	Module: LIKE	Error: weblogic.management.DeploymentException: Error registering bean with name 'metaAnalysisService' defined in resource [/WEB-INF/applicationContext.xml] of ServletContext: Class that bean class [org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean] depends on not found; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor - with nested exception:
    [java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor]
    
    	at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit()V(SlaveDeployer.java:2423)
    	at weblogic.management.deploy.slave.SlaveDeployer$Task.commit()V(SlaveDeployer.java:2138)
    	at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit()V(SlaveDeployer.java:2237)
    	at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare()V(SlaveDeployer.java:2132)
    	at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2384)
    	at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:866)
    	at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;ZLjava.lang.StringBuffer;)Z(SlaveDeployer.java:594)
    	at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:508)
    	at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread;)V(SlaveCallbackHandler.java:25)
    	at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
    	at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    	at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    I have put Spring.jar and spring-aop.jar inside classpath. when i extract my EAR i am able see both jars. However during deployment i am getting above exception.
    spring-aop.jar contains org/aopalliance/intercept/MethodInterceptor class file.

    Any pointers would be appreciated.

    Thanks
    Chintan

  • #2
    Did you place the jars under WEB-INF/lib or directly under the EAR's root? I propose the latter approach.
    BTW: Using spring.jar will suffice as it does contain everything that spring-aop.jar contains. Check the contents to verify that the MethodInterceptor class is present.

    Regards,
    Andreas

    Comment


    • #3
      Hi Andreas,

      At present it is in inside the EAR root which is used by business/data layer. I also tried by putting in WEB-INF/lib folder. but still it is giving same error.

      Even i check content inside spring.jar file. It doesn't have MethodInterceptor class.

      Let me know if there are other alternate.

      Regards
      Chintan

      Originally posted by Andreas Senft View Post
      Did you place the jars under WEB-INF/lib or directly under the EAR's root? I propose the latter approach.
      BTW: Using spring.jar will suffice as it does contain everything that spring-aop.jar contains. Check the contents to verify that the MethodInterceptor class is present.

      Regards,
      Andreas

      Comment


      • #4
        Hi Andreas,

        I am able to resolve the problem. in current spring.jar, MethodInterceptor class was missing. so i replaced with new spring.jar and it's working.


        thx
        Chintan

        Comment


        • #5
          Weblogic deployment error

          Hi,

          I am facing the following teth-breaking problem while trying to deploy an EAR which contains a RAR module inside it.

          Can anybody please throw some light how to overcome this.

          Log:
          A log of the task's activities.

          [Deployer:149033]preparing application ECDMSApplication-1 on myserver
          [Deployer:149033]failed application ECDMSApplication-1 on myserver
          [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application ECDMSApplication-1 on myserver.:
          Exception:weblogic.management.ApplicationException : Prepare failed. Task Id = 15
          Module: Aitia-1.0-SNAPSHOT.rar Error: Error parsing file at line: 19 column: 37. weblogic.xml.process.XMLParsingException: Error parsing file at line: 19 column: 37. Element type "use-first-available-connection" must be declared. - with nested exception:
          [org.xml.sax.SAXParseException: Element type "use-first-available-connection" must be declared.]
          org.xml.sax.SAXParseException: Element type "use-first-available-connection" must be declared.
          at weblogic.apache.xerces.parsers.AbstractSAXParser.p arse(AbstractSAXParser.java:1189)
          at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicPar ser.java:67)
          at weblogic.xml.process.ProcessorDriver.process(Proce ssorDriver.java:154)
          at weblogic.connector.deploy.dd.xml.WeblogicRarLoader _Connector12.process(WeblogicRarLoader_Connector12 .java:218)
          at weblogic.connector.deploy.dd.xml.DDUtil.processDDF ile(DDUtil.java:380)
          at weblogic.connector.deploy.dd.xml.DDUtil.processWeb logicRaDD(DDUtil.java:218)
          at weblogic.connector.deploy.dd.xml.DDUtil.processDDF iles(DDUtil.java:126)
          at weblogic.connector.deploy.dd.xml.DDUtil.getConnect orDescriptor(DDUtil.java:602)
          at weblogic.connector.deploy.dd.xml.DDUtil.getConnect orDescriptor(DDUtil.java:577)
          at weblogic.connector.deploy.ConnectorModule.loadConn ectorDescriptors(ConnectorModule.java:693)
          at weblogic.connector.deploy.ConnectorModule.loadDesc riptor(ConnectorModule.java:202)
          at weblogic.j2ee.J2EEApplicationContainer.loadDescrip tors(J2EEApplicationContainer.java:1379)
          at weblogic.j2ee.J2EEApplicationContainer.prepare(J2E EApplicationContainer.java:1204)
          at weblogic.j2ee.J2EEApplicationContainer.prepare(J2E EApplicationContainer.java:1051)
          at weblogic.management.deploy.slave.SlaveDeployer$Com ponentActivateTask.prepareContainer(SlaveDeployer. java:2444)
          at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.createContainer(SlaveDeployer.java:2394)
          at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare(SlaveDeployer.java:2310)
          at weblogic.management.deploy.slave.SlaveDeployer.pro cessPrepareTask(SlaveDeployer.java:866)
          at weblogic.management.deploy.slave.SlaveDeployer.pre pareDelta(SlaveDeployer.java:594)
          at weblogic.management.deploy.slave.SlaveDeployer.pre pareUpdate(SlaveDeployer.java:508)
          at weblogic.drs.internal.SlaveCallbackHandler$1.execu te(SlaveCallbackHandler.java:25)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)
          --------------- nested within: ------------------
          Error parsing file at line: 19 column: 37. weblogic.xml.process.XMLParsingException: Error parsing file at line: 19 column: 37. Element type "use-first-available-connection" must be declared. - with nested exception:
          [org.xml.sax.SAXParseException: Element type "use-first-available-connection" must be declared.]
          at weblogic.xml.process.ProcessorDriver.process(Proce ssorDriver.java:158)
          at weblogic.connector.deploy.dd.xml.WeblogicRarLoader _Connector12.process(WeblogicRarLoader_Connector12 .java:218)
          at weblogic.connector.deploy.dd.xml.DDUtil.processDDF ile(DDUtil.java:380)
          at weblogic.connector.deploy.dd.xml.DDUtil.processWeb logicRaDD(DDUtil.java:218)
          at weblogic.connector.deploy.dd.xml.DDUtil.processDDF iles(DDUtil.java:126)
          at weblogic.connector.deploy.dd.xml.DDUtil.getConnect orDescriptor(DDUtil.java:602)
          at weblogic.connector.deploy.dd.xml.DDUtil.getConnect orDescriptor(DDUtil.java:577)
          at weblogic.connector.deploy.ConnectorModule.loadConn ectorDescriptors(ConnectorModule.java:693)
          at weblogic.connector.deploy.ConnectorModule.loadDesc riptor(ConnectorModule.java:202)
          at weblogic.j2ee.J2EEApplicationContainer.loadDescrip tors(J2EEApplicationContainer.java:1379)
          at weblogic.j2ee.J2EEApplicationContainer.prepare(J2E EApplicationContainer.java:1204)
          at weblogic.j2ee.J2EEApplicationContainer.prepare(J2E EApplicationContainer.java:1051)
          at weblogic.management.deploy.slave.SlaveDeployer$Com ponentActivateTask.prepareContainer(SlaveDeployer. java:2444)
          at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.createContainer(SlaveDeployer.java:2394)
          at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare(SlaveDeployer.java:2310)
          at weblogic.management.deploy.slave.SlaveDeployer.pro cessPrepareTask(SlaveDeployer.java:866)
          at weblogic.management.deploy.slave.SlaveDeployer.pre pareDelta(SlaveDeployer.java:594)
          at weblogic.management.deploy.slave.SlaveDeployer.pre pareUpdate(SlaveDeployer.java:508)
          at weblogic.drs.internal.SlaveCallbackHandler$1.execu te(SlaveCallbackHandler.java:25)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)
          .

          Comment


          • #6
            There seems to be a problem in your deployment descriptor concerning the element "use-first-available-connection". Have a look at the documentation of your application server to find out what's wrong.

            Besides that: As your problem has nothing to do with this thread (in fact I do not even see a connection with Spring) it would have been better to open a new thread with an appropriate subject line. This improves the probability of sensible answers.

            Regards,
            Andreas

            Comment


            • #7
              Hi Chetan,

              I face the same issue. Can you also please help me to solve this issue.

              15:28:52,691 ERROR ContextLoader:238 - Context initialization failed
              org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'queueConnectionFactory' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
              at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:527)
              at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
              at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 95)
              at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
              at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:292 )
              at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:563)
              at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:900)
              at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.


              Can you also tell me what jars are required and where should I place them?


              Thanks in advance..

              Comment

              Working...
              X