Christian Sell escribió:
> Hi,
>
> To me this looks not like a configuration issue but like a coding error
> inside Jetspeed (I may be wrong, of course. I have no idea why you get the
> error and others dont). The following is directed at Jetspeed developers and
> may not help you a lot.
>
> When I tried to reuse the Jetspeed code for the RSS portlet a while ago, I
> ran into the same error. The root of the problem lies in the class
> org.apache.jetspeed.util.SimpleTransform. When invoked through the method:
>
> public static String transform( Document doc, String stylesheet_url)
>
> SimpleTransform internally creates a processor for the XSL transformation by
> calling
>
> XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
>
> This processor implicitly uses the DTM parser which is part of xalan.
> However, DTM is not able to handle Document nodes (which is what the error
> message says). To enable xalan to handle Document nodes, the processor has
> to be created like this
>
> XSLTProcessor processor = XSLTProcessorFactory.getProcessor(new
> XercesLiaison());
>
> I dont know if this is only an issue with newer versions of xerces/xalan,
> but to my understanding, any call to
> SimpleTransform.transform( Document doc, String stylesheet_url)
> as it is currently implemented has to fail with this very error.
>
My copy works allright, so it is probably an issue with newer versions. Which
xalan version are you using?
>
> BTW, talking about RSSPortlet: RSSPortlet uses the following call to hook
> xerces's entity resolution mechanism and read DTDs from the Jetspeed cache.
> parser.setReaderFactory(JetspeedXMLReaderFactory.getInstance());
>
> I think this should better be replaced by using the API
> parser.setEntityResolver(new JetspeedEntityResolver());
>
This is a kludge I did some time ago , and I barely understood xerces code
then. Also, I had no access to docs, only to a copy of the sources. I did my
best to understand, but xerces is really difficult to follow.
I was concerned by the fact that Jetspeed was loosing a lot of time going to
the network to retrieve the netscape DTD, and it apparently ignored every
attempt to avoid it validanting some channels. This resulted in hundreds of
network attacks agains netscape (a DOS "feature :-)
I am testing your patch,. It looks all right, so I'm commiting it and taking
the JetspeedXMLReaderFactory class out of cvs.
Thanks for your help.
>
> and implementing the class JetspeedEntityResolver accordingly. In contrast
> to the current implementation, this is the documented way of achieving the
> desired effect. The class could look like this:
>
> /**
> * an entity resolver which tries to lookup DTD files from a local directory
> */
> private class JetspeedEntityResolver implements EntityResolver
> {
> public InputSource resolveEntity (String publicId, String systemId)
> {
> try {
> //access Jetspeed cache and get a java.io.Reader
> return new InputSource(reader);
> }
> } catch(IOException x) {}
> }
> return null; //or whatever
> }
>
> --
> -- Original Message -----
> From: "Stephen Sklarew" <[EMAIL PROTECTED]>
> To: "'JetSpeed'" <[EMAIL PROTECTED]>
> Sent: Sunday, January 07, 2001 1:25 PM
> Subject: RE: Error when navigating to http://<domain>/jetspeed/index.jsp
>
> > This seemed to get me one step closer -- I chmod 777 the whole templates
> > directory for now. Yet, now I've got this error:
> >
> > initializing service: TurbineGlobalCacheService
> > XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a
> > org.apache.xal
> > an.xpath.xdom.XercesLiaison instead!
> > XSL Error: SAX Exception
> > XXXMangler: /WEB-INF/templates/jsp/layouts/html/default.jsp
> > WEB-INF/templates/js
> > p/layouts/html default
> > 2001-01-07 07:48:43 - JspInterceptor: Update class Name
> > WEB-INF.templates.jsp.la
> > youts.html.default_1
> > 2001-01-07 07:48:46 - JspInterceptor: compile: req=R( /jetspeed +
> > /WEB-INF/templ
> > ates/jsp/layouts/html/default.jsp + null) -
> > org.apache.jasper.compiler.CompileEx
> > ception:
> > /usr/local/tomcat/webapps/jetspeed/WEB-INF/templates/jsp/layouts/html/d
> > efault.jsp(0,0) Unable to open taglibrary {0} : {1}
> > at
> > org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspP
> > arseEventListener.java:712)
> > at
> > org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegat
> > ingListener.java:116)
> > at
> > org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
> > at
> > org.apache.tomcat.facade.JasperLiaison.compile(JspInterceptor.java:37
> > 9)
> > at
> > org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.
> > java:346)
> > at
> > org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.jav
> > a:212)
> > at
> > org.apache.tomcat.core.ContextManager.processRequest(ContextManager.j
> > ava:742)
> > at
> > org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatc
> > herImpl.java:267)
> > at
> > org.apache.jetspeed.services.jsp.JetspeedJspService.handleRequest(Jet
> > speedJspService.java:169)
> > at
> > org.apache.jetspeed.modules.layouts.JetspeedJspLayout.doBuild(Jetspee
> > dJspLayout.java:122)
> > at org.apache.turbine.modules.Layout.build(Layout.java:93)
> > at
> > org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:122)
> > at
> > org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java
> > :170)
> > at org.apache.turbine.modules.Page.build(Page.java:92)
> > at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:122)
> > at org.apache.turbine.Turbine.doGet(Turbine.java:364)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> > at
> > org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> > :481)
> > at org.apache.tomcat.core.Handler.service(Handler.java:225)
> > at
> > org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> > 29)
> > at
> > org.apache.tomcat.facade.RequestDispatcherImpl.invoke(RequestDispatch
> > erImpl.java:536)
> > at
> > org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> > herImpl.java:192)
> > at
> > org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
> > a:424)
> > at index_1._jspService(index_1.java:59)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> > at
> > org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> > :481)
> > at org.apache.tomcat.core.Handler.service(Handler.java:225)
> > at
> > org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> > 29)
> > at
> > org.apache.tomcat.core.ContextManager.internalService(ContextManager.
> > java:711)
> > at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:633
> > )
> > at
> > org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
> > Http10Interceptor.java:142)
> > at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> > :426)
> > at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> > ool.java:497)
> > at java.lang.Thread.run(Thread.java:484)
> >
> > Error=Error encountered processing a
> > template:/WEB-INF/templates/jsp/layouts/htm
> > l/default.jsp
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Saturday, January 06, 2001 9:54 AM
> > To: JetSpeed
> > Subject: Re: Error when navigating to http://<domain>/jetspeed/index.jsp
> >
> >
> > Stephen Sklarew wrote:
> > >
> > > any ideas?
> > >
> > > end initializing all services
> > > initializing service: TurbineAssemblerBrokerService
> > > initializing service: TurbineSecurityService
> > > initializing service: TurbineGlobalCacheService
> > > XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a
> > > org.apache.xalan.xpath.xdom.XercesLiaison instead!
> > > XSL Error: SAX Exception
> > > XXXMangler: /WEB-INF/templates/jsp/layouts/html/default.jsp
> > > WEB-INF/templates/jsp/layouts/html default
> > > writeVersion()
> > >
> >
> /usr/local/tomcat/work/DEFAULT/jetspeed/WEB-INF/templates/jsp/layouts/html/d
> > > efault.verjava.io.FileNotFoundException:
> > >
> >
> /usr/local/tomcat/work/DEFAULT/jetspeed/WEB-INF/templates/jsp/layouts/html/d
> > > efault.ver (No such file or directory)
> > > 2001-01-05 10:34:03 - JspInterceptor: Update class Name
> > > WEB-INF.templates.jsp.layouts.html.default_1
> > > 2001-01-05 10:34:03 - Package name is:
> WEB-INF.templates.jsp.layouts.html
> > > 2001-01-05 10:34:03 - Class file name is:
> > >
> >
> /usr/local/tomcat/work/DEFAULT/jetspeed/WEB-INF/templates/jsp/layouts/html/d
> > > efault_1.class
> > > 2001-01-05 10:34:03 - Java file name is:
> > >
> >
> /usr/local/tomcat/work/DEFAULT/jetspeed/WEB-INF/templates/jsp/layouts/html/d
> > > efault_1.java
> > > 2001-01-05 10:34:03 - Class name is: default_1
> > > 2001-01-05 10:34:04 - JspInterceptor: compile: req=R( /jetspeed +
> > > /WEB-INF/templates/jsp/layouts/html/default.jsp + null) -
> > > java.io.FileNotFoundException:
> > >
> >
> /usr/local/tomcat/work/DEFAULT/jetspeed/WEB-INF/templates/jsp/layouts/html/d
> > > efault_1.java (No such file or directory)
> >
> > Check that your Tomcat engine has Unix write permission on the directory
> > /usr/local/tomcat/work.
> >
> > --
> > Raphaël Luta - [EMAIL PROTECTED]
> > Vivendi Universal Networks - Services Manager / Paris
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/[email protected]/>
> > List Help?: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/[email protected]/>
> > List Help?: [EMAIL PROTECTED]
> >
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/[email protected]/>
> List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?: [EMAIL PROTECTED]