Good to see that my code was worth the time and it gets used. :-)

Let's see: What you do here has relatively little to do with the XML
parser (Xerces or whatever). We're doing an XSL transformation here. FOP
uses Apache Xalan per default. Oracle seems to have its own
implementation. I don't have any idea why there's a ClassCastException
without having the ability to debug in your environment. If you have the
source code from JXTransformer, see if you can find out what it expects
at line 207.

As a workaround, try the following:
Make sure you've got Xalan in your classpath. Then switch this line:

TransformerFactory factory = TransformerFactory.newInstance();

with this:

TransformerFactory factory = new 
org.apache.xalan.processor.TransformerFactoryImpl();

This should make sure you get a Xalan transformer and not the JAXP
default. (Disclaimer: not tested, just a shot from the hip)

I hope this helps. Maybe someone else familiar with the Oracle
enviroment has an idea.

On 26.02.2003 10:07:42 Laurent Forêt wrote:
> Hello,
> 
>     I have tried a program like the ExampleObj2PDF using the
> AbstractObjectReader and the EasyContent...Proxy. It was working fine.
> 
>     Now, Itry to deploy an EJB using the same code in a 9IAS OC4J server.
> The problem is now that the jaxp2 lib used in OC4J is not Xerces2 but an
> Oracle implementation and I have the following exception :
> 
> Rendering ...
> java.lang.ClassCastException:
> com.clipack.foprenderer.datasheet.SimpleDatasheetReader
>         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:207)
>         at
> com.clipack.foprenderer.FOPRendererManager.render(FOPRendererManager.java:62
> )
>         at
> com.clipack.foprenderer.ejb.impl.FOPRendererBean.render(FOPRendererBean.java
> :59)
>         at
> FOPRenderer_StatelessSessionBeanWrapper0.render(FOPRenderer_StatelessSession
> BeanWrapper0.java:90)
>         at
> com.clipack.portal.presentation.renderer.SimpleDatasheetRenderer.render(Simp
> leDatasheetRenderer.java:85)
>         at _jsp._fopRenderer._jspService(_fopRenderer.java:59)
>         at
> com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
>         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
>         at
> oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
>         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispa
> tcher.java:721)
>         at
> com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletReq
> uestDispatcher.java:306)
>         at
> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandle
> r.java:767)
>         at
> com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
>         at
> com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
> va:797)
>         at java.lang.Thread.run(Thread.java:484)
> 
> 
> SimpleDatasheetReader is the equivalent in my program of
> ProjectTeamXmlReader which extends AbstractObjectReader which implements
> org.xml/sax.XMLReader. As the both implementation (xerces and
> oracleXMLParserV2) respect the jaxp and sax2 interface I don't understand
> why, there is this exception.
> 
> Is there somebody who has an idea to make the code appliable to the oracle
> parser, or is there somebody who knows how to tell fop using the good parser
> (xerces2) without passing through the classpath (Xerces2 will be always
> after OracleXmlparserV2 in the classpath) ?
> 
> regards, Laurent.
> 
> PS : I can post the code if somebody needs .


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to