10 Replies Latest reply on Mar 8, 2012 11:58 AM by gboro54

    JBoss 7.1 and Guava 11.0.2

    gboro54 Novice

      I am trying to deploy an application which is utilizing guava 11.0.2. I have added the following to the meta-inf of the deployed ear but I still get the error below:

       

       

       

      jboss-deployment-structure.xml:

      {code:xml}

       

      <jboss-deployment-structure>

        <!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->

        <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

        <!-- This corresponds to the top level deployment. For a war this is the war's module, for an ear -->

        <!-- This is the top level ear module, which contains all the classes in the EAR's lib folder     -->

        <deployment>

          <!-- Exclusions allow you to prevent the server from automatically adding some dependencies     -->

          <exclusions>

              <module name="com.google.guava" />

          </exclusions>

        </deployment>

       

      </jboss-deployment-structure>

       

      {code}

       

      exception:

      {code}

      Caused by: java.lang.NoSuchMethodError: com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

                at com.google.common.cache.CacheBuilder.getKeyStrength(CacheBuilder.java:472) [guava-11.0.2.jar:]

                at com.google.common.cache.LocalCache.<init>(LocalCache.java:236) [guava-11.0.2.jar:]

                at com.google.common.cache.LocalCache$LocalManualCache.<init>(LocalCache.java:4750) [guava-11.0.2.jar:]

                at com.google.common.cache.LocalCache$LocalLoadingCache.<init>(LocalCache.java:4858) [guava-11.0.2.jar:]

                at com.google.common.cache.CacheBuilder.build(CacheBuilder.java:739) [guava-11.0.2.jar:]

                at com.nasdaq.backoffice.billing.common.rules.impl.RulesBaseBuilderImpl.init(RulesBaseBuilderImpl.java:49) [billing-common-test.jar:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_27]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_27]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_27]

                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_27]

                at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:73) [jboss-as-weld-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]

                ... 201 more

       

      {code}