5 Replies Latest reply on Feb 18, 2013 8:40 AM by jimmy68

    Problem with Seam 2.3 tag library

    jimmy68 Newbie

      I am trying to upgrade a Seam application to 2.3 with JSF 2, Richfaces 3.3.3, and Facelets1.1.15.B1 to run on JBoss AS 7.1.1.Final.  It deploys but when the login screen loads I get the following stacktrace below.  Even though I get this exception the login screen renders and I am able to login (although I have other problems afterwards).

       

      10:22:17,532 SEVERE [facelets.compiler] (http-localhost-127.0.0.1-8280-1) Error Loading Library: vfs:/C:/Users/a814805/jboss-as-7.1.1.Final/standalone/deployments/invmgmt-gui-4.0.0.ear/invmgmt-webapp-4.0.0.war/WEB-INF/lib/jboss-seam-ui-2.3.0.Final.jar/META-INF/s.taglib.xml: java.io.IOException: Error parsing [vfs:/C:/Users/a814805/jboss-as-7.1.1.Final/standalone/deployments/invmgmt-gui-4.0.0.ear/invmgmt-webapp-4.0.0.war/WEB-INF/lib/jboss-seam-ui-2.3.0.Final.jar/META-INF/s.taglib.xml]:

      at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

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

      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) [richfaces-api-3.3.3.Final.jar:3.3.3.Final]

      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) [richfaces-impl-jsf2-3.3.3.Final.jar:3.3.3.Final]

      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 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.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [richfaces-impl-jsf2-3.3.3.Final.jar:3.3.3.Final]

      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl-jsf2-3.3.3.Final.jar:3.3.3.Final]

      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl-jsf2-3.3.3.Final.jar:3.3.3.Final]

      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl-jsf2-3.3.3.Final.jar:3.3.3.Final]

      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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at gui.shared.util.timing.TimingFilter.doFilter(TimingFilter.java:39) [gui-shared-lib-2.1.1.jar:]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.0.Final]

      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.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.7.0_05]

      Caused by: org.xml.sax.SAXException: Error Handling [vfs:/C:/Users/a814805/jboss-as-7.1.1.Final/standalone/deployments/invmgmt-gui-4.0.0.ear/invmgmt-webapp-4.0.0.war/WEB-INF/lib/jboss-seam-ui-2.3.0.Final.jar/META-INF/s.taglib.xml@4,178]

      at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:376) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:390)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:281)

      at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1643)

      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1921)

      at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:786)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:827)

      at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1141)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

      at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)

      at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)

      at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)

      at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196)

      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555)

      at org.apache.xerces.jaxp.SAXParserImpl.parse(SAXParserImpl.java:289)

      at javax.xml.parsers.SAXParser.parse(Unknown Source) [rt.jar:1.7.0_05]

      at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:407) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]

      ... 52 more

       

      EAR configuration:

       

      EAR

      jboss-seam.jar

      - lib

        - antlr-runtime-3.3.jar

        - commons-beanutils-1.7.0.jar

        - commons-collections-3.2.jar

        - commons-digester-1.8.jar

        - commons-lang-2.1.jar

        - drools-compiler-5.3.3.Final.jar

        - drools-core-5.3.3.Final.jar

        - drools-decisiontables-5.3.3.Final.jar

        - ecj-3.5.1.jar

        - guava-12.0.jar

        - janino-2.5.10.jar

        - jboss-el-1.0_02.CR6.jar

        - jbpm-jpdl-3.2.2.jar

        - jsr173_api-1.0.jar

        - knowledge-api-5.3.3.Final.jar

        - mvel-2.1.0.jar

        - richfaces-api-3.3.3.Final.jar

        - richfaces-impl-jsf2-3.3.3.Final.jar

      WEBAPP

      - WEB-INF

        - lib

          - commons-beanutils-1.7.0.jar

          - commons-collections-3.2.jar

          - commons-digester-1.8.jar

          - commons-lang-2.1.jar

          - cssparser-0.9.5.jar

          - guava-12.0.jar

          - jboss-seam-debug-2.3.0.Final.jar

          - jboss-seam-ui- 2.3.0.Final.jar

          - jsf-facelets-1.1.15.B1.jar

          - jsr305-1.3.9.jar

          - jstl-1.0.jar

          - richfaces-api-3.3.3.Final.jar

          - richfaces-impl-jsf2-3.3.3.Final.jar

         - sac-1.3.jar

       

      jboss-structure.xml:

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

        <deployment>

           <dependencies>

             <module name="org.apache.log4j" export="true"/>

             <module name="org.dom4j" export="true"/>

             <module name="org.apache.commons.logging" export="true"/>

             <module name="org.apache.commons.collections" export="true"/>

             <module name="javax.faces.api" export="true"/>

             <module name="javax.ejb.api"/>

             <module name="org.picketbox"/>

           </dependencies>

        </deployment> 

      </jboss-deployment-structure>

       

      components.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.org/schema/seam/components"
      xmlns:core="http://jboss.org/schema/seam/core"
      xmlns:security="http://jboss.org/schema/seam/security"
      xmlns:components="http://jboss.org/schema/seam/components"
      xmlns:bpm="http://jboss.org/schema/seam/bpm"
      xmlns:persistence="http://jboss.org/schema/seam/persistence"
      xmlns:transaction="http://jboss.org/schema/seam/transaction"
      xmlns:web="http://jboss.org/schema/seam/web"
      xmlns:international="http://jboss.org/schema/seam/international"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:excel="http://jboss.org/schema/seam/excel"
      xmlns:drools="http://jboss.org/schema/seam/drools"
      xsi:schemaLocation="http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd
             http://jboss.org/schema/seam/security http://jboss.org/schema/seam/security-2.3.xsd
             http://jboss.org/schema/seam/components http://jboss.org/schema/seam/components-2.3.xsd
             http://jboss.org/schema/seam/bpm http://jboss.org/schema/seam/bpm-2.3.xsd
             http://jboss.org/schema/seam/transaction http://jboss.org/schema/seam/transaction-2.3.xsd
             http://jboss.org/schema/seam/transaction http://jboss.org/schema/seam/web-2.3.xsd
             http://jboss.org/schema/seam/persistence http://jboss.org/schema/seam/persistence-2.3.xsd
             http://jboss.org/schema/seam/international http://jboss.org/schema/seam/international-2.3.xsd
             http://jboss.org/schema/seam/excel http://jboss.org/schema/seam/excel-2.3.xsd  
             http://jboss.org/schema/seam/drools http://jboss.org/schema/seam/drools-2.3.xsd">

      <!-- 120 second conversation timeout -->
      <core:manager conversation-timeout="120000" concurrent-request-timeout="10000" conversation-id-parameter="cid" />

        <core:init jndi-pattern="java:app/inv-mgmt-app-4.0.0/#{ejbName}" debug="true" distributable="false" transaction-management-enabled="false" />

        <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/InvMgmtSessionFactory" />

        <transaction:ejb-transaction/>

      <security:identity jaas-config-name="inv-mgmt" />

      <event type="org.jboss.seam.notLoggedIn">
        <action execute="#{redirect.captureCurrentView}" />
      </event>

      <event type="org.jboss.seam.postAuthenticate">
        <action execute="#{redirect.returnToCapturedView}" />
      </event>

      <drools:rule-base name="securityRules">
        <drools:rule-files>
         <value>/META-INF/security.drl</value>
        </drools:rule-files>
      </drools:rule-base>

        <component class="org.jboss.seam.transaction.EjbSynchronizations" jndi-name="java:app/jboss-seam/EjbSynchronizations"/>

        <component class="org.jboss.seam.async.TimerServiceDispatcher" jndi-name="java:app/jboss-seam/TimerServiceDispatcher"/>

      </components>

       

      faces-config.xml:

       

      <?xml version='1.0' encoding='UTF-8'?>
      <faces-config version="2.3"
                    xmlns="http://java.sun.com/xml/ns/javaee"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_3.xsd">

      <locale-config>
        <default-locale>en</default-locale>
      </locale-config>

      <application>
        <view-handler>org.ajax4jsf.application.AjaxViewHandler</view-handler>
      </application>

      </faces-config>

       

      web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="3.0"
          xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

          <display-name>Investment Management

       

      GUI</display-name>
         
          <!-- Seam -->
         
          <listener>
              <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
          </listener>
         
          <servlet>
              <servlet-name>Seam Resource Servlet</servlet-name>
              <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
          </servlet>
         
          <servlet-mapping>
              <servlet-name>Seam Resource Servlet</servlet-name>
              <url-pattern>/seam/resource/*</url-pattern>
          </servlet-mapping>
         
          <filter>
              <filter-name>Seam Filter</filter-name>
              <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
          </filter>

          <filter-mapping>
              <filter-name>Seam Filter</filter-name>
              <url-pattern>/*</url-pattern>
          </filter-mapping>

          <!--Configuration for Richfaces-->

          <filter>
              <display-name>RichFaces Filter</display-name>
              <filter-name>richfaces</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>
          </filter>

          <filter-mapping>
              <filter-name>richfaces</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
          </filter-mapping>

          <context-param>
             <param-name>org.richfaces.enableControlSkinning</param-name>
             <param-value>true</param-value>
          </context-param>

          <context-param>
          <param-name>org.richfaces.SKIN</param-name>
          <param-value>invMgmt</param-value>
         </context-param>

          <!-- JSF -->
         
          <context-param>
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
              <param-value>.xhtml</param-value>
          </context-param>

          <context-param>
              <param-name>facelets.VIEW_MAPPINGS</param-name>
              <param-value>*.xhtml</param-value>
          </context-param>

          <context-param>
              <param-name>facelets.SKIP_COMMENTS</param-name>
              <param-value>true</param-value>
          </context-param>

          <context-param>
              <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
              <param-value>com.sun.facelets.FaceletViewHandler</param-value>
          </context-param>

          <context-param>
             <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
             <param-value>true</param-value>
          </context-param>

          <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>*.seam</url-pattern>
          </servlet-mapping>

          <session-config>
              <session-timeout>10</session-timeout>
          </session-config>   

      </web-app>

       

      When I look in the jboss-seam-ui-2.3.0.Final.jar and open the s.taglib.xml I see that the schema is version 2.0.  I think that the facelets compiler cannot parse version 2.0.  I noticed that previous versions of seam had version 1.0.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <facelet-taglib id="s" version="2.0"

          xmlns="http://java.sun.com/xml/ns/javaee"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd">

          <namespace>http://jboss.org/schema/seam/taglib</namespace>

       

      I am considering trying to see if the app can work using JSF 1.2 but I have spent considerable time trying to get this configuration to work.

       

      Thanks for any help on this!

        • 1. Re: Problem with Seam 2.3 tag library
          jimmy68 Newbie

          I attached the source for Facelets and found the SAXParser is giving this exception:

           

          org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 178; Document root element "facelet-taglib", must match DOCTYPE root "null".

          • 2. Re: Problem with Seam 2.3 tag library
            jimmy68 Newbie

            I peeled off another layer of the onion today and I'm crying.  It appears that JBoss 7.1.1.Final has xercesImpl-2.9.1-jbossas-1.jar as a module.  I attached the source and started debugging.  After attempting to follow the code I tried adding the DTD declaration to the s.taglib.xml and it goes further but still blows up in the XMLDTDValidator.  Obviously adding the DTD declaration is a hack.  I will try to figure out if validation can be turned off tomorrow.

            • 3. Re: Problem with Seam 2.3 tag library
              jimmy68 Newbie

              Seam 2.3.0.Final appears that it is not compatible with the earlier version Facelets 1.1.15.  It's tag library is for facelets 2 as you can see from the schema reference.  I did get our current version of Seam 2.1.1 to run with the same configuration in JBoss AS.  I think that Seam 2.2.2 will probably work as well and will check that out when I get time.

              • 4. Re: Problem with Seam 2.3 tag library
                hantsy bai Master

                Fristly, I suggest you update your dependencies...

                1. Use Richfaces 4.3

                2. Remove facelets, JSF includes Facelets natively which is conflict with the one for JSF 1.x.

                 

                Download the seam 2.3 example as reference to upgrade your application.

                 

                Hantsy

                • 5. Re: Problem with Seam 2.3 tag library
                  jimmy68 Newbie

                  Thanks Hantsy,

                   

                  That was the way I went initially and it worked.  The problem was there were too many changes to our application and too little time to get all the pages working.  I can revisit Richfaces 4.3 later this year.

                   

                  Jim