You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Conny Krappatsch <co...@softwarebuero.de> on 2000/07/21 12:30:32 UTC
concurrent document requests
Hi all,
I have the following problem with Cocoon 1 (actuelly I suppose Xalan causes it).
If there are simultaneous request to XML files served by Cocoon (and processed
with XSLT) I get various error messages (I can send stacktrace if somebody's
interested in). I already heard that Xalan is not 'thread safe'. I'm working on
a _life_sample_ of cocoon/prowler and there we have lots of those concurrent
requests (e.g. html pages with frames in it).
Are there any known solutions/workarounds to this.
any suggestions are welcome,
Conny
________________________________________________________________
Conny Krappatsch conny@softwarebuero.de
SMB GmbH http://www.softwarebuero.de
Re: concurrent document requests
Posted by Conny Krappatsch <co...@softwarebuero.de>.
Conny Krappatsch wrote:
> Donald Ball wrote:
> > On Mon, 24 Jul 2000, Conny Krappatsch wrote:
> >
> > > Donald Ball wrote:
> > > > On Fri, 21 Jul 2000, Conny Krappatsch wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > I have the following problem with Cocoon 1 (actuelly I suppose Xalan causes it).
> > > > >
> > > > > If there are simultaneous request to XML files served by Cocoon (and
> > > > > processed with XSLT) I get various error messages (I can send
> > > > > stacktrace if somebody's interested in). I already heard that Xalan is
> > > > > not 'thread safe'. I'm working on a _life_sample_ of cocoon/prowler
> > > > > and there we have lots of those concurrent requests (e.g. html pages
> > > > > with frames in it).
> > > >
> > > > i am interested in the stack trace. post it and we'll have a look see.
> > > >
> > > > - donald
> > > Up to now I got three different exceptions. I couldn't find out which
> > > circumstances cause which one to arise.
> > > Thanks for your interest. Here are the stack traces:
> > > (I didn't really count them, but it seems as the first one occurs most often.)
> >
> > It looks rather like your XSLT stylesheet is invalid, though it's
> > certainly possible that it's a threading issue with Xalan as well. Can you
> > send a copy of your stylesheet? Also, try synchronizing the trasnform
> > method in org.apache.cocoon.transformer.XalanTransformer - not a long term
> > solution, by any stretch of the imagination, but if it makes the problem
> > go away then it's a fairly clear indicator that Xalan is the problem.
> >
> > Also, you might want to give XTTransformer a whirl, just to compare XSLT
> > engines. That's why we support 'em both.
>
> The stylesheet(s) is (are) correct. Requesting the pages step by step (i.e.
> only one page at one time) works fine.
> Thanks for your suggestions. I will try them and let you know the results.
I solved the problem. Well, actuelly the problem was solved by somebody else
weeks (months?) ago. We worked with an early Cocoon 1.7 (and a very early
Xalan). Installing the latest release fixed the problem. Should have tried this
before bothering you [shame on me :-( ].
Thanks for your help and sorry for any inconvenience,
Conny
________________________________________________________________
Conny Krappatsch conny@softwarebuero.de
SMB GmbH http://www.softwarebuero.de
Re: concurrent document requests
Posted by Conny Krappatsch <co...@softwarebuero.de>.
Donald Ball wrote:
> On Mon, 24 Jul 2000, Conny Krappatsch wrote:
>
> > Donald Ball wrote:
> > > On Fri, 21 Jul 2000, Conny Krappatsch wrote:
> > >
> > > > Hi all,
> > > >
> > > > I have the following problem with Cocoon 1 (actuelly I suppose Xalan causes it).
> > > >
> > > > If there are simultaneous request to XML files served by Cocoon (and
> > > > processed with XSLT) I get various error messages (I can send
> > > > stacktrace if somebody's interested in). I already heard that Xalan is
> > > > not 'thread safe'. I'm working on a _life_sample_ of cocoon/prowler
> > > > and there we have lots of those concurrent requests (e.g. html pages
> > > > with frames in it).
> > >
> > > i am interested in the stack trace. post it and we'll have a look see.
> > >
> > > - donald
> > Up to now I got three different exceptions. I couldn't find out which
> > circumstances cause which one to arise.
> > Thanks for your interest. Here are the stack traces:
> > (I didn't really count them, but it seems as the first one occurs most often.)
>
> It looks rather like your XSLT stylesheet is invalid, though it's
> certainly possible that it's a threading issue with Xalan as well. Can you
> send a copy of your stylesheet? Also, try synchronizing the trasnform
> method in org.apache.cocoon.transformer.XalanTransformer - not a long term
> solution, by any stretch of the imagination, but if it makes the problem
> go away then it's a fairly clear indicator that Xalan is the problem.
>
> Also, you might want to give XTTransformer a whirl, just to compare XSLT
> engines. That's why we support 'em both.
The stylesheet(s) is (are) correct. Requesting the pages step by step (i.e.
only one page at one time) works fine.
Thanks for your suggestions. I will try them and let you know the results.
Greetings, Conny
________________________________________________________________
Conny Krappatsch conny@softwarebuero.de
SMB GmbH http://www.softwarebuero.de
Re: concurrent document requests
Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 24 Jul 2000, Conny Krappatsch wrote:
> Donald Ball wrote:
> > On Fri, 21 Jul 2000, Conny Krappatsch wrote:
> >
> > > Hi all,
> > >
> > > I have the following problem with Cocoon 1 (actuelly I suppose Xalan causes it).
> > >
> > > If there are simultaneous request to XML files served by Cocoon (and
> > > processed with XSLT) I get various error messages (I can send
> > > stacktrace if somebody's interested in). I already heard that Xalan is
> > > not 'thread safe'. I'm working on a _life_sample_ of cocoon/prowler
> > > and there we have lots of those concurrent requests (e.g. html pages
> > > with frames in it).
> >
> > i am interested in the stack trace. post it and we'll have a look see.
> >
> > - donald
> Up to now I got three different exceptions. I couldn't find out which
> circumstances cause which one to arise.
> Thanks for your interest. Here are the stack traces:
> (I didn't really count them, but it seems as the first one occurs most often.)
It looks rather like your XSLT stylesheet is invalid, though it's
certainly possible that it's a threading issue with Xalan as well. Can you
send a copy of your stylesheet? Also, try synchronizing the trasnform
method in org.apache.cocoon.transformer.XalanTransformer - not a long term
solution, by any stretch of the imagination, but if it makes the problem
go away then it's a fairly clear indicator that Xalan is the problem.
Also, you might want to give XTTransformer a whirl, just to compare XSLT
engines. That's why we support 'em both.
- donald
Re: concurrent document requests
Posted by Conny Krappatsch <co...@softwarebuero.de>.
Donald Ball wrote:
> On Fri, 21 Jul 2000, Conny Krappatsch wrote:
>
> > Hi all,
> >
> > I have the following problem with Cocoon 1 (actuelly I suppose Xalan causes it).
> >
> > If there are simultaneous request to XML files served by Cocoon (and
> > processed with XSLT) I get various error messages (I can send
> > stacktrace if somebody's interested in). I already heard that Xalan is
> > not 'thread safe'. I'm working on a _life_sample_ of cocoon/prowler
> > and there we have lots of those concurrent requests (e.g. html pages
> > with frames in it).
>
> i am interested in the stack trace. post it and we'll have a look see.
>
> - donald
Up to now I got three different exceptions. I couldn't find out which
circumstances cause which one to arise.
Thanks for your interest. Here are the stack traces:
(I didn't really count them, but it seems as the first one occurs most often.)
1.
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:82)
at java.util.Stack.pop(Stack.java:64)
at org.apache.xalan.xslt.XSLTEngineImpl$ResultTreeHandler.endElement(XSLTEngineImpl.java:3974)
at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:216)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1163)
at org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateElement.java:1025)
at org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java:708)
at org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:410)
at org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java:303)
at org.apache.xalan.xpath.XPath.locationPath(XPath.java:941)
at org.apache.xalan.xpath.XPath.execute(XPath.java:1362)
at org.apache.xalan.xpath.XPath.execute(XPath.java:1331)
at org.apache.xalan.xpath.XPath.execute(XPath.java:262)
at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java:872)
at org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java:167)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:215)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:215)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:141)
at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:430)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:606)
at org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.java:94)
at org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:103)
at org.apache.cocoon.Engine.handle(Engine.java:283)
at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.mortbay.HTTP.Handler.ServletHolder.service(ServletHolder.java:488)
at com.mortbay.HTTP.Handler.ServletHandler.handle(ServletHandler.java:172)
at com.mortbay.HTTP.HttpServer.handle(HttpServer.java:344)
at com.mortbay.HTTP.HttpListener.handleConnection(HttpListener.java:122)
at com.mortbay.Util.ThreadedServer.run(ThreadedServer.java:578)
at java.lang.Thread.run(Thread.java:475)
2.
org.apache.xalan.xslt.XSLProcessorException: Unknown XSL element: stylesheet
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1606)
at org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:697)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:531)
at org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.java:94)
at org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:103)
at org.apache.cocoon.Engine.handle(Engine.java:283)
at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.mortbay.HTTP.Handler.ServletHolder.service(ServletHolder.java:488)
at com.mortbay.HTTP.Handler.ServletHandler.handle(ServletHandler.java:172)
at com.mortbay.HTTP.HttpServer.handle(HttpServer.java:344)
at com.mortbay.HTTP.HttpListener.handleConnection(HttpListener.java:122)
at com.mortbay.Util.ThreadedServer.run(ThreadedServer.java:578)
at java.lang.Thread.run(Thread.java:475)
---------
org.xml.sax.SAXException: Unknown XSL element: stylesheet
at org.apache.xalan.xslt.StylesheetHandler.startElement(StylesheetHandler.java:890)
at org.apache.xalan.xpath.xml.TreeWalker.startNode(TreeWalker.java:195)
at org.apache.xalan.xpath.xml.TreeWalker.traverse(TreeWalker.java:98)
at org.apache.cocoon.transformer.XalanTransformer$XMLParser.parse(XalanTransformer.java:121)
at org.apache.xalan.xslt.XSLTEngineImpl.parseXML(XSLTEngineImpl.java:861)
at org.apache.xalan.xslt.StylesheetHandler.processInclude(StylesheetHandler.java:1350)
at org.apache.xalan.xslt.StylesheetHandler.startElement(StylesheetHandler.java:511)
at org.apache.xalan.xpath.xml.TreeWalker.startNode(TreeWalker.java:195)
at org.apache.xalan.xpath.xml.TreeWalker.traverse(TreeWalker.java:98)
at org.apache.cocoon.transformer.XalanTransformer$XMLParser.parse(XalanTransformer.java:121)
at org.apache.xalan.xslt.XSLTEngineImpl.parseXML(XSLTEngineImpl.java:861)
at org.apache.xalan.xslt.StylesheetHandler.processInclude(StylesheetHandler.java:1350)
at org.apache.xalan.xslt.StylesheetHandler.startElement(StylesheetHandler.java:511)
at org.apache.xalan.xpath.xml.TreeWalker.startNode(TreeWalker.java:195)
at org.apache.xalan.xpath.xml.TreeWalker.traverse(TreeWalker.java:98)
at org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:682)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:531)
at org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.java:94)
at org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:103)
at org.apache.cocoon.Engine.handle(Engine.java:283)
at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.mortbay.HTTP.Handler.ServletHolder.service(ServletHolder.java:488)
at com.mortbay.HTTP.Handler.ServletHandler.handle(ServletHandler.java:172)
at com.mortbay.HTTP.HttpServer.handle(HttpServer.java:344)
at com.mortbay.HTTP.HttpListener.handleConnection(HttpListener.java:122)
at com.mortbay.Util.ThreadedServer.run(ThreadedServer.java:578)
at java.lang.Thread.run(Thread.java:475)
3.
org.apache.xalan.xslt.XSLProcessorException:
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1650)
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1559)
at org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:137)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1163)
at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java:926)
at org.apache.xalan.xslt.ElemForEach.execute(ElemForEach.java:123)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:215)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:215)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1163)
at org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateElement.java:1025)
at org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java:708)
at org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:410)
at org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java:303)
at org.apache.xalan.xpath.XPath.locationPath(XPath.java:941)
at org.apache.xalan.xpath.XPath.execute(XPath.java:1362)
at org.apache.xalan.xpath.XPath.execute(XPath.java:1331)
at org.apache.xalan.xpath.XPath.execute(XPath.java:262)
at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java:872)
at org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java:167)
at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:665)
at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:141)
at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:430)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:606)
at org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.java:94)
at org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:103)
at org.apache.cocoon.Engine.handle(Engine.java:283)
at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.mortbay.HTTP.Handler.ServletHolder.service(ServletHolder.java:488)
at com.mortbay.HTTP.Handler.ServletHandler.handle(ServletHandler.java:172)
at com.mortbay.HTTP.HttpServer.handle(HttpServer.java:344)
at com.mortbay.HTTP.HttpListener.handleConnection(HttpListener.java:122)
at com.mortbay.Util.ThreadedServer.run(ThreadedServer.java:578)
at java.lang.Thread.run(Thread.java:475)
________________________________________________________________
Conny Krappatsch conny@softwarebuero.de
SMB GmbH http://www.softwarebuero.de
Re: concurrent document requests
Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 21 Jul 2000, Conny Krappatsch wrote:
> Hi all,
>
> I have the following problem with Cocoon 1 (actuelly I suppose Xalan causes it).
>
> If there are simultaneous request to XML files served by Cocoon (and
> processed with XSLT) I get various error messages (I can send
> stacktrace if somebody's interested in). I already heard that Xalan is
> not 'thread safe'. I'm working on a _life_sample_ of cocoon/prowler
> and there we have lots of those concurrent requests (e.g. html pages
> with frames in it).
i am interested in the stack trace. post it and we'll have a look see.
- donald