5 Replies Latest reply on Nov 28, 2011 5:15 PM by Christian Sadilek

    Errai 2.0 + CDI on jboss7 issue (java.lang.NoSuchMethodError)

    slawek t Novice

      Hi, I'm trying to switch from Errai 1.3.1-SNAPSHOT to 2.0-SNAPSHOT but with no success.

      Project compilation without errors, but during deployment on jbossas7.0.2 I receive:

       

      javax.enterprise.event.ObserverException

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

                at java.lang.Class.newInstance0(Class.java:372)

                at java.lang.Class.newInstance(Class.java:325)

                at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:395)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:216)

                at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:390)

                at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40)

                at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:92)

                at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:214)

                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)

                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)

                at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)

                at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:88)

                at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:52)

                at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:43)

                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:380)

                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)

                at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                at java.lang.Thread.run(Thread.java:722)

      Caused by: java.lang.NoSuchMethodError: org.jboss.errai.bus.server.io.ConversationalEndpointCallback.<init>(Ljavax/inject/Provider;Ljava/lang/reflect/Method;Lorg/jboss/errai/bus/client/framework/MessageBus;)V

                at org.jboss.errai.cdi.server.CDIExtensionPoints.createRPCScaffolding(CDIExtensionPoints.java:479)

                at org.jboss.errai.cdi.server.CDIExtensionPoints.subscribeServices(CDIExtensionPoints.java:448)

                at org.jboss.errai.cdi.server.CDIExtensionPoints.afterBeanDiscovery(CDIExtensionPoints.java:311)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:601)

                at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)

                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)

                at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)

                at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)

                at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)

                ... 14 more

       

       

      In pom.xml I have entries:

       


      <dependency>


      <groupId>org.jboss.errai</groupId>


      <artifactId>errai-bus</artifactId>


      <exclusions>



      <exclusion>




      <groupId>junit</groupId>




      <artifactId>junit</artifactId>



      </exclusion>



      <exclusion>




      <artifactId>javax.inject</artifactId>




      <groupId>javax.inject</groupId>



      </exclusion>


      </exclusions>


      <version>2.0-SNAPSHOT</version>

      </dependency>



      <dependency>


      <groupId>org.jboss.errai</groupId>


      <artifactId>errai-ioc</artifactId>


      <exclusions>



      <exclusion>




      <artifactId>jsr250-api</artifactId>




      <groupId>javax.annotation</groupId>



      </exclusion>



      <exclusion>




      <artifactId>javax.inject</artifactId>




      <groupId>javax.inject</groupId>



      </exclusion>


      </exclusions>


      <scope>provided</scope>


      <version>1.3.1-SNAPSHOT</version>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.errai</groupId>


      <artifactId>errai-tools</artifactId>


      <version>2.0-SNAPSHOT</version>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.errai</groupId>


      <artifactId>errai-javax-enterprise</artifactId>


      <version>1.3.0-SNAPSHOT</version>


      <scope>provided</scope>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.errai</groupId>


      <artifactId>errai-weld-integration</artifactId>


      <version>1.3.0-SNAPSHOT</version>

      </dependency>


          <dependency>

              <groupId>org.jboss.errai</groupId>

              <artifactId>jboss7-support</artifactId>

              <version>2.0-SNAPSHOT</version>

          </dependency>




      <dependency>


      <groupId>org.glassfish.web</groupId>


      <artifactId>el-impl</artifactId>


      <version>2.1.2-b04</version>


      <scope>provided</scope>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.weld.servlet</groupId>


      <artifactId>weld-servlet</artifactId>


      <scope>provided</scope>


      <version>1.1.4-Final</version>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.weld</groupId>


      <artifactId>weld-core</artifactId>


      <scope>provided</scope>


      <version>1.1.4-Final</version>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.weld.se</groupId>


      <artifactId>weld-se-core</artifactId>


      <scope>provided</scope>


      <version>1.1.4-Final</version>

      </dependency>

       

       


      <dependency>


      <groupId>org.jboss.weld</groupId>


      <artifactId>weld-spi</artifactId>


      <scope>provided</scope>


      <version>1.1.Final</version>

      </dependency>