Dropping here my conclusion for the record, and hoping it will be useful to another happy OWB user with the same config.

I switched from
    MyFaces 2.1.13 / CODI 1.0.5 / OpenWebBrans 1.1.6
to
    MyFaces 2.1.13 / CODI 1.0.5 / OpenWebBrans 1.2.0

I am using this stack on a "stock" Tomcat 7 (by opposition to TomEE).

This solved the problem OWB 1.1.6 had with jars with "##" in filename (because of a scannotation bug).

Formerly, I had dependencies on the following maven artifacts (all in org.apache.openwebbeans group) :
- openwebbeans-impl
- openwebbeans-jsf
- openwebbeans-web
- openwebbeans-resource

All dependencies were like :
     <dependency>
      <groupId>org.apache.openwebbeans</groupId>
       <artifactId>${artifactName}</artifactId>
       <version>1.1.6</version>
       <scope>runtime</scope>
     </dependency>

Javassist 3.12 and 3.16 are dependencies of other packages and available in classpath.

With 1.2, I have now the following dependencies :
- openwebbeans-impl
- openwebbeans-jsf
- openwebbeans-web
- openwebbeans-el22
- openwebbeans-tomcat7

I am not really sure that openwebbeans-tomcat7 is required, but it does no harm.

I also added a dependency on xbean-asm4-shaded

<dependency>
  <groupId>org.apache.xbean</groupId>
   <artifactId>xbean-asm4-shaded</artifactId>
   <version>3.15</version>
</dependency>

My web.xml and faces.xml files are unchanged. web.xml contains :

  <!-- Listener for OpenWebBeans configuration -->
  <listener>
    <listener-class>
      org.apache.webbeans.servlet.WebBeansConfigurationListener
    </listener-class>
  </listener>

and

  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
  </servlet-mapping>

(among a lot of other unrelated stuff of course ^_^).

It might be important to note that this new setup refused to work until I performed a full clean. By "full clean" I not only mean a "mvn clean install" on all your packages and undeploy/deploy your webapp, but also a "rm -rf *" in all your temp directories (in my case rm -rf /opt/apache-tomcat-7.0.32/temp/*). Before that, I had various exceptions, most related to CODI initialisation.

Hope this will help other users !

Best regards,

Ludovic

|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|

Reply via email to