1 Reply Latest reply on Sep 12, 2013 1:16 PM by Francisco Borges

    WAR_BUNDLES_JSF_IMPL issue when rendering facelets

    Tim Simpson Newbie

      I am in the process of converting an old JSF1.2 web application that ran on JBoss 4.2 to work on JBoss AS7.  I have got the web application to deploy finally, but I am running into a problem with the rendering of the Login page which uses JSF and facelets.  I get the following error in my log when it goes to render the Login page.

       

      11:23:01,584 INFO  [org.jboss.web] (MSC service thread 1-6) JBAS018210: Registering web context: /Addm

      11:23:01,725 INFO  [org.jboss.as.server] (management-handler-thread - 33) JBAS018562: Redeployed "ADDMEAR.ear"

      11:23:01,726 INFO  [org.jboss.as.server] (management-handler-thread - 33) JBAS018565: Replaced deployment "ADDMEAR.ear" with deployment "ADDMEAR.ear"

      11:23:34,239 INFO  [facelets.compiler] Added Library from: jar:file:/C:/Development/AppServers/jboss-as-7.1.1.Final/modules/com/sun/jsf-impl/main/jsf-impl-2.1.7-jbossorg-2.jar!/META-INF/mojarra_ext.taglib.xml

      11:23:34,243 INFO  [facelets.compiler] Added Library from: vfs:/C:/Development/AppServers/jboss-as-7.1.1.Final/bin/content/ADDMEAR.ear/Web.war/WEB-INF/lib/jsf-impl-1.2_15.jar/META-INF/mojarra_ext.taglib.xml

      11:23:34,245 SEVERE [facelets.compiler]  Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets' Jar

      11:23:34,680 SEVERE [facelets.viewhandler] Error Rendering View[/Login/index.xhtml]: java.lang.NullPointerException

          at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) [jsf-facelets.jar:1.1.14]

          at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25) [jsf-facelets.jar:1.1.14]

          at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95) [jsf-facelets.jar:1.1.14]

          at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524) [jsf-facelets.jar:1.1.14]

          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567) [jsf-facelets.jar:1.1.14]

          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106) [jsf-extensions-dynamic-faces-0.1-SNAPSHOT.jar:0.1-SNAPSHOT-rc8]

          at mil.ekm.addm.jsf.lifecycle.ADDMLifecycle.render(ADDMLifecycle.java:117) [Web-2.0b.jar:]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341) [tomahawk12-1.1.9.jar:1.1.9]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_33]

       

      As you can see I get a NullPointerException in the jsf-facelets library.  I am including all the jars that we included in the original project that ran on JBoss 4.2 so I don't think I am actually missing any needed jars.  What makes me worry is that jsf-impl-2.1.7-jbossorg-2.jar is in the stack trace and not jsf-impl-1.2_15.jar which is the jsf I include in the war file.  It shows that both are loaded, but it uses the 2.1.7 version instead of the 1.2 version even though I specify WAR_BUNDLES_JSF_IMPL as true.  I believe this is why the facelets jar throws an exception.  It is expecting the 1.2 jsf jar.  What else can I do to make JBoss use the correct jar when rendering?