1 Reply Latest reply on Feb 18, 2014 1:54 PM by fenoloco

    Google Guava error with ReferenceInvoker

    fenoloco Newbie

      Hi,

      I'm using Google Guava Cache and I'm getting an error on deploy phase.

      I tried two things without success:

      • package my .ear with the last guava version 16.0.1.
      • add a weld:scan exclusion inside my bean.xml like that.

       

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://java.sun.com/xml/ns/javaee" 
      xmlns:weld="http://jboss.org/schema/weld/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd http://jboss.org/schema/weld/beans http://jboss.org/schema/weld/beans_1_1.xsd">
        <weld:scan>
        <weld:include name="**" />
        <weld:exclude name="com.google.common.collect.**" />
        </weld:scan>
      </beans>
      

       

      Can anyone give me a hand?

      The exception:

       

      00:11:24,005 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.subunit."gateway-msg.ear"."gateway-core-1.0.0.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.subunit."gateway-msg.ear"."gateway-core-1.0.0.jar".SwitchYardService: com.google.common.collect.ComputationException: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org/switchyard/component/bean/ReferenceInvoker
        at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:80)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]
      Caused by: com.google.common.collect.ComputationException: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org/switchyard/component/bean/ReferenceInvoker
        at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:400)
        at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:102)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:603)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674)
        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:134)
        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:763)
        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:772)
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:165)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:161)
        at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:135)
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:157)
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:297)
        at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:635)
        at org.switchyard.component.bean.deploy.CDIBeanServiceDescriptor.getHandler(CDIBeanServiceDescriptor.java:81)
        at org.switchyard.component.bean.deploy.BeanComponentActivator.activateService(BeanComponentActivator.java:80)
        at org.switchyard.deploy.internal.Deployment.deployImplementations(Deployment.java:546)
        at org.switchyard.deploy.internal.Deployment.start(Deployment.java:144)
        at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:101)
        at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:73)
        ... 5 more
      Caused by: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org/switchyard/component/bean/ReferenceInvoker
        at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:282)
        at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:236)
        at org.jboss.weld.bean.proxy.ClientProxyFactory.create(ClientProxyFactory.java:105)
        at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:87)
        at org.jboss.weld.bean.proxy.ClientProxyProvider.access$000(ClientProxyProvider.java:43)
        at org.jboss.weld.bean.proxy.ClientProxyProvider$1.apply(ClientProxyProvider.java:53)
        at org.jboss.weld.bean.proxy.ClientProxyProvider$1.apply(ClientProxyProvider.java:46)
        at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:358)
        at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
        at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
        at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
        at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:396)
        ... 26 more
      Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org/switchyard/component/bean/ReferenceInvoker
        at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:99)
        at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:385)
        at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:275)
        ... 37 more
      Caused by: java.lang.NoClassDefFoundError: org/switchyard/component/bean/ReferenceInvoker
        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_25]
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_25]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_25]
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) [:1.6.0_25]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_25]
        at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_25]
        at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:118)
        at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:95)
        ... 39 more
      Caused by: java.lang.ClassNotFoundException: org.switchyard.component.bean.ReferenceInvoker from [Module "deployment.gateway-msg.ear:main" from Service Module Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]