10 Replies Latest reply on Jun 24, 2008 9:19 PM by peterj

    Unable to read TLD "META-INF/tld/struts-bean.tld"

    naturei27

      Hey y'all........we're trying to deploy this particular website in JBoss Web 2.1 and we're getting the following error:

      org.apache.jasper.JasperException: Unable to read TLD "META-INF/tld/struts-bean.tld" from JAR file "file:/C:/Program%20Files/JBoss.org/JBoss%20Web%202.1/webapps/crashapp/WEB-INF/lib/struts-taglib-1.3.8.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei
      org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
      org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
      org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181)
      org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:182)
      org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
      org.apache.jasper.compiler.Parser.parseDirective(Parser.java:482)
      org.apache.jasper.compiler.Parser.parseElements(Parser.java:1432)
      org.apache.jasper.compiler.Parser.parse(Parser.java:133)
      org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
      org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
      org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:168)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:307)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:287)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:274)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:584)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      The interesting thing about this is that the application runs fine in Apache Tomcat 5.x but gets killed as soon as we run it in JBoss; also, one other thing that I forgot to mention is that another similar .war file deploys in JBoss........

      Please give us a solution for this quandry...........

        • 1. Re: Unable to read TLD
          peterj

          First, I would get JBossWeb out of "Program Files", and out of "JBoss Web 2.1". Paths with spaces tend to cause fits for various Java libraries.

          Second, what JDK are you using? If you are using 1.6, try using 1.5.

          • 2. Re: Unable to read TLD
            naturei27

            Peter, may I remind you that a similar war file runs fine in JBoss with JDK version 1.6; the war file in question actually deploys in Tomcat, but fails in JBoss.......therein, as the bard would say, lies the rub........Please give us an alternate solution........when you're free, of course......

            • 3. Re: Unable to read TLD
              jaikiran

              Did you try what Peter suggested:

              First, I would get JBossWeb out of "Program Files", and out of "JBoss Web 2.1". Paths with spaces tend to cause fits for various Java libraries.


              • 4. Re: Unable to read TLD
                naturei27

                 

                "jaikiran" wrote:
                Did you try what Peter suggested:

                First, I would get JBossWeb out of "Program Files", and out of "JBoss Web 2.1". Paths with spaces tend to cause fits for various Java libraries.


                I tried to do that, but when I stopped the JBoss server and moved that folder, some of the files did move to the specified location.........still in a fix..........

                • 5. Re: Unable to read TLD
                  naturei27

                  sorry, that should read "did not move to the specific location"...........

                  • 6. Re: Unable to read TLD
                    naturei27

                    we tried both your suggestions Peter..........still no go.........any more suggestions.......

                    • 7. Re: Unable to read TLD
                      peterj

                      Sorry, but I still trying to determine if I am free...

                      • 8. Re: Unable to read TLD
                        naturei27

                        ok..........

                        • 9. Re: Unable to read TLD
                          naturei27

                          Anyone else who wants to take a crack at it...........?????????........

                          • 10. Re: Unable to read TLD
                            peterj

                            As far as I can tell from the source code (which by the way, throws away the original exception and prints this exception instead (I hate it when someone does that, it makes debugging a problem ten times more difficult that what it needs to be)), the root exception text is "Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei". So the question is, where in the WAR is this class located?

                            For the "similar" WAR that works correctly, where is this same class located? And in which JSP is it being invoked? How does the working JSP differ from the non-working JSP (if at all)?

                            Is there an order in which the WARs are invoked? In other words, is the WAR which works accessed first and then the WAR which does not work is accessed? (Note that I am assuming that both WARs are deployed to the exact same JBoss Web instance, let me know if that assumption is incorrect.)

                            Are the WARs deployed as WAR files, or as exploded directories? If as WAR files, does the app work if you deploy the non-working WAR as an exploded directory?

                            If none of these hints lead to a solution, try this. Deploy only the working WAR, and run JBoss Web with the "-verbose:class" JVM option (make sure your remove the server/default/tmp and server/default/work directories). Access the JSP that uses the CookieTei class and note from where the CookieTei class is loaded. Shut JBoss Web down and repeat these steps for the non-working WAR. The "-verbose:class" output should give some hint as to what the differences are (such as in the non-working version some struts class are loaded from an unexpected location).

                            Now I know that all of this probably sounds stupid and inane, but each question I ask or suggestion I make is there to narrow down the possible causes of the problem. In my first response I went with the common causes (spaces in path names, using JDK 1.6) that prevent things that usually work from working. So I was not trying to waste your time, nor put you off. I have gone through too many of these debugging sessions where the poster failed to state that they were using JDK 6 or installed to Program Files, and that turned out to be the root cause. So when I saw you deployed to Program Files, having you get out of there was of course my first reaction.