myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic PĂ©net <l.pe...@senat.fr>
Subject Problem with CODI/OWB and PrimeFaces 3.2
Date Thu, 05 Apr 2012 16:28:17 GMT
Dear all,

I experience a very strange (at least to me) problem when using
PrimeFaces 3.2 ( http://www.primefaces.org/ ) in combination with CODI,
OWB and of course MyFaces.

I stripped down my code to a simple example only using :
* MyFaces 2.0.11
* PrimeFaces 3.2 (same with 3.1.1) 
* (CODI 1.0.4)
* (OpenWebBeans 1.1.3)
* Tomcat 6.0.33

and not using any CDI related feature.

The very same example works when I do not add CODI and OWB related
dependencies in my project pom.xml (and I remove the listener
configuration from web.xml).

When I add them, I get the following exception :
05/04/2012 17:59:41 fr.senat.faces.exceptions.DetailedExceptionHandler
INFO  [DetailedExceptionHandler.java:44] [http-8080-6] - Exception level
0 : NoClassDefFoundError - message: javax/el/ValueReference
05/04/2012 17:59:41 fr.senat.faces.exceptions.DetailedExceptionHandler
INFO  [DetailedExceptionHandler.java:45] [http-8080-6] - Stack trace:
java.lang.NoClassDefFoundError: javax/el/ValueReference
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getDeclaredMethod(Class.java:1935)
        at
java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1382)
        at java.io.ObjectStreamClass.access
$1700(ObjectStreamClass.java:52)
        at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:438)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1114)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at
org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.writeExternal(ContextAwareTagValueExpression.java:201)
        at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at java.util.HashMap.writeObject(HashMap.java:1001)
        at sun.reflect.GeneratedMethodAccessor3320.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at
org.apache.myfaces.shared.util.StateUtils.getAsByteArray(StateUtils.java:273)
        at
org.apache.myfaces.shared.util.StateUtils.construct(StateUtils.java:235)
        at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getViewState(HtmlResponseStateManager.java:312)
        at
javax.faces.application.StateManager.getViewState(StateManager.java:239)
        at
org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialRendering(PartialViewContextImpl.java:524)
        at
org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:363)
        at
javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:88)
        at
javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:393)
        at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:630)
        at
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1548)
        at
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:264)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
        at
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
        at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:115)
        at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
        at
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.render(CodiLifecycleWrapper.java:126)
        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
fr.senat.faces.filters.HibernateSessionConversationFilter.doFilter(HibernateSessionConversationFilter.java:81)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:602)
        at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: javax.el.ValueReference
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        ... 76 more

05/04/2012 17:59:41 fr.senat.faces.exceptions.DetailedExceptionHandler
INFO  [DetailedExceptionHandler.java:44] [http-8080-6] - Exception level
1 : ClassNotFoundException - message: javax.el.ValueReference
05/04/2012 17:59:41 fr.senat.faces.exceptions.DetailedExceptionHandler
INFO  [DetailedExceptionHandler.java:45] [http-8080-6] - Stack trace:
java.lang.ClassNotFoundException: javax.el.ValueReference
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getDeclaredMethod(Class.java:1935)
        at
java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1382)
        at java.io.ObjectStreamClass.access
$1700(ObjectStreamClass.java:52)
        at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:438)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1114)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at
org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.writeExternal(ContextAwareTagValueExpression.java:201)
        at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at java.util.HashMap.writeObject(HashMap.java:1001)
        at sun.reflect.GeneratedMethodAccessor3320.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at
org.apache.myfaces.shared.util.StateUtils.getAsByteArray(StateUtils.java:273)
        at
org.apache.myfaces.shared.util.StateUtils.construct(StateUtils.java:235)
        at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getViewState(HtmlResponseStateManager.java:312)
        at
javax.faces.application.StateManager.getViewState(StateManager.java:239)
        at
org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialRendering(PartialViewContextImpl.java:524)
        at
org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:363)
        at
javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:88)
        at
javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:393)
        at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:630)
        at
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1548)
        at
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:264)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
        at
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
        at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:115)
        at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
        at
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.render(CodiLifecycleWrapper.java:126)
        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
fr.senat.faces.filters.HibernateSessionConversationFilter.doFilter(HibernateSessionConversationFilter.java:81)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:602)
        at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)

It seems normal not to have javax.el.ValueReference on Tomcat 6.
However, why using CODI/OWB triggers such behaviour ? And what should I
do ?

I declare CODI/OWB dependencies the following way :

<!-- MyFaces CODI -->
    <!-- the JSF independent core -->
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
      <artifactId>myfaces-extcdi-core-api</artifactId>
      <version>${codi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
      <artifactId>myfaces-extcdi-core-impl</artifactId>
      <version>${codi.version}</version>
      <scope>runtime</scope>
    </dependency>

    <!-- CODI pour JSF 2.0 ou 2.1-->
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
      <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>
      <version>${codi.version}</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
      <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>
      <version>${codi.version}</version>
      <scope>runtime</scope>
    </dependency>

    <!-- CODI JPA-1.0 Module -->
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
      <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>
      <version>${codi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
      <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>
      <version>${codi.version}</version>
      <scope>runtime</scope>
    </dependency>

    <!-- Specifications -->
    <!-- JSR-330 -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-atinject_1.0_spec</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
    </dependency>
    
    <!-- JSR-299 -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jcdi_1.0_spec</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jta_1.1_spec</artifactId>
      <version>1.1.1</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-interceptor_1.1_spec</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-validation_1.0_spec</artifactId>
      <version>1.1</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jpa_1.0_spec</artifactId>
      <version>1.1.2</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-servlet_2.5_spec</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-el_1.0_spec</artifactId>
      <version>1.0.2</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>

    <!-- OpenWebBeans -->
    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-impl</artifactId>
      <version>${openwebbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-jsf</artifactId>
      <version>${openwebbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-web</artifactId>
      <version>${openwebbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-spi</artifactId>
      <version>${openwebbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-resource</artifactId>
      <version>${openwebbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-tomcat6</artifactId>
      <version>${openwebbeans.version}</version>
      <scope>runtime</scope>
    </dependency>


Thanks in advance,

Ludovic
PS : I also requested help on the PF forum :
http://forum.primefaces.org/viewtopic.php?f=3&t=20106



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

Mime
View raw message