Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
Finally, it was a stupid problem of encoding using a writer in the jsp, I use now an OutputStream. And it works. thanks a lot, regards, Laurent Forêt. - Original Message - From: "Jeremias Maerki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 5:38 PM Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J. > A good idea to find out what's wrong is to disable FOP and serialize the > generated XSL-FO to a file at the place where you normally pipe the SAX > events over to FOP. Then, check the generated file if it's what you > expected. > > On 26.02.2003 17:02:39 Laurent Forêt wrote: > > 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) : > > > > > 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. > > > Jeremias Maerki > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
It's a good idea I am gonna try this. Thanks. Laurent. - Original Message - From: "Jeremias Maerki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 5:38 PM Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J. > A good idea to find out what's wrong is to disable FOP and serialize the > generated XSL-FO to a file at the place where you normally pipe the SAX > events over to FOP. Then, check the generated file if it's what you > expected. > > On 26.02.2003 17:02:39 Laurent Forêt wrote: > > 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) : > > > > > 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. > > > Jeremias Maerki > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
Laurent Forêt wrote: ^ This is a bad idea, in particular because you have this: further down. Look for errors in the logs (if there are logs) - Original Message - BTW it is considered bad netiquette to leave unused old quotes in. Your message was barely 25% of the total mail. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
A good idea to find out what's wrong is to disable FOP and serialize the generated XSL-FO to a file at the place where you normally pipe the SAX events over to FOP. Then, check the generated file if it's what you expected. On 26.02.2003 17:02:39 Laurent Forêt wrote: > 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) : > 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. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.
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) : http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format"; version="1.0"> http://www.w3.org/1999/XSL/Format";> 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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > 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) > > >
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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem using ExampleObj2PDF using Oracle 9iasOC4J.
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 . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]