3 Replies Latest reply on Jun 20, 2013 12:32 PM by bsl.lacerda

    Jboss-6.0.0.Final - Taglib.tld error

    ab_99

      I just upgraded my jboss as to Jboss-6.0.0.Final. I am getting the following error on server startup -

       

      Caused by: org.xml.sax.SAXException: Element type "deferred-value" must be declared. @ vfs:///C:/Tools/jboss-6.0.0.Final/server/Curve600/deploy/100test.ear/Test.war/WEB-INF/taglib.tld[19,20]

                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.error(SaxJBossXBParser.java:416) [jbossxb.jar:2.0.3.GA]

                at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.Final]

                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:209) [jbossxb.jar:2.0.3.GA]

                ... 52 more

       

       

      My taglib.tld file is as follows -

       

      <?xml version="1.0" encoding="ISO-8859-1"?>

      <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"

                              "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

      <taglib>

      <tlib-version>1.2</tlib-version>

      <jsp-version>2.1</jsp-version>

      <short-name>test</short-name>

      <uri>http://ui.test.com/jsftaglib</uri>

      <description>A tag library used for custom components and renderers</description>

      <tag>

        <name>menu</name>

        <tag-class>com.common.taglib.MenuTag</tag-class>

        <body-content>JSP</body-content>

        <attribute>

         <name>id</name>

        </attribute>

        <attribute>

         <name>styleClass</name>

         <deferred-value><type>java.lang.Object</type></deferred-value>  [[[[[[[[[ --> The error occurs here. ]]]]]]]]]]]]]

        </attribute>

      </tag>

      <tag>..........................

       

       

      I have no idea about how the taglib.tld works and tried searching for a solution in vain. My hunch is that Jboss-6.0.0.Final does not like the dtd that I have specified right at the top of the file; since the validation is strict and fails.

       

      --Anurag

        • 1. Re: Jboss-6.0.0.Final - Taglib.tld error
          jaikiran

          The http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd does not allow a deferred-value element in the tld. So you'll have to fix that tld by removing that element (or using a dtd which supports it).

          • 2. Re: Jboss-6.0.0.Final - Taglib.tld error
            ab_99

            @jaikiran: Thanks for your help.

            • 3. Re: Jboss-6.0.0.Final - Taglib.tld error
              bsl.lacerda

              Hi jaikiran!

               

              I'm migrating an App from JBoss AS 4 to JBoss EAP 6.1 and I'm getting the following error on Parse phase:

               

              0:14,057 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."stok-1.0-web.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."stok-1.0-web.war".PARSE: JBAS018733: Falha ao proceder com a fase PARSE do deployment "stok-1.0-web.war"

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_24]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_24]

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

              Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018014: Falha ao pesquisar o descritor XML "/C:/REDHAT/APPS/eap-6.1.0/jboss-eap-6.1/standalone/deployments/stok-1.0-web.war/WEB-INF/tlds/stok.tld" no [17,19]

                  at org.jboss.as.web.deployment.TldParsingDeploymentProcessor.parseTLD(TldParsingDeploymentProcessor.java:143)

                  at org.jboss.as.web.deployment.TldParsingDeploymentProcessor.processTlds(TldParsingDeploymentProcessor.java:122)

                  at org.jboss.as.web.deployment.TldParsingDeploymentProcessor.deploy(TldParsingDeploymentProcessor.java:101)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

               

              and here is my .tld file content:

               

              <?xml version="1.0" encoding="ISO-8859-1" ?>

              <!DOCTYPE taglib

                PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"

                "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

               

              <taglib>

               

                  <tlib-version>1.0</tlib-version> 

                  <jsp-version>1.2</jsp-version>

                  <short-name>stok-tld</short-name> 

                  <uri>http://www.ecosistemas.com.br/stok.tld</uri>

                  <description>Pattern - Custom Tag Helper</description>

                 

                  <tag >   

                        <name>tipomovimentacao</name>   

                        <tag-class>eco.stok.web.customtaghelper.TipoMovimentacaoTag</tag-class>   

                        <body-content>none</body-content>  [According to the StackTrace the error goes here!]

                        <attribute>  

                            <name>operacao</name>

                            <required>true</required>     

                            <rtexprvalue>true</rtexprvalue>   

                            <type>java.lang.Integer</type>

                        </attribute>

                        <attribute>  

                            <name>consulta</name>

                            <required>false</required>     

                            <rtexprvalue>true</rtexprvalue>   

                            <type>java.lang.Boolean</type>

                        </attribute>

                  </tag>

                 

                  <tag>   

                        <name>deposito</name>   

                        <tag-class>eco.stok.web.customtaghelper.DepositoTag</tag-class>   

                        <body-content>none</body-content>   

                        <attribute>  

                            <name>acesso</name>

                            <required>true</required>     

                            <rtexprvalue>true</rtexprvalue>   

                            <type>java.lang.String</type>

                        </attribute>

                       

                  </tag>

                 

                  <tag>   

                        <name>estruturaclassificacao</name>   

                        <tag-class>eco.stok.web.customtaghelper.EstruturaClassificacaoTag</tag-class>   

                        <body-content>none</body-content>   

                        <attribute>

                            <name>estruturaClassificacaoId</name>

                            <required>false</required>     

                            <rtexprvalue>true</rtexprvalue>   

                            <type>java.lang.Integer</type>

                        </attribute>         

                  </tag>

                     

              </taglib>

               

              According to the http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd, the element is supported, so i don't have no idea on how to fix the error.

               

              Could you help me?

               

              Thanks in advance.