4 Replies Latest reply on Apr 11, 2011 11:58 AM by Ranganathan Kaliyur Mannar

    JBoss 5 and facelets

    nitzan tomer Newbie

      hi,


      i'm using the JBoss Developer Studio to create a new seam project and i ran into a problem for which i can't find the answer to..  i searched all over, and i posted a question in the jboss forums for the JBDS and there they said to ask here.. so here it is:


      in the JBDS i create an empty project using the Seam Web Project wizard.
      i'm going with the Dynamic Web Project with Seam 2.0, JBoss 5.0 runtime and keep the other things as they are in the wizard.
      when i try to run this skeleton project i get this:


      ERROR  [compiler] Missing Built-in Tag Libraries! Make sure they are included within the META-INF di
      rectory of Facelets' Jar
      ERROR  [viewhandler] Error Rendering View[/home.xhtml]
      java.lang.NullPointerException
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
           at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
      )
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
      )
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           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:235)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablish
      mentValve.java:126)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishm
      entValve.java:70)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Unknown Source)     



      i have Seam version 2.1.1 and i checked to see if the taglib files are the the META-INF directory of the facelets jar and found some, im not sure what should be there.
      here are the ones that i get: jsf-core, jsf-html, jsf-ui, jstl-core, jstl-fn


      do i miss something or is it something else?


      thanks.

        • 1. Re: JBoss 5 and facelets
          Tomaz Cerar Master

          are you sure you are using seam 2.1.1 with all dependent jars?
          There is was fix to facelet lib to make it work with jboss 5,
          try replacing your facelet jar with one from seam 2.1.1 distro



          cheers,
          tomaz

          • 2. Re: JBoss 5 and facelets
            nitzan tomer Newbie

            oh god, that works!


            i really dont get it!  the only seam i installed is the version 2.1.1!  i have no idea where it took the jsf-facelets.jar file from!  it was the wrong version i just dont know where from.


            any ideas of how i can define where the seam directory is at?


            thanks a lot!

            • 3. Re: JBoss 5 and facelets
              camilo casadiego Newbie

              Use this tag in the web.xml...




              <context-param>
                         <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
                         <param-value>true</param-value>
                   </context-param>




              it worked for me...plus the other solution

              • 4. Re: JBoss 5 and facelets
                Ranganathan Kaliyur Mannar Newbie

                Hi,
                I am having a similar issue - but, I am not getting the NPE. Also, this is intermittent for me and doesn't repeat. I get the exception when I click on the

                <rich:simpleTogglePanel>


                I have tried replacing the facelets jar with 1.1.15.B, but to no avail. When I use the  context param, the application fails to startup. This is a scary issue as this is intermittent.


                Exception trace:



                SEVERE [compiler] Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets' Jar
                WARNING [lifecycle] JSF1053: (Listener: org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(), Phase ID: RENDER_RESPONSE 6,  View ID: /debug.xhtml) Exception thrown during phase-listener execution: javax.el.ELException: //home/ranga/programs/jboss-5.1.0.GA/server/default/deploy/hrms.ear/hrms.war/WEB-INF/lib/jboss-seam-debug.jar/META-INF/debug.xhtml: Property 'execute' not found on type org.jboss.seam.debug.jsf.DebugRedirect
                21:21:49,262 WARNING [lifecycle] com.sun.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:53)
                com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
                com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
                javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
                org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(SeamDebugPhaseListener.java:56)
                com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
                com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
                com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
                org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
                org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
                org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
                org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                java.lang.Thread.run(Thread.java:619)
                



                Thanks,
                Ranga,