I am trying to upgrade version 0.20.3. to 0.20.4 , but have problems.

If I try run FOP.BAT , everything is OK, the problem is in servlet.

The error

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)

StreamRenderer.java:210 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) Driver.java:474 void
org.apache.fop.apps.Driver.run() Driver.java:547 void
or.jbo.html.beans.ReportShowBean.kresli() .....

occurs in org.apache.fop.renderer.pdf.FonteReader.java in line 67:

 parser.parse(path);

where path is
"/C:/JavaProject/Klient/classes/jORManClient/Reports/Metrics/arial.xml".
I tried many forms of paths such as "C:/ ...", "file:C:/...",
"file:///C:/..." , but I think that my userconf.xml is OK.
The 0.20.3 accepted it and 0.20.4 bat version accepts it too . The error
logs like this:

[ERROR]: Failed to read font metrics file
/C:/JavaProject/Klient/classes/jORManClient/Reports/Metrics/arial.xml :
Invalid InputSource.

There is a small fragment of userconfig.xml:

<font metrics-file
="/C:/JavaProject/Klient/classes/jORManClient/Reports/Metrics/arial.xml"
kerning="yes" embed-file
="/C:/JavaProject/Klient/classes/jORManClient/Reports/Metrics/arial.ttf">
  <font-triplet name="Arial" style="normal" weight="normal"/>
</font>

After I set up logging right, I found out one difference between bat and
servlet:

Servlet uses

[DEBUG]: Using oracle.xml.parser.v2.SAXParser as SAX2 Parser           ;
the library xmlparserv2.jar is necessary for  JDeveloper 9i

while fop bat uses

[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser

So I asked how to choose another parser. Marko Petersen gave me this code

System.setProperty( "org.xml.sax.driver",
"org.apache.xerces.parsers.SAXParser" );

I tried it, but it makes this  error

java.lang.ClassNotFoundException:
org.apache.xerces.jaxp.SAXParserFactoryImpl

in org.apache.fop.apps.Driver.java in line 181:

return javax.xml.parsers.SAXParserFactory.newInstance().newSAXParser
().getXMLReader().getClass().getName();

I'm positive, I have library xercesImpl-2.0.1.jar in classpath (the
SAXParserFactoryImpl.class is in it ).

I also find this code

            System.setProperty("javax.xml.parsers.SAXParserFactory",
            "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
            XMLReader reader = new org.apache.xerces.parsers.SAXParser();
            driver.setXMLReader(reader);

It seems, that, for parsing userconging.xml is used another parser, but the
error still ocurrs. Strange thing - the logger still says, it is used
oracle's parser
([DEBUG]: Using oracle.xml.parser.v2.SAXParser as SAX2 Parser)

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)

StreamRenderer.java:210 void
org.apache.fop.fo.FOTreeBuilder.endElement(java.lang.String,
java.lang.String, java.lang.String) void
org.apache.xerces.parsers.AbstractSAXParser.endElement(org.apache.xerces.xni.QName,

org.apache.xerces.xni.Augmentations) AbstractSAXParser.java:559 void
org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(org.apache.xerces.xni.QName,

org.apache.xerces.xni.Augmentations, boolean) XMLNamespaceBinder.java:853
void
org.apache.xerces.impl.XMLNamespaceBinder.endElement(org.apache.xerces.xni.QName,

org.apache.xerces.xni.Augmentations) XMLNamespaceBinder.java:643 void
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(org.apache.xerces.xni.QName,

org.apache.xerces.xni.Augmentations, boolean) XMLDTDValidator.java:2978
void
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(org.apache.xerces.xni.QName,

org.apache.xerces.xni.Augmentations) XMLDTDValidator.java:918 int
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(org.apache.xerces.xni.QName,

boolean) XMLDocumentFragmentScannerImpl.java:1145 int
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement()
XMLDocumentFragmentScannerImpl.java:988 boolean
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(boolean)

XMLDocumentFragmentScannerImpl.java:1446 boolean
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(boolean)
XMLDocumentFragmentScannerImpl.java:333 boolean
org.apache.xerces.parsers.StandardParserConfiguration.parse(boolean)
StandardParserConfiguration.java:529 void
org.apache.xerces.parsers.StandardParserConfiguration.parse(org.apache.xerces.xni.parser.XMLInputSource)

StandardParserConfiguration.java:585 void
org.apache.xerces.parsers.XMLParser.parse(org.apache.xerces.xni.parser.XMLInputSource)

XMLParser.java:147 void
org.apache.xerces.parsers.AbstractSAXParser.parse(org.xml.sax.InputSource)
AbstractSAXParser.java:1148 void
org.apache.fop.apps.Driver.render(org.xml.sax.XMLReader,
org.xml.sax.InputSource) Driver.java:474 void
org.apache.fop.apps.Driver.run() Driver.java:547 void
or.jbo.html.beans.ReportShowBean.kresli() ...



I'll give this problem one more day, then I return back to 0.20.3 version.










---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to