Problems with Vaadin CDI

Hi,

I am using CDIUI and I get an exception on code that originally worked.

Jan 02, 2017 1:00:46 PM com.vaadin.server.DefaultErrorHandler doDefault
SEVERE:
java.lang.NoSuchMethodError: com.vaadin.util.CurrentInstance.set(Ljava/lang/Class;Ljava/lang/Object;)Lcom/vaadin/util/CurrentInstance;
at com.vaadin.cdi.CDIUIProvider.createInstance(CDIUIProvider.java:100)
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:191)
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)

My platform is:

  • Apache Tomcat (TomEE)/8.5.6 (7.0.2)
  • cdi api 1.2
  • cdi helpers 1.14
  • deltaspike-core-api-1.7.2
  • deltaspike-core-impl-1.7.2
  • vaadin-cdi-2.0-SNAPSHOT
  • vaadin 7.6.6
  • viritin 1.61

Any help would be appreciated.

Best,

JG

Please try vaadin-cdi 1.0.X. 2.0 is for Vaadin 8 IMHO.

I got this working with the following dependencies:

<dependency>
    <groupId>javax.enterprise</groupId>
    <artifactId>cdi-api</artifactId>
    <scope>provided</scope>
    <version>1.2</version>
 </dependency>
 
 <dependency>
     <groupId>org.apache.openejb</groupId>
      <artifactId>openejb-core</artifactId>
      <version>5.0.0-SNAPSHOT</version>
    <scope>provided</scope>
 </dependency> 

  <dependency>
   <groupId>org.apache.tomee</groupId>
   <artifactId>javaee-api</artifactId>
   <version>7.0</version>
   <scope>provided</scope>
</dependency>