1 Reply Latest reply on Oct 3, 2011 8:38 AM by hmomon

    JBoss AS 7.0.1 JSP Tag Lib Problem

    hmomon

      Hi All,

       

      I managed to deploy my enterprise application to JBoss AS 7.0.1 successfully.  I can access all the JSP pages successfully too.  However, when I access a specific JSP page that contain a tag lib reference I got the following problem (stack trace is shown below).

       

      servlet jsp threw exception: org.apache.jasper.JasperException: File "/myTagLib.tld" not found

       

      The tag lib declaration is:

       

      <%@ taglib uri="/myTagLib.tld" prefix="mytaglib"%>

       

      The JSP page and the tag lib files are in the SAME WEB ROOT directory.  When I removed the above entry, then JSP works fine. 

       

      The enterprise application and JSP are working fine in Jboss 4.2.3 and JBoss 5.1. 

       

      Does anyone encountered similar problem and know how to resolve it?

       

      Many Thanks,

       

      My environment:

       

      17:03:30,531 DEBUG [org.jboss.as.config] Configured system properties:

          java.class.path = C:\jboss-as-web-7.0.1.Final\jboss-modules.jar

          java.class.version = 50.0

          java.endorsed.dirs = C:\Program Files\Java\jdk1.6.0_22\jre\lib\endorsed

          java.ext.dirs = C:\Program Files\Java\jdk1.6.0_22\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext

          java.home = C:\Program Files\Java\jdk1.6.0_22\jre

          java.io.tmpdir = C:\DOCUME~1\halim\LOCALS~1\Temp\

          java.library.path = C:\Program Files\Java\jdk1.6.0_22\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\APPS\PD6DK;C:\SQL;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\ManageSoft\Common;C:\Program Files\Windows Imaging\;C:\PROGRA~1\cvsnt;C:\Program Files\Sybase\Shared\PowerBuilder\;C:\Program Files\Enterprise Vault\EVClient\;C:\SQL;C:\APPS\pb6dk

          java.runtime.name = Java(TM) SE Runtime Environment

          java.runtime.version = 1.6.0_22-b04

          java.specification.name = Java Platform API Specification

          java.specification.vendor = Sun Microsystems Inc.

          java.specification.version = 1.6

          java.version = 1.6.0_22

          java.vm.info = mixed mode

          java.vm.name = Java HotSpot(TM) Server VM

          java.vm.specification.name = Java Virtual Machine Specification

          java.vm.specification.vendor = Sun Microsystems Inc.

          java.vm.specification.version = 1.0

          java.vm.vendor = Sun Microsystems Inc.

          java.vm.version = 17.1-b03

          jboss.home.dir = C:\jboss-as-web-7.0.1.Final

          jboss.modules.dir = C:\jboss-as-web-7.0.1.Final\modules

          jboss.server.base.dir = C:\jboss-as-web-7.0.1.Final\standalone

          jboss.server.config.dir = C:\jboss-as-web-7.0.1.Final\standalone\configuration

          jboss.server.data.dir = C:\jboss-as-web-7.0.1.Final\standalone\data

          jboss.server.deploy.dir = C:\jboss-as-web-7.0.1.Final\standalone\data\content

          jboss.server.log.dir = C:\jboss-as-web-7.0.1.Final\standalone\log

          jboss.server.name = celgglc72s

          jboss.server.temp.dir = C:\jboss-as-web-7.0.1.Final\standalone\tmp

       

       

      My Stack Trace:

       

      17:06:36,024 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-3) Quartz Scheduler v.1.5.2 created.

      17:06:36,040 INFO  [org.quartz.simpl.RAMJobStore] (MSC service thread 1-3) RAMJobStore initialized.

      17:06:36,040 INFO  [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-3) Quartz scheduler 'schedulerFactory' initialized from an externally provided properties instance.

      17:06:36,040 INFO  [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-3) Quartz scheduler version: 1.5.2

      17:06:36,040 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-3) JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@f8e761

      17:06:36,040 INFO  [org.springframework.context.support.DefaultLifecycleProcessor] (MSC service thread 1-3) Starting beans in phase 2147483647

      17:06:36,040 INFO  [org.springframework.scheduling.quartz.SchedulerFactoryBean] (MSC service thread 1-3) Starting Quartz Scheduler now

      17:06:36,040 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-3) Scheduler schedulerFactory_$_NON_CLUSTERED started.

      17:06:36,040 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-3) Root WebApplicationContext: initialization completed in 6297 ms

      17:06:36,055 INFO  [org.jboss.web] (MSC service thread 1-3) registering web context: /myWebApp

      17:06:36,071 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Replaced deployment "myWebApp.ear" with deployment "myWebApp.ear"

      17:06:42,977 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myWebApp].[jsp]] (http--172.21.3.33-8080-1) Servlet.service() for servlet jsp threw exception: org.apache.jasper.JasperException: File "/myTagLib.tld" not found

          at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:177) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:448) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1398) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Parser.parse(Parser.java:130) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:360) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

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

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

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

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

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

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

          at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]

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

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

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

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

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

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

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

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

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

        • 1. Re: JBoss AS 7.0.1 JSP Tag Lib Problem
          hmomon

          I managed to resolve this problem.

           

          1.  I moved the file 'myTagLib.tld' from the web root directory to /WEB-INF/myTagLib.tld

          2.  Add a taglib entry in the web.xml like shown below:

           

               <taglib uri="/myTagLib.tld" location="/WEB-INF/myTagLib.tld">

           

          Cheers,