xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Forêt <l.fo...@clipack.com>
Subject Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
Date Wed, 26 Feb 2003 16:02:39 GMT
I 've written too fast. I have now, no more exception. And, It seems to work
properly, but the result disappoints me. As a result I have a pdf file with
a blank page.

Indeed, I made a test with a simple stylesheet, which write all PCDATA node
in a block (tested with a simple xml file using fop.bat) :
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version="1.0">

<xsl:template match="/|*">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="all">
        ....
     </fo:simple-page-master>
 </fo:layout-master-set>

  <fo:page-sequence master-reference="all">
     <fo:flow flow-name="xsl-region-body">
       <xsl:apply-templates/>
     </fo:flow>
  </fo:page-sequence>
</fo:root>
</xsl:template>

<xsl:template match="*">
  <fo:block font-size="12pt"
                  font-family="sans-serif"
                  line-height="15pt"
                  space-after.optimum="3pt"
                  text-align="justify">
      <xsl:value-of select="."/>
    </fo:block>
</xsl:template>

</xsl:stylesheet>

My execution trace looks like this :

[FOPRenderer EJB] rendering ...
[FOPRenderer EJB] xslFileName :identity.xsl
[FOPRenderer EJB] xslFolderPath
:C:\9ias_OC4J\j2ee\home\applications\clipack\clipack-web\xsl\fo\simpleDatash
eet

Instatiating a new FOPRendererManager ...
[ERROR] Logger not set
FOPRendererManager initialized
Rendering ...
In SimpleDatasheetReader
startElement(simpleDatasheet)
startElement(header)
element(title)
startElement(info)
endElement(info)
startElement(info)
endElement(info)
endElement(header)
startElement(classFeature)
startElement(feature)
endElement(feature)
endElement(classFeature)
endElement(simpleDatasheet)
[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] [1]
[INFO] Parsing of document complete, stopping renderer


Everything seems to be ok, all events seem to be generated by
SimpleDatasheetReader. The parse and the rendering seem ok, but the result
is a blank page. I am going to try to put more debugs but if someone have an
idea.

Laurent Forêt.

----- Original Message -----
From: "Laurent Forêt" <l.foret@clipack.com>
To: <fop-user@xml.apache.org>
Sent: Wednesday, February 26, 2003 11:49 AM
Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.


> TransformerFactory factory = new
> org.apache.xalan.processor.TransformerFactoryImpl();
>
> Works fine, thanks a lot.
>
> Laurent.
>
> PS: I am very glad to please you ! It was exactly corresponding to my
needs.
>
> ----- Original Message -----
> From: "Jeremias Maerki" <dev.jeremias@greenmail.ch>
> To: <fop-user@xml.apache.org>
> Sent: Wednesday, February 26, 2003 10:49 AM
> Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
>
>
> > 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: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>


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


Mime
View raw message