9 Replies Latest reply on Jul 8, 2013 1:21 PM by Atul Kshirsagar

    MANIFEST and Jboss-deployment-structure.xml

    Atul Kshirsagar Newbie

      I had couple of questions regarding usage of MANIFEST file and jboss-deployment-structure.xml. I am using JBoss 7.2.0.Final.

       

      1) When I add both MANIFEST and jboss-deployment-structure.xml under META_INF directory of ear then jboss-deployment-structure is ignored. None of the settings from jboss-deployment-structure.xml are picked up. Can't I do some settings through manifest and some through jboss-deployment-structure.xml?

      2) The reason I wanted to use both was because we use infinispan grid cache in our application and the only way I can get the infinispan to work from our application is by adding manifest dependencies entry as suggested here:

      https://docs.jboss.org/author/display/ISPN/Infinispan+modules+for+JBoss+AS+7.x. I tried adding the infinispan dependency through jboss-deployment-structure.xml (shown below) but I get ClassNotFoundException.

       

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
        <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
        <deployment>
          <dependencies>
            <module name="org.infinispan" services="import"/>
          </dependencies>
        </deployment>
      
       </jboss-deployment-structure>
      
      

       

      Note that I tried chaning services="import" to services="export" with same result. I removed services attribute and added export="true" but that did not make any difference.

       

      Exception stack trace is as follows:

       

      13:51:47,137 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 60) MSC00001: Failed to start service jboss.deployment.subunit."dcm-server.ear"."system.jar".component.SystemMonitor.START: org.jboss.msc.service.StartException in service jboss.deployment.subunit."dcm-server.ear"."system.jar".component.SystemMonitor.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
                at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_07]
                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_07]
                at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_07]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
                at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]
      Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
                at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:126)
                at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
                at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                ... 7 more
      Caused by: javax.ejb.EJBException: JBAS014580: Unexpected Error
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInNoTx(CMTTxInterceptor.java:188)
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:237)
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:374)
                at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:68)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
                at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                ... 11 more
      Caused by: java.lang.NoClassDefFoundError: org/infinispan/manager/CacheManager
                at com.brocade.dcm.system.monitor.SystemMonitor.fakeStart(SystemMonitor.java:228)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_07]
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_07]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_07]
                at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_07]
                at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:73)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:115) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final.jar:7.2.0.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:235)
                ... 20 more
      Caused by: java.lang.ClassNotFoundException: org.infinispan.manager.CacheManager from [Module "deployment.dcm-server.ear.cache.jar:main" from Service Module Loader]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1]
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1]
                ... 44 more
      
      

      How do I achieve adding infinispan dependency using jboss-deployment-structure.xml? Or am I forced to stick to manifest dependencies when using infinispan as jboss-deployment-structure.xml is ignored in presence of manifest dependencies entries? The problem with using just manifest file is I cannot specify exclusions as I can do in jboss-deployment-structure.xml

       

      Thanks,

      Atul