0 Replies Latest reply on Jun 24, 2014 6:46 AM by David Binder

    manifest.mf dependencies ignored

    David Binder Newbie

      Hi there,

       

      I'm trying to set up a rest application that stores data to an infinispan application cache. To start with, I tried toying with infinispan example : http://https://github.com/infinispan/infinispan-quickstart/tree/master/jboss-as7.

      It didn't work from scratch, and I got CNF exceptions :

       

      01:01:59,732 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."infinispan-jboss-as7.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."infinispan-jboss-as7.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "infinispan-jboss-as7.war"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.infinispan.quickstart.jbossas7.Resources with ClassLoader ModuleClassLoader for Module "deployment.infinispan-jboss-as7.war:main" from Service Module Loader

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        ... 5 more

      Caused by: java.lang.NoClassDefFoundError: Lorg/infinispan/manager/EmbeddedCacheManager;

        at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_25]

        at java.lang.Class.privateGetDeclaredFields(Class.java:2387) [rt.jar:1.7.0_25]

        at java.lang.Class.getDeclaredFields(Class.java:1796) [rt.jar:1.7.0_25]

        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        ... 10 more

      Caused by: java.lang.ClassNotFoundException: org.infinispan.manager.EmbeddedCacheManager from [Module "deployment.infinispan-jboss-as7.war:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]

        ... 15 more

       

       

      01:01:59,734 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "infinispan-jboss-as7.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"infinispan-jboss-as7.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"infinispan-jboss-as7.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"infinispan-jboss-as7.war\"

          Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.infinispan.quickstart.jbossas7.Resources with ClassLoader ModuleClassLoader for Module \"deployment.infinispan-jboss-as7.war:main\" from Service Module Loader

          Caused by: java.lang.NoClassDefFoundError: Lorg/infinispan/manager/EmbeddedCacheManager;

          Caused by: java.lang.ClassNotFoundException: org.infinispan.manager.EmbeddedCacheManager from [Module \"deployment.infinispan-jboss-as7.war:main\" from Service Module Loader]"}}

       

      The example project generate a correct manifest mf file

      Manifest-Version: 1.0

      Archiver-Version: Plexus Archiver

      Created-By: Apache Maven

      Built-By:

      Build-Jdk: 1.7.0_25

      Dependencies: org.infinispan

      but the module is not loaded

       

      to finally make it work, I had to had a jboss-deployment-structure.xml :

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure>

          <deployment>

              <dependencies>

                  <module name="org.infinispan"/>

              </dependencies>

          </deployment>

      </jboss-deployment-structure>

       

      Well the fact is that it work, but I find annoying that I didn't make it to work with manifest dependencies.

       

      An ideas ?

       

      Cheers

       

      David