You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Cory Isaacson <ci...@capita2.com> on 2000/12/18 20:40:29 UTC

Code Problem

I am creating some StylesheetRoot objects for later use. When I run them I get the stacktrace below. Any idea what the problem is?

Thanks in advance for any assistance.

Cory

Here is the code I use to initially create the StylesheetRoot object:

      XSLTProcessor xsltProcessor = XSLTProcessorFactory.getProcessor();

      stylesheetRoot = xsltProcessor.processStylesheet(xslFileName);

Here is the code to process the SylesheetRoot object:

    XSLTProcessor xsltProcessor = XSLTProcessorFactory.getProcessor();

    /* Process the stylesheet.*/
    xsltProcessor.setStylesheet(xsltAdminTableMenu);
    xsltAdminTableMenu.process(new XSLTInputSource(moduleDescriptorDoc),
      new XSLTResultTarget(printWriter));

Here is the stacktrace:

Root Error-1: 
org.apache.xalan.xslt.XSLProcessorException: at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at org.xml.sax.SAXException.(SAXException.java:45) at org.apache.xalan.xpath.XPathException.(XPathException.java:92) at org.apache.xalan.xslt.XSLProcessorException.(XSLProcessorException.java:77) at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1676) at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1568) at org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:826) at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:271) at com.surgetech.framework.gui.AdminModule.getAdminTableMenuHTML(AdminModule.java:603) at D_0003a.WebSphere.AppServer.hosts.d_00025fault_0005fhost.fwguidemo.web.admListSelectTable_jsp_1._jspService(admListSelectTable_jsp_1.java:124) at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:144) at javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:115) at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:443) at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:553) at javax.servlet.http.HttpServlet.service

Re: Code Problem

Posted by Gary L Peskin <ga...@firstech.com>.
> Cory Isaacson wrote:
> 
> I am creating some StylesheetRoot objects for later use. When I run
> them I get the stacktrace below. Any idea what the problem is?
> 
> Thanks in advance for any assistance.
> 
> Cory
> 
> Here is the code I use to initially create the StylesheetRoot object:
> 
>       XSLTProcessor xsltProcessor =
> XSLTProcessorFactory.getProcessor();
> 
>       stylesheetRoot = xsltProcessor.processStylesheet(xslFileName);
> 
> Here is the code to process the SylesheetRoot object:
> 
>     XSLTProcessor xsltProcessor = XSLTProcessorFactory.getProcessor();
> 
>     /* Process the stylesheet.*/
>     xsltProcessor.setStylesheet(xsltAdminTableMenu);
>     xsltAdminTableMenu.process(new
> XSLTInputSource(moduleDescriptorDoc),
>       new XSLTResultTarget(printWriter));
> Here is the stacktrace:
> 
> Root Error-1:
> org.apache.xalan.xslt.XSLProcessorException: at
> java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled
> Code) at org.xml.sax.SAXException.(SAXException.java:45) at
> org.apache.xalan.xpath.XPathException.(XPathException.java:92) at
> org.apache.xalan.xslt.XSLProcessorException.(XSLProcessorException.java:77)
> at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1676)
> at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1568)
> at
> org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:826)

...

Cory --

It's difficult to tell exactly what's going on here because it doesn't
seem like there is any error message.  However, an educated guess is
that the moduleDescriptorDoc is not present.  Can you modify your code
to print out or log the value of moduleDescriptorDoc and check that it
is an absolute URI.  If it is a relative URI, we need to figure out what
it's being interpreted relative to.  Perhaps you could try to open the
document from within getAdminTableMenuHTML and verify its contents.

Gary