Re: [afp-renderer-users] AFP Issue in Solaris
Brought to you by:
towny,
tumbarumba
From: Pete T. <pe...@to...> - 2004-12-03 17:16:39
|
Hi Prakash, I'll get that updated so that the underlying cause is logged, also I guess you're using version 1.0.1 which doesn't have a DTD resolver, therefore the DTD must be in the working directory of your app server. If you upgrade to 1.0.2 there is a DTD resolver so it should find it in the classpath (i.e. in the root of the jar). For your information we hope to have a 1.1.0 release out shortly which will include a number of enhancements including support for outline fonts. this version is available from the HEAD of CVS. Rgds, Pete. ----- Original Message ----- From: "Venkataramani, Prakash" <Pra...@ss...> To: "Joe Schmetzer" <jo...@ex...> Cc: <pe...@to...> Sent: Friday, December 03, 2004 4:07 PM Subject: RE: [afp-renderer-users] AFP Issue in Solaris > > > > Pete, > > > > This is the issue we found. > The following code is found in FontCollection.java > But we have added certain lines of logging. > We had issue with our DTD.The code as we got from > SourceForge did not give us more information > As what was the real problem.It just says > "IOException" and the static message > mentioned in there. > After we added printstacktrace for IOException > We came to know it is not able to find the DTD. > > Also would like to know as where you folks put the DTD > In the App Server. > > > Thanks > Prakash > > > > private void load() { > > SAXParserFactory spf = SAXParserFactory.newInstance(); > spf.setNamespaceAware(true); > spf.setValidating(true); > > try { > > FontHandler fontHandler = new FontHandler(this); > > // Create a JAXP SAXParser > SAXParser saxParser = spf.newSAXParser(); > > // Get the encapsulated SAX XMLReader > XMLReader xmlReader = saxParser.getXMLReader(); > > // Set the ContentHandler of the XMLReader > xmlReader.setContentHandler(fontHandler); > LOGGER.info("Before classLoader"); > > ClassLoader classLoader = > Thread.currentThread().getContextClassLoader(); > if (classLoader == null) { > classLoader = > FontCollection.class.getClassLoader(); > } > LOGGER.info("Class Loader.toString():"+ > classLoader.toString()); > > URL url = classLoader.getResource(AFP_FONT_CONFIG); > LOGGER.info("URL of afp-fonts.xml:"+ > url.toString()); > > InputSource is = new InputSource(url.openStream()); > > // Parse the XML document > xmlReader.parse(is); > > } catch (org.xml.sax.SAXException sex) { > String msg = "SAX exception when parsing " + > AFP_FONT_CONFIG; > LOGGER.error(msg); > sex.printStackTrace(); > throw new FontRuntimeException(msg, sex); > } catch (javax.xml.parsers.ParserConfigurationException pce) > { > String msg = "Parser Configuration exception when > parsing " + AFP_FONT_CONFIG; > LOGGER.error(msg); > throw new FontRuntimeException(msg, pce); > } catch (java.io.IOException iex) { > String msg = "IO exception when parsing " + > AFP_FONT_CONFIG; > LOGGER.error(msg); > LOGGER.error("IN the IOExcpetion:"+ > iex.getMessage()); > iex.printStackTrace(); > throw new FontRuntimeException(msg, iex); > } > > > > > > > > -----Original Message----- > From: Joe Schmetzer [mailto:jo...@ex...] > Sent: Thursday, December 02, 2004 4:08 PM > To: Venkataramani, Prakash > Cc: afp...@li...; pe...@to...; Owen, > Harold S. > Subject: Re: [afp-renderer-users] AFP Issue in Solaris > > > Firstly, can you confirm that afp-fonts.xml is located at the root of the > classpath? In a web container I think the classpath is configured in > META-INF/MANIFEST.MF > > Secondly, if that is not the problem, san you show us what is happening > inside the method gov.ssa.dps.xhtml.FileGenerator.convertFO2AFP? What > parameters are set and how is the InputSource instance initialised? > > Cheers, > Joe > > On Thu, 2004-12-02 at 20:35, Venkataramani, Prakash wrote: > > Pete, > > > > We are trying to generate AFP document in Solaris.We were able to > > generate AFP documents in Windows.Thanks for all the help on windows. > > > > We are having some issues on Solaris.I am sending you the part Of > > console output. > > > > Prakash > > > > > > > > [12/1/04 16:41:52:143 EST] 595bcd SystemErr R > > org.apache.fop.apps.FOPException: IO exception when parsing > > afp-fonts.xml; nested exception is java.io.FileNotFoundException > > [12/1/04 16:41:52:144 EST] 595bcd SystemErr R at > > org.apache.fop.apps.Driver.render(Driver.java:503) > > [12/1/04 16:41:52:145 EST] 595bcd SystemErr R at > > org.apache.fop.apps.Driver.run(Driver.java:565) > > [12/1/04 16:41:52:145 EST] 595bcd SystemErr R at > > gov.ssa.dps.xhtml.FileGenerator.convertFO2AFP(FileGenerator.java:313) > > [12/1/04 16:41:52:146 EST] 595bcd SystemErr R at > > gov.ssa.dps.xhtml.FileGenerator.convert(FileGenerator.java:258) > > [12/1/04 16:41:52:146 EST] 595bcd SystemErr R at > > gov.ssa.dps.xhtml.FileGenerator.generateFile(FileGenerator.java:135) > > [12/1/04 16:41:52:147 EST] 595bcd SystemErr R at > > gov.ssa.dps.manager.DocumentManagerImpl.getDocURL(DocumentManagerImpl. > > java:1 > > 13) > > [12/1/04 16:41:52:147 EST] 595bcd SystemErr R at > > java.lang.reflect.Method.invoke(Native Method) > > [12/1/04 16:41:52:147 EST] 595bcd SystemErr R at > > > gov.ssa.dps.manager.CommandExecutorImpl.invoke(CommandExecutorImpl.java:164) > > [12/1/04 16:41:52:148 EST] 595bcd SystemErr R at > > > gov.ssa.dps.manager.CommandExecutorImpl.execute(CommandExecutorImpl.java:62) > > [12/1/04 16:41:52:148 EST] 595bcd SystemErr R at > > > gov.ssa.dps.delegate.AbstractBusinessDelegate.execute(AbstractBusinessDelega > > te.java:113) > > [12/1/04 16:41:52:149 EST] 595bcd SystemErr R at > > > gov.ssa.dps.delegate.AbstractBusinessDelegate.execute(AbstractBusinessDelega > > te.java:96) > > [12/1/04 16:41:52:149 EST] 595bcd SystemErr R at > > gov.ssa.dps.delegate.DocumentBD.getDocURL(DocumentBD.java:32) > > [12/1/04 16:41:52:149 EST] 595bcd SystemErr R at > > gov.ssa.dps.action.GetFileURLAction.execute(GetFileURLAction.java:75) > > [12/1/04 16:41:52:150 EST] 595bcd SystemErr R at > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces > > sor.java:484) > > [12/1/04 16:41:52:150 EST] 595bcd SystemErr R at > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > > [12/1/04 16:41:52:151 EST] 595bcd SystemErr R at > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) > > [12/1/04 16:41:52:151 EST] 595bcd SystemErr R at > > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) > > [12/1/04 16:41:52:151 EST] 595bcd SystemErr R at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > > [12/1/04 16:41:52:152 EST] 595bcd SystemErr R at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > [12/1/04 16:41:52:153 EST] 595bcd SystemErr R at > > > com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle > > tInstance.java:110) > > [12/1/04 16:41:52:153 EST] 595bcd SystemErr R at > > > com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy > > cleServlet.java:174) > > [12/1/04 16:41:52:154 EST] 595bcd SystemErr R at > > > com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ > > let.java:313) > > [12/1/04 16:41:52:154 EST] 595bcd SystemErr R at > > > com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc > > leServlet.java:116) > > [12/1/04 16:41:52:155 EST] 595bcd SystemErr R at > > > com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java > > :283) > > [12/1/04 16:41:52:155 EST] 595bcd SystemErr R at > |