2 Replies Latest reply on May 9, 2014 3:31 PM by Humberto Ferreira da Luz Jr.

    Module classloading not working with JBoss EAP 6.2

    Humberto Ferreira da Luz Jr. Novice

      I added the following dependencies to [JBOSS_HOME]/modules:

       

      [hfluz@hfluz-arch ~]$ tree Servers/jboss-eap-6.2/modules/
      Servers/jboss-eap-6.2/modules/
      ├── com
      │   ├── itextpdf
      │   │   └── itextpdf
      │   │       └── main
      │   │           ├── itextpdf-5.5.0.jar
      │   │           ├── itext-xtra-5.5.0.jar
      │   │           └── module.xml
      │   ├── oracle
      │   │   └── ojdbc
      │   │       └── main
      │   │           ├── module.xml
      │   │           └── ojdbc6.jar
      │   └── rome
      │       └── main
      │           ├── module.xml
      │           └── rome-1.0.jar
      ├── net
      │   └── sf
      │       └── jasperreports
      │           └── jasperreports
      │               └── main
      │                   ├── jasperreports-5.5.1.jar
      │                   └── module.xml
      ├── nl
      │   └── captcha
      │       └── simplecaptcha
      │           └── main
      │               ├── module.xml
      │               └── simplecaptcha-1.2.1.jar
      ├── org
      │   ├── apache
      │   │   ├── commons
      │   │   │   └── fileupload
      │   │   │       └── main
      │   │   │           ├── commons-fileupload-1.3.1.jar
      │   │   │           └── module.xml
      │   │   └── poi
      │   │       └── main
      │   │           ├── module.xml
      │   │           └── poi-3.10-FINAL.jar
      │   ├── omnifaces
      │   │   └── main
      │   │       ├── module.xml
      │   │       └── omnifaces-1.7.jar
      │   └── primefaces
      │       └── main
      │           ├── module.xml
      │           └── primefaces-5.0.jar
      
      

       

      I changed those libraries to provided in my webapp pom.xml. I also added a jboss-deployment-structure.xml file to my WEB-INF folder:

       

      <jboss-deployment-structure>
          <deployment>
              <dependencies>
                  <module name="nl.captcha.simplecaptcha"/>
                  <module name="org.primefaces"/>
                  <module name="org.omnifaces"/>
                  <module name="com.itextpdf.itextpdf"/>
              </dependencies>
              <resources>
                  <resource-root path="."/>
              </resources>
          </deployment>
      </jboss-deployment-structure>
      
      

       

      I deployed my webapp to JBoss and it worked with no errors. I thought I had succeeded at adding those libraries as modules, but when I accessed my application I got:

       

      javax.el.ELException: JBWEB006009: Function ''p:remoteUser'' not found
      org.apache.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:209)
      org.apache.el.parser.SimpleNode.accept(SimpleNode.java:148)
      org.apache.el.parser.SimpleNode.accept(SimpleNode.java:151)
      org.apache.el.parser.SimpleNode.accept(SimpleNode.java:151)
      org.apache.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:166)
      org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:184)
      org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:226)
      org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
      org.jboss.weld.util.el.ForwardingExpressionFactory.createValueExpression(ForwardingExpressionFactory.java:49)
      org.jboss.weld.el.WeldExpressionFactory.createValueExpression(WeldExpressionFactory.java:50)
      com.sun.faces.facelets.el.ELText$ELTextVariable.apply(ELText.java:203)
      com.sun.faces.facelets.compiler.AttributeInstruction.apply(AttributeInstruction.java:101)
      com.sun.faces.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:141)
      javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:116)
      javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:166)
      com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
      com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
      com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
      com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:116)
      javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
      javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:166)
      com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
      com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
      com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
      com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:116)
      javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
      javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
      com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
      com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
      com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
      com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
      com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
      com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
      com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:902)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      
      

       

      I also tried adding this to my standalone.xml instead of using jboss-deployment-structure.xml file:

       

      <subsystem xmlns="urn:jboss:domain:ee:1.1">
        <global-modules>
        <module name="nl.captcha.simplecaptcha" slot="main" />
        <module name="org.primefaces" slot="main" />
        <module name="org.omnifaces" slot="main" />
        <module name="com.itextpdf.itextpdf" slot="main" />
        <module name="org.apache.poi" slot="main" />
        <module name="com.rome" slot="main" />
         </global-modules>
      
      

       

      But nothing changes, I can still deploy to jboss, but the application doesn't work.

       

      If I remove p:remoteUser from my code I get no errors, but the JSF components are not rendered.

       

      Am I missing something?