cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Kurz" <crk...@gmx.de>
Subject AW: All hope lost: Can FragmentExtractor serve SVG images to IE (socket write error) ?
Date Sat, 07 Jun 2003 15:36:30 GMT
Here's a work-around which worked for me (not a nice one, I know):

- to fix the NPEs: I have replaced the cocoon 2.0.4 files by the 2.1m2
ones for AbstractDOMFragment and DOMStreamer as well as replace the uri
null value for the fragment-id attribute in FragmentExtractorTransformer
by an empty string.

- to fix the message "Could not find fragment ..." in
FragmentExtractorGenerator: add logic to delete the document fragment
after the SECOND request or (in case of using Netscape) after 5 minutes.

- to remove java.net.SocketExceptions from core.log:
try/catch around doc.generate() in FragmentExtractorGenerator eating all
java.net.SocketExceptions.

- to remove java.net.SocketExceptions from error.log:
CocoonServlet.java: logic to check before writing a log record whether
there was a java.net.SocketException

-----Urspr√ľngliche Nachricht-----
Von: Christian Kurz [mailto:crkurz@gmx.de] 
Gesendet: Mittwoch, 4. Juni 2003 22:58
An: cocoon-users@xml.apache.org
Betreff: All hope lost: Can FragmentExtractor serve SVG images to IE
(socket write error) ?

Hi,

has anybody successfully served svg images (not svg rendered as JPG or
PNG, this just works great!) to the IE using the FragmentGenerator? I
would really appreciate any information or code snippets about sitemap
setup and versions used (OS, JDK, Tomcat, Cocoon, Xalan). 


After trying to fix what I though was a simple problem for 1.5 weeks I
have got no ideas on how to investigate anymore:

I am trying to serve a generated svg image as an svg file. The two
pipelines are basically:

	FileGenerator
	XSLT-Transformer to turn xml data into a xml document containing

	Custom-Transformer for calling GraphViz to create SVG elements
in xml document
	XSLT-Transformer
	FragmentExtractor
	XSLT-Tranformer 
	HTML-Serializer

	FragmentGenerator
	SVGXML-Serializer

All of this works fine when requesting the page using Netscape Navigator
(valid page and images, no errors in log file). As soon as I use the
Microsoft Internet Explorer to request the same page, the HTML page is
returned, but the svg image has not been served properly. According to
the log file there was a "java.net.SocketException: Software caused
connection abort: socket write error" (details included below), in
certain configurations I am receiving a NPE in DOMStreamer.stream
instead (details included below). As discussed in other threads
(http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=101994024218728&w=2,
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=103907382827236&w=2),
this looks like IE requesting the svg twice and aborting the first
request causing the trouble. Is the FragmentExtractor able to handle
this, if the serializer is not JPG or PNG?

I am using WinXP and have tried various configurations: 
	-cocoon (2.0.3, 2.0.4), 
	-Tomcat (4.1.24, 4.1.18)
	-JDK (1.4.0_02, 1.4.1_02)
	-XALAN (2.3.1, 2.4.1, 2.5.1) and SAXON (6.5), 
	-incremental processing turned on and off.

Any hints, ideas on further research very much appreciated.

Thanks in advance,
Christian


----- SOCKET WRITE ERROR -----------------------------
FATAL_E (2003-05-28) 00:04.34:399   [core.xslt-processor]
(/eti/etimdb/imsds-graph/e920f-f56ba6b144--8000.svg)
Thread-10/TraxErrorHandler: java.net.SocketException: Software caused
connection abort: socket write error
javax.xml.transform.TransformerException: java.net.SocketException:
Software caused connection abort: socket write error
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.j
ava:690)
	at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(Ele
mApplyTemplates.java:423)
	at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates
.java:226)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Trans
formerImpl.java:2182)
	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transfo
rmerImpl.java:2008)
	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm
pl.java:1171)
	at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:31
35)
	at java.lang.Thread.run(Thread.java:536)
Caused by: java.net.SocketException: Software caused connection abort:
socket write error
	at
org.apache.xalan.serialize.SerializerToXML.outputLineSep(SerializerToXML
.java:199)
	at
org.apache.xalan.serialize.SerializerToXML.indent(SerializerToXML.java:2
308)
	at
org.apache.xalan.serialize.SerializerToHTML.startElement(SerializerToHTM
L.java:630)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1017)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
130)
	at
org.apache.cocoon.serialization.AbstractTextSerializer$NamespaceAsAttrib
utes.startElement(AbstractTextSerializer.java:486)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
130)
	at
org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandl
er.java:856)
	at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHa
ndler.java:931)
	at
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHand
ler.java:306)
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.j
ava:684)
	... 7 more
---------
java.net.SocketException: Software caused connection abort: socket write
error
	at
org.apache.xalan.serialize.SerializerToXML.outputLineSep(SerializerToXML
.java:199)
	at
org.apache.xalan.serialize.SerializerToXML.indent(SerializerToXML.java:2
308)
	at
org.apache.xalan.serialize.SerializerToHTML.startElement(SerializerToHTM
L.java:630)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1017)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
130)
	at
org.apache.cocoon.serialization.AbstractTextSerializer$NamespaceAsAttrib
utes.startElement(AbstractTextSerializer.java:486)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
130)
	at
org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandl
er.java:856)
	at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHa
ndler.java:931)
	at
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHand
ler.java:306)
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.j
ava:684)
	at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(Ele
mApplyTemplates.java:423)
	at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates
.java:226)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Trans
formerImpl.java:2182)
	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transfo
rmerImpl.java:2008)
	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm
pl.java:1171)
	at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:31
35)
	at java.lang.Thread.run(Thread.java:536)
---------
java.net.SocketException: Software caused connection abort: socket write
error
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
	at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
	at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.d
oWrite(InternalOutputBuffer.java:668)
	at
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutp
utFilter.java:166)
	at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff
er.java:523)
	at org.apache.coyote.Response.doWrite(Response.java:524)
	at
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:
384)
	at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
	at
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)
	at
org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:411)
	at
org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:398)
	at
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.ja
va:110)
	at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
	at
java.io.BufferedOutputStream.write(BufferedOutputStream.java:82)
	at
org.apache.xalan.serialize.WriterToUTF8.write(WriterToUTF8.java:138)
	at
org.apache.xalan.serialize.SerializerToXML.outputLineSep(SerializerToXML
.java:195)
	at
org.apache.xalan.serialize.SerializerToXML.indent(SerializerToXML.java:2
308)
	at
org.apache.xalan.serialize.SerializerToHTML.startElement(SerializerToHTM
L.java:630)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1017)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
130)
	at
org.apache.cocoon.serialization.AbstractTextSerializer$NamespaceAsAttrib
utes.startElement(AbstractTextSerializer.java:486)
	at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
130)
	at
org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandl
er.java:856)
	at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHa
ndler.java:931)
	at
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHand
ler.java:306)
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.j
ava:684)
	at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(Ele
mApplyTemplates.java:423)
	at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates
.java:226)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Trans
formerImpl.java:2182)
	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transfo
rmerImpl.java:2008)
	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm
pl.java:1171)
	at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:31
35)
	at java.lang.Thread.run(Thread.java:536)

---- NPE ---------------------------------
DEBUG   (2003-05-28) 00:04.34:128   [core.stream-pipeline]
(/eti/etimdb/imsds-graph/e920f-f56ba6b144--8000.svg)
Thread-10/CachingStreamPipeline: Exception in process
java.lang.NullPointerException
	at
org.apache.cocoon.xml.dom.DOMStreamer.stream(DOMStreamer.java:145)
	at
org.apache.cocoon.generation.FragmentExtractorGenerator.generate(Fragmen
tExtractorGenerator.java:144)
	at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:250)
	at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:395)
	at
org.apache.cocoon.www.file_.D_.tomcat.jakarta_tomcat_4_1_24.webapps.eti.
etimdb.sitemap_xmap.matchN40059E(D:\tomcat\jakarta-tomcat-4.1.24\work\St
andalone\localhost\eti\cocoon-files\org/apache/cocoon/www/file_/D_/tomca
t/jakarta_tomcat_4_1_24/webapps/eti/etimdb\sitemap_xmap.java:5824)
	at
org.apache.cocoon.www.file_.D_.tomcat.jakarta_tomcat_4_1_24.webapps.eti.
etimdb.sitemap_xmap.process(D:\tomcat\jakarta-tomcat-4.1.24\work\Standal
one\localhost\eti\cocoon-files\org/apache/cocoon/www/file_/D_/tomcat/jak
arta_tomcat_4_1_24/webapps/eti/etimdb\sitemap_xmap.java:3065)
	at
org.apache.cocoon.www.file_.D_.tomcat.jakarta_tomcat_4_1_24.webapps.eti.
etimdb.sitemap_xmap.process(D:\tomcat\jakarta-tomcat-4.1.24\work\Standal
one\localhost\eti\cocoon-files\org/apache/cocoon/www/file_/D_/tomcat/jak
arta_tomcat_4_1_24/webapps/eti/etimdb\sitemap_xmap.java:2653)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
	at
org.apache.cocoon.sitemap.AbstractSitemap.invoke(AbstractSitemap.java:30
8)
	at
org.apache.cocoon.www.file_.D_.tomcat.jakarta_tomcat_4_1_24.webapps.eti.
sitemap_xmap.matchN40098B(D:\tomcat\jakarta-tomcat-4.1.24\work\Standalon
e\localhost\eti\cocoon-files\org/apache/cocoon/www/file_/D_/tomcat/jakar
ta_tomcat_4_1_24/webapps/eti\sitemap_xmap.java:11536)
	at
org.apache.cocoon.www.file_.D_.tomcat.jakarta_tomcat_4_1_24.webapps.eti.
sitemap_xmap.process(D:\tomcat\jakarta-tomcat-4.1.24\work\Standalone\loc
alhost\eti\cocoon-files\org/apache/cocoon/www/file_/D_/tomcat/jakarta_to
mcat_4_1_24/webapps/eti\sitemap_xmap.java:3774)
	at
org.apache.cocoon.www.file_.D_.tomcat.jakarta_tomcat_4_1_24.webapps.eti.
sitemap_xmap.process(D:\tomcat\jakarta-tomcat-4.1.24\work\Standalone\loc
alhost\eti\cocoon-files\org/apache/cocoon/www/file_/D_/tomcat/jakarta_to
mcat_4_1_24/webapps/eti\sitemap_xmap.java:3097)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
	at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152
)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
4)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:392)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
5)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:619)
	at java.lang.Thread.run(Thread.java:536)




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message