ICEfaces
  1. ICEfaces
  2. ICE-1322

TldLocationsCache.getUriFromTld() throws an NPE trying to load struts jars

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6DR#2, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      any

      Description

      INFO - parseXMLDocument uri=file:/C:/dev/snippets/icefaces/samples/component-showcase/web/WEB-INF/lib/struts-menu-1.2.jar - com.icesoft.jasper.xmlparser.ParserUtils
       INFO - - com.icesoft.jasper.compiler.TldLocationsCache
       java.lang.NullPointerException
        at com.icesoft.jasper.compiler.TldLocationsCache.getUriFromTld(TldLocationsCache.java:451)
        at com.icesoft.jasper.compiler.TldLocationsCache.scanJar(TldLocationsCache.java:349)
        at com.icesoft.jasper.compiler.TldLocationsCache.scanJars(TldLocationsCache.java:508)
        at com.icesoft.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:240)
        at com.icesoft.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:215)
        at com.icesoft.faces.webapp.parser.JspPageToDocument.getTldInputStream(JspPageToDocument.java:404)
        at com.icesoft.faces.webapp.parser.JsfJspDigester.startPrefixMapping(JsfJspDigester.java:99)
        at org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1586)
        at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:122)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:550)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:402)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
        at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
        at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:595)
       

      suggested fix:
      check if tld is null
              ... TldLocationsCache: 447
              TreeNode tld = new ParserUtils().parseXMLDocument(resourcePath, in);
              if( tld != null ){
                  TreeNode uri = tld.findChild("uri");
                  if (uri != null) {
                      String body = uri.getBody();
                      if (body != null)
                          return body;
                  }
              }

              return null;

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #13381 Sat Mar 10 16:25:48 MST 2007 philip.breau ICE-1322 checking for null tld to allow compatibility with
        struts jars
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/jasper/compiler/TldLocationsCache.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: