You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Alex Amies <AA...@access360.com> on 2001/05/15 17:45:54 UTC

Xalan2 with Weblogic 6

Is anybody successfully using Xalan2 with Weblogic 6?  
We were using it with Weblogic 5.1 sucessfully but 
on upgrading to Weblogic 6 we got an exception with
the stack trace listed below.  Is anybody using Xalan2
successfully with Weblogic 6?

I am using Servlets to transform xml into html.  To
do the transformation I pass the PrintWriter from
the HttpServletResponse to the Xalan processor:

            Writer out = res.getWriter();
            StreamResult streamResult = new StreamResult(out);
            transformer.transform(xmlSource, streamResult);

Following that we get a ClassCastException from the
Servlet engine.  It doesn't look like it is related
to the old version of Xalan that Weblogic is now 
packaging but seems like something separate.

We believe that it is a Weblogic problem but the interesting 
thing is that it looks like Xalan is starting a new 
thread at some point.  Weblogic seems to be making 
a class cast to one of their own threads to find out
the date and setting this into a http header.  It 
appears that Xalan is the creator of this thread instead
of the Weblogic server leading to a ClassCastException.

Is it correct that Xalan initiates a new thread in such
a situation?  If so, is there a way to configure Xalan
to not do so?

<May 14, 2001 11:33:13 AM PDT> <Error> <T3Services>
<javax.xml.transform.TransformerException: java.lang.Thread
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm
pl.java:1242)
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:29
42)
        at java.lang.Thread.run(Thread.java:484)
---------
java.lang.ClassCastException: java.lang.Thread
        at
weblogic.servlet.internal.ResponseHeaders.setDateHeader(ResponseHeaders.
java:273)
        at
weblogic.servlet.internal.ServletResponseImpl.setDateHeader(ServletRespo
nseImpl.java:476)
        at
weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletRespon
seImpl.java:664)
        at
weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStr
eamImpl.java:126)
        at
weblogic.servlet.internal.WLOutputStreamWriter.flush(WLOutputStreamWrite
r.java:124)
        at java.io.PrintWriter.flush(PrintWriter.java:120)
        at
org.apache.xalan.serialize.SerializerToXML.flushWriter(SerializerToXML.j
ava:1471)
        at
org.apache.xalan.serialize.SerializerToXML.endDocument(SerializerToXML.j
ava:662)
        at
org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHan
dler.java:193)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm
pl.java:1224)
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:29
42)
        at java.lang.Thread.run(Thread.java:484)