To Jeremias Maerki:
... If you run your sample form the command line with the -d option, you
get a better error message.

- The batch works ok (see next)

...Maybe you didn't set the second logger in
the MessageHandler class correctly

- What is second logger ?

To Oleg Tkachenko:
...Show us your font definition in userconfig.xml and FOP's debug trace.

I include userconfig.xml here, but nothing unusual in it:

(See attached file: userconfig.xml)

"[INFO]: building formatting object tree
[INFO]: [1]"

- this is all I get from logger when run from servlet

This command line works OK:

fop -d -c C:\javaProject\Klient\public_html\dt\fop\userconfig.xml -fo d:
\ -pdf d:\output.pdf

[DEBUG] Input mode:
[DEBUG] fo input file: d:\
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: d:\output.pdf
[DEBUG] user configuration file: C:
[DEBUG] debug mode on
[DEBUG] dump configuration
[DEBUG] quiet mode on
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[DEBUG] reading user configuration file
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[DEBUG] base directory: file:/d:/
[INFO] FOP 0.20.4
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[DEBUG] setting up fonts
[INFO] [1]
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[WARNING] table-layout=auto is not supported, using fixed!
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[WARNING] table-layout=auto is not supported, using fixed!
[DEBUG] Last page-sequence produced 1 pages.
[INFO] Parsing of document complete, stopping renderer
[DEBUG] Initial heap size: 1376Kb
[DEBUG] Current heap size: 2450Kb
[DEBUG] Total memory used: 1074Kb
[DEBUG]   Memory use is indicative; no GC was performed
[DEBUG]   These figures should not be used comparatively
[DEBUG] Total time used: 1042ms
[DEBUG] Pages rendered: 1
[DEBUG] Avg render time: 1042ms/page

I show here also my servlet  code (simplified) :

FileOutputStream log_fos = new FileOutputStream(logFile);
PrintStream log_ps = new PrintStream(log_fos);
if (log == null) {
             Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
             PatternFormatter formatter = new PatternFormatter(
                "[%{priority}]: %{message}\n%{throwable}" );
             LogTarget target = null;
             target = new StreamTarget(log_ps, formatter);
             log = hierarchy.getLoggerFor("fop");
FileInputStream file = new FileInputStream(FO_File);
Driver driver = new Driver();
driver.setLogger(new org.apache.avalon.framework.logger.LogKitLogger(log));
     // this is the only thing
//driver.setLogger(log);                                          // I must
change since 0.20.3
driver.setInputSource(new InputSource(file));
driver.setOutputStream(new FileOutputStream(outFile2));
Options options = new Options(new File( path_to_cfg + "userconfig.xml"));;                                                // here an
exception is thrown

                    Jeremias Maerki                                             
                    <[EMAIL PROTECTED]       Komu:   [EMAIL PROTECTED]          
          >              Kopie:                              
                                            Předmět:     Re: Strange error when 
upgrading from 0.20.3 to 0.20.4       
                    18.11.2002 12:24                                            
                    Odpovězte prosím                                            

That's probably a follow-up error because a font could not be loaded. If
you run your sample form the command line with the -d option, you should
get a better error message. Maybe you didn't set the second logger in
the MessageHandler class correctly because that's where the original
error message should have been logged. The logging in the maint branch
is still somewhat strange.

On 18.11.2002 12:01:52 Jiri_Nejedly wrote:
> I am trying to upgrade FOP from version 0.20.3 to 0.20.4 . I use Oracle's
> JDeveloper 9i
> To my project I added all libraries, which I found in fop.bat :
> fop.jar
> batik.jar
> xalan-2.3.1.jar
> xercesImpl-2.0.1.jar
> xml-apis.jar
> avalon-framework-cvs-20020315.jar
> logkit-1.0.jar
> When I process my FO file by fop.bat, everything is ok.
> When I do this in servlet, following error appears:
> [INFO]: building formatting object tree
> [INFO]: [1]                        - the logging stops here
> java.lang.NullPointerException int
> org.apache.fop.render.pdf.fonts.LazyFont.getAscender(int) int
> org.apache.fop.layout.FontState.getAscender() void
> org.apache.fop.layout.LineArea.(org.apache.fop.layout.FontState, int,
> int, int, int, org.apache.fop.layout.LineArea) void
> org.apache.fop.layout.BlockArea.start()
> void

> void

> void,
> java.lang.String, java.lang.String) java.lang.String
> oracle.xml.parser.v2.NonValidatingParser.parseElement()
> void
> oracle.xml.parser.v2.NonValidatingParser.parseRootElement()
> void
> oracle.xml.parser.v2.NonValidatingParser.parseDocument()
> void
> oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
> void
> org.apache.fop.apps.Driver.render(org.xml.sax.XMLReader,
> org.xml.sax.InputSource) void void
> or.jbo.html.beans.ReportShowBean.kresli() void
> _ReportShowDT._jspService(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse) ReportShowDT.jsp:23 void
> oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) void

> javax.servlet.http.HttpServletResponse, java.lang.String)
> void

> javax.servlet.http.HttpServletResponse) void

> javax.servlet.http.HttpServletResponse) void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) void

> javax.servlet.ServletResponse) void

> javax.servlet.http.HttpServletResponse)
> boolean

> com.evermind.server.http.EvermindHttpServletRequest,
> com.evermind.server.http.EvermindHttpServletResponse,,
>, boolean) void
> void
> Any suggestions what's wrong ? Thanks.

Jeremias Maerki

Attachment: userconfig.xml
Description: Binary data

Reply via email to