To Jeremias Maerki:
-------------------------------
... If you run your sample form the command line with the -d option, you
should
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:
\test.fo -pdf d:\output.pdf

[DEBUG] Input mode:
[DEBUG] FO
[DEBUG] fo input file: d:\test.fo
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: d:\output.pdf
[DEBUG] OPTIONS
[DEBUG] user configuration file: C:
\javaProject\Klient\public_html\dt\fop\userconfig.xml
[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);
             hierarchy.setDefaultLogTarget(target);
             log = hierarchy.getLoggerFor("fop");
             log.setPriority(Priority.DEBUG);
}
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.setRenderer(Driver.RENDER_PDF);
driver.setInputSource(new InputSource(file));
driver.setOutputStream(new FileOutputStream(outFile2));
driver.setErrorDump(true);
Options options = new Options(new File( path_to_cfg + "userconfig.xml"));
driver.run();                                                // here an
exception is thrown
log_fos.close();








                                                                                
                                      
                    Jeremias Maerki                                             
                                      
                    <[EMAIL PROTECTED]       Komu:   [EMAIL PROTECTED]          
                                 
                    enmail.ch>              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                                            
                                      
                    uživateli                                                   
                                      
                    fop-user                                                    
                                      
                                                                                
                                      
                                                                                
                                      




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, int, org.apache.fop.layout.LineArea) void
> org.apache.fop.layout.BlockArea.start() org.apache.fop.fo.Status
> org.apache.fop.fo.flow.Block.layout(org.apache.fop.layout.Area)
> org.apache.fop.fo.Status
> org.apache.fop.fo.flow.Flow.layout(org.apache.fop.layout.Area,
> org.apache.fop.fo.pagination.Region) org.apache.fop.fo.Status
> org.apache.fop.fo.flow.Flow.layout(org.apache.fop.layout.Area) void
>
org.apache.fop.fo.pagination.PageSequence.format(org.apache.fop.layout.AreaTree)

>
> void
>
org.apache.fop.apps.StreamRenderer.render(org.apache.fop.fo.pagination.PageSequence)

>
> void org.apache.fop.fo.FOTreeBuilder.endElement(java.lang.String,
> java.lang.String, java.lang.String) java.lang.String
> oracle.xml.parser.v2.NonValidatingParser.parseElement()
> NonValidatingParser.java:1112 void
> oracle.xml.parser.v2.NonValidatingParser.parseRootElement()
> NonValidatingParser.java:287 void
> oracle.xml.parser.v2.NonValidatingParser.parseDocument()
> NonValidatingParser.java:254 void
> oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
> XMLParser.java:141 void
> org.apache.fop.apps.Driver.render(org.xml.sax.XMLReader,
> org.xml.sax.InputSource) void org.apache.fop.apps.Driver.run() void
> or.jbo.html.beans.ReportShowBean.kresli() ReportShowBean.java:554 void
_dt.
> _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) HttpJsp.java:119 void
>
oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest,

>
> javax.servlet.http.HttpServletResponse, java.lang.String)
> JspPageTable.java:302 void
>
oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest,

>
> javax.servlet.http.HttpServletResponse) JspServlet.java:407 void
>
oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest,

>
> javax.servlet.http.HttpServletResponse) JspServlet.java:328 void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) HttpServlet.java:336 void
>
com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest,

>
> javax.servlet.ServletResponse) ServletRequestDispatcher.java:684 void
>
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest,

>
> javax.servlet.http.HttpServletResponse) ServletRequestDispatcher.java:269
> boolean
>
com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread,

>
> com.evermind.server.http.EvermindHttpServletRequest,
> com.evermind.server.http.EvermindHttpServletResponse,
java.io.InputStream,
> java.io.OutputStream, boolean) HttpRequestHandler.java:735 void
> com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
> HttpRequestHandler.java:243 void com.evermind.util.ThreadPoolThread.run()
> ThreadPoolThread.java:64
>
> Any suggestions what's wrong ? Thanks.
>



Jeremias Maerki



Attachment: userconfig.xml
Description: Binary data

Reply via email to