You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by John Quinn <qu...@gmail.com> on 2006/04/13 16:49:51 UTC

Re: Namespace not found error when trying to generate PDF in Servlet using FOP

I have tried using Saxon, but the application throws a config exception at
that point because the commons digester must check for a validating
parser and it say the aelfred sax parser implementation is not such a parser
(packaged with Saxon 6.5.3):

javax.xml.parsers.ParserConfigurationException: AElfred parser is
non-validating

at com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(
SAXParserFactoryImpl.java:34)

at org.apache.commons.digester.Digester.getParser(Digester.java:686)

at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)

at org.apache.commons.digester.Digester.parse(Digester.java:1548)

at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
ActionServlet.java:708)

at org.apache.struts.action.ActionServlet.initModuleConfig(
ActionServlet.java:670)

at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)

at javax.servlet.GenericServlet.init(GenericServlet.java:211)
This is version6.5.3  of Saxon, as this is the version the documentation
pointed to as being compatible with FOP.  But clearly not compatible with
JBoss and the application.

Any other ideas on how to clear up the Namespace problem.

Thanks,
John



On 3/21/06, John Quinn <qu...@gmail.com> wrote:
>
>  For clarification, xml_apis.jar is the correct name of the duplicate jar
> file that I took out of my war file and then had the admins redeploy the new
> war file to JBoss.
>
> I should add that there are no endorsed jars in the JRE under the
> JAVA_HOME/lib/endorsed directory. In fact, there is no endorsed directory at
> all in the Java 1.4.2_10 environment on the Redhat 2.1 environment.
>
> Still looking for ideas....
>
> Thanks,
>  John
>
>
>  On 3/21/06, John Quinn <quinnjohn58@gmail.com > wrote:
> >
> >  I did find an extra xmlapi.jar in my war file.  However, none of the
> > other endorsed libraries in JBoss are in my war.  I have had the admins
> > deploy the new war to JBoss in the Redhat 2.1 environment and still get
> > the same error on the same line of code.
> >
> > This problem is keeping us from going to production, so any new ideas
> > are definitely welcome!
> >
> > Thanks,
> >
> > John
> >
> >
> >  On 3/21/06, Jeremias Maerki <dev@jeremias-maerki.ch > wrote:
> > >
> > > Make sure you don't have multiple xalan.jars in your environment. In
> > > JDKs 1.4 or later no XML parser nor XSLT implementation should show up
> > >
> > > in WEB-INF/lib directories or in normal lib directories. Rule of
> > > thumb:
> > > The implementation JARs for XML parsers (ex. Xerces) and XSLT
> > > implementations (ex. Xalan-J) should only be found in the lib/endorsed
> > > directory of your JRE (or in specialized "endorsed" directories of
> > > certain web containers) and nowhere else. Well, that's not all there
> > > is
> > > to it but it is sufficient for every normal Java developer.
> > >
> > > On 20.03.2006 23:58:57 John Quinn wrote:
> > > > Okay, I ran fop using the command line with sample files built with
> > > the
> > > > servlet in the windows environment in the Redhat 2.1 environment
> > > using the
> > > > xalan jar from the endorsed library in JBoss 4.0.3SP1.  It ran just
> > > fine.
> > > >
> > > > Any ideas from here?
> > > >
> > > >
> > > > Thanks
> > > > John
> > > >
> > > >
> > > > On 3/20/06, Andreas L Delmelle <a_l.delmelle@pandora.be > wrote:
> > > > >
> > > > > On Mar 20, 2006, at 21:24, John Quinn wrote:
> > > > >
> > > > > H,
> > > > >
> > > > > > I am receiving an exception when I try to generate a PDF in a
> > > > > > Servlet using FOP under JBoss4.0.1SP1 (and JBoss4.0.3SP1) in a
> > > > > > Redhat linux 2.1 OS.
> > > > > >
> > > > > > I am running the same code under  a Suse linux and Win XP OS
> > > > > > without any errors using JBoss.
> > > > > >
> > > > > > Here's the Exception:
> > > > > > 2006-03-02 15:17:21,969 INFO  [STDOUT] 15:17:21,958 ERROR
> > > > > > [PDFServlet] Error gen
> > > > > > erating PDF file
> > > > > > javax.xml.transform.TransformerConfigurationException:
> > > > > > javax.xml.transform.Trans
> > > > > > formerException: org.xml.sax.SAXException : Missing or incorrect
> > > > > > XSLT Namespace.
> > > > > >         at
> > > > > > org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
> > > (Transf
> > > > > > ormerFactoryImpl.java :807)
> > > > >
> > > > > <snip />
> > > > > > Can anyone tell me what the environment change is that could
> > > cause
> > > > > > the creationn of a new template to fail with the above
> > > exception?
> > > > >
> > > > > Different Xalan versions, maybe? Better make sure the very same
> > > one
> > > > > is used in all three environments (= put the latest Xalan jar in
> > > the
> > > > > $JAVA_HOME$/lib/endorsed directory on all three boxes; if you're
> > > > > using 1.4+ on all of them).
> > >
> > >
> > > Jeremias Maerki
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > >
> > >
> >
>

Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
John Quinn wrote:
> I am taking the value of external xml entities.

I suppose you mean you *didn't* do this.

> I would like to note that I'm getting the following warnings on the systems
> that it does run on:
> 
> [WARNING] table-layout=auto is not supported, using fixed!

That's warning warning you about auto table layout not being
implemented, just as it says. You can avoid getting it by
specifying table-layout="fixed" on every fo:table you have.

> I'm not an expert on xmlint, but I ran it and it didn't throw any errors.

It's likely that there are no problems with the files, and
something is wrong with the JBoss environment. Try to produce
a minimal servlet (just calling TransformerFactory.newInstance()
.newTemplates(...) with your XSLT as source. If this works,
get your original code and trim it down until the error disappears.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by John Quinn <qu...@gmail.com>.
I have already pushed the xml into a file and performed the xslt on the
Redhat2.1 box that gives me the headache.  I've run FOP command line and it
output the expected PDF file.  It just doesn't work under JBoss. It's using
the Xerces implementation (which is in the JBoss endorsed library) currently
with saxon, previously I was using the default implementation packaged with
Xalan, but switched when I received a Namespace error using that
implementation of xslt.  The namespace is correct, however, it is doubly
defined, but I think that is okay (once in the header, and again when
defining the fo:root).  I direct the parser builder via the
jaxp.propertiesfile.  If I don't with Saxon
6.5.3, I get an error due to the aelfred parser not being a validating
parser (apache commons throws an exception and stops processing at this
point).

I have no xsl:include or xsl:import statements.
I am setting up the stream with a Url to the xsl file.

I am taking the value of external xml entities.

I would like to note that I'm getting the following warnings on the systems
that it does run on:

[WARNING] table-layout=auto is not supported, using fixed!
I'm not an expert on xmlint, but I ran it and it didn't throw any errors.  I
also put it through an xml/xsl editor to see if it would catch anything.  It
runs it all the way through FOP with no problems using saxon 8.7, saxon
6.5.5, and xalan 2.5.2 using the stylus studio software. I'm running out of
options.

The first 40 lines or so of the xsl are below (note that it complains about
line 37, but in my file line 37 has no '&', nor does the xml since I ran
through the debugger to catch the xml output to the transformation - that it
never reaches.  I am thinking that the xsl processors line 37 is probably
the apply-templates line):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:fo="
http://www.w3.org/1999/XSL/Format">

<xsl:attribute-set name="table">

<xsl:attribute name="font-size">8pt</xsl:attribute>

</xsl:attribute-set>

<xsl:template match="/">

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<!-- defines the layout master -->

<fo:layout-master-set>

<!-- layout for first page -->

<fo:simple-page-master master-name="first-page"

page-height="11in"

page-width="8.5in"

margin-top="0.5in"

margin-bottom="0.5in"

margin-left="0.5in"

margin-right="0.5in">

<fo:region-body margin-left="0in" margin-right="0in" margin-top="0in"
margin-bottom="0.25in"/>

<fo:region-after region-name="first-page-after" extent="0.25in"/>

</fo:simple-page-master>

<!-- layout for the rest of the pages -->

<fo:simple-page-master master-name="other-page"

page-height="11in"

page-width="8.5in"

margin-top="0.5in"

margin-bottom="0.5in"

margin-left="0.5in"

margin-right="0.5in">

<fo:region-body margin-left="0in" margin-right="0in" margin-top="0.2in"
margin-bottom="0.25in"/>

<fo:region-before region-name="other-page-before" extent="0.2in"/>

<fo:region-after region-name="other-page-after" extent="0.25in"/>

</fo:simple-page-master>

<fo:page-sequence-master master-name="report">

<fo:repeatable-page-master-alternatives>

<fo:conditional-page-master-reference master-reference="other-page"
page-position="rest" />

<fo:conditional-page-master-reference master-reference="first-page"
page-position="first" />

</fo:repeatable-page-master-alternatives>

</fo:page-sequence-master>

</fo:layout-master-set>

<xsl:apply-templates select="PORemittanceReport"/>

</fo:root>

</xsl:template>

and all the other templates after this.

Any ideas are more than welcome.

Thanks,
John

On 4/18/06, J.Pietschmann <j3...@yahoo.de> wrote:
>
> John Quinn wrote:
> > The xml has no '&' in it.  It is formed directly from data that is
> extracted
> > from the database.
>
> Well, experience tells that database content is the most common
> source of trouble like unescaped ampersands. But you're right,
> the error message says indeed the problem is with the style sheet.
>
> Are you using xsl:import or xsl:include? Are you referring to
> a DTD or external XML entities? Are you using an URLResolver or
> an entity resolver? Could you check whether the XML parser instance
> you use is provided by the JBoss environment (you might have to
> check the service definition for the parser factory, or better
> talk to someone who knows how parser instance creation is handled
> by JBoss).
>
> You should also try to save a sample XML source into a file and
> run the FOP command line application with your XML+XSLT. Checking
> the XSLT with xmllint might be an idea too.
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
John Quinn wrote:
> The xml has no '&' in it.  It is formed directly from data that is extracted
> from the database.

Well, experience tells that database content is the most common
source of trouble like unescaped ampersands. But you're right,
the error message says indeed the problem is with the style sheet.

Are you using xsl:import or xsl:include? Are you referring to
a DTD or external XML entities? Are you using an URLResolver or
an entity resolver? Could you check whether the XML parser instance
you use is provided by the JBoss environment (you might have to
check the service definition for the parser factory, or better
talk to someone who knows how parser instance creation is handled
by JBoss).

You should also try to save a sample XML source into a file and
run the FOP command line application with your XML+XSLT. Checking
the XSLT with xmllint might be an idea too.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by John Quinn <qu...@gmail.com>.
The xml has no '&' in it.  It is formed directly from data that is extracted
from the database.

Why I am focused on the xsl is due to the fact that it dies on this line:
at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:119)
        at com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryI
mpl.java:127)
        at com.kroger.accounting.ad.reports.PDFReport.generate(
PDFReport.java:98

)

and line 98 in PDFReport is this:
  Templates xslTemplate = tf.newTemplates(new StreamSource(xslInputStream));

At this point, the template should have no knowledge of the xml that is to
be transformed.  That doesn't happen until the xlst.transform call on the
xml and xsl data as a DOMSource and StreamResult respectively.

So do you still think the xml could be the problem when it is creating the
exception on this line?
Also, does the null cause a problem, or is this just an artifact of being
created directly from the database data?

The xml generated is this ( This is the whole thing, I formatted this simple
case, it is really one big line the way it is generated in the application):
<PORemittanceReport>
 <Comments></Comments>
 <DateOrdered>04/17/2006</DateOrdered>
        <DivisionCity></DivisionCity>
        <DivisionName>DIVISION-11</DivisionName>
        <DivisionState>OH</DivisionState>
        <DivisionStreet1></DivisionStreet1>
        <DivisionStreet2></DivisionStreet2>
 <DivisionZip></DivisionZip>
        <PoTotal>$1,000.00</PoTotal>
        <Pos>
  <PO>
   <Account>32-9976</Account>
   <Description>011-D00052-INSERTS</Description>
   <Event></Event>
   <EventDate>04/06/2006</EventDate>
   <EventDay></EventDay>
   <Market>ALL STORES</Market>
   <Period>03</Period>
   <PoAmount>$1,000.00</PoAmount>
   <PoDetails></PoDetails>
   <PoNumber>011000000058</PoNumber>
   <Year>2006</Year>
  </PO>
 </Pos>
 <UserFax>513-984-6709</UserFax>
 <UserName>advertising</UserName>
 <UserPhone>513-984-6700</UserPhone>
 <VendorCity>CAROLLTON</VendorCity>
 <VendorContactName></VendorContactName>
 <VendorFax></VendorFax>
 <VendorName>EAA NEWSPAPERS OF W. GEORGIA</VendorName>
 <VendorNumber>D00052</VendorNumber>
 <VendorPhone></VendorPhone>
 <VendorState>GA</VendorState>
 <VendorStreet1>PO BOX 460</VendorStreet1>
 <VendorStreet2>CIRCULATION ACCOUNT</VendorStreet2>
 <VendorVendorName>NEWSPAPERS OF WEST GEORGIA</VendorVendorName>
 <VendorZip>301170000</VendorZip>
</PORemittanceReport>

The xsl is 276 lines of code.  I am wondering if I should change the
encoding from:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
to
<?xml version="1.0" encoding="ISO-8859-1"?>
Although I don't understand why changing the encoding  on JBoss 4.0.3SP1 on
Suse or Windows (both of these platforms work as is) to JBoss 4.0.3SP1 on
Redhat 2.1 would require the change in encoding to work.

Again, any and all help/ideas appreciated.


Thanks,
John



On 4/14/06, J.Pietschmann <j3...@yahoo.de> wrote:
>
> John Quinn wrote:
> > Okay, saxon is now running under JBoss.  I still fail at the same line
> with
> > the following error now:
> ...
> > 13:57:58,406 INFO  [STDOUT] Error on line 37 column 81 of null:
> >   Error reported by XML parser: The entity name must immediately follow
> the
> > '&'
> > in the entity reference.
> ...
> > But I don't know why it talks about null, and the only '&' in the file
> are
> > of the following nature:
>
> I guess the problem is in the XML source, not the XSL style sheet. I
> suspect a stray (unquoted) ampersand there. The "null" is the name
> SystemId of the XML input. Apparently you didn't construct the XML
> input directly from a file or URL.
>
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
John Quinn wrote:
> Okay, saxon is now running under JBoss.  I still fail at the same line with
> the following error now:
...
> 13:57:58,406 INFO  [STDOUT] Error on line 37 column 81 of null:
>   Error reported by XML parser: The entity name must immediately follow the
> '&'
> in the entity reference.
...
> But I don't know why it talks about null, and the only '&' in the file are
> of the following nature:

I guess the problem is in the XML source, not the XSL style sheet. I
suspect a stray (unquoted) ampersand there. The "null" is the name
SystemId of the XML input. Apparently you didn't construct the XML
input directly from a file or URL.


J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by John Quinn <qu...@gmail.com>.
Okay, saxon is now running under JBoss.  I still fail at the same line with
the following error now:
13:57:58,102 INFO  [PDFReport] PDFReport code source for TransformerFactory:
(fi
le:/opt/opensource/jboss-4.0.3SP1
/server/test1/tmp/deploy/tmp14491teaa.war/WEB-I
NF/lib/saxon.jar <no certificates>)
13:57:58,103 INFO  [PDFReport] PDFReport package for TransformerFactory:
package
 com.icl.saxon
13:57:58,406 INFO  [STDOUT] Error on line 37 column 81 of null:
  Error reported by XML parser: The entity name must immediately follow the
'&'
in the entity reference.
13:57:58,409 ERROR [PDFServlet] Error generating PDF file
javax.xml.transform.TransformerConfigurationException: Failed to parse
styleshee
t
        at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java
:119)
        at com.icl.saxon.TransformerFactoryImpl.newTemplates
(TransformerFactoryI
mpl.java:127)
        at com.kroger.accounting.ad.reports.PDFReport.generate(
PDFReport.java:98
)
        at com.kroger.accounting.ad.view.reports.PDFServlet.generateReport
(PDFSe
rvlet.java:80)
        at com.kroger.accounting.ad.view.reports.PDFServlet.doGet(
PDFServlet.jav
a:70)

I'm not sure why it is failing on line 37.  The xsl file line 37 is below:
<fo:page-sequence-master master-name="report">

The error first states:
 Error on line 37 column 81 of null:
  Error reported by XML parser: The entity name must immediately follow the
'&'
in the entity reference.


But I don't know why it talks about null, and the only '&' in the file are
of the following nature:

<fo:list-item-body start-indent="body-start()">

        <fo:block white-space-collapse="false">

                <xsl:value-of
select="VendorNumber"/><xsl:text>&#xA0;</xsl:text>

        </fo:block>

</fo:list-item-body>



and those statements aren't even close to line 37 of the  xsl file (which is
what is being placed in the Stream on line 98 of PDFReport):

Templates xslTemplate = tf.newTemplates(new StreamSource(xslInputStream));

Does the null reference make sense to anyone in light of the error I have
from Saxon?

Thanks,
John



On 4/14/06, John Quinn <qu...@gmail.com> wrote:
>
>  I found it on saxon.sourceforge.net:
> Saxon 6.5.4 dropped support for certain rarely-used features of Saxon
> 6.5.3, notably support for JDK 1.1 and the Microsoft Java VM, support for
> FOP integration, and the applet interface. Users requiring these features
> should continue to use version 6.5.3<http://saxon.sourceforge.net/#F6.5.3>
> .
>
> I'll try forcing Xerces on Saxon.
>
> Thanks,
>  John
>
>
>  On 4/13/06, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> >
> > Where did you find something that says only SAXON 6.5.3 is compatible
> > with FOP? FOP should work fine with any XML Parser and XSLT
> > implementation as long as it implements the JAXP API and does not have
> > any strange bugs. You can also try to force SAXON to use Xerces by
> > setting the "javax.xml.parsers.SAXParserFactory" system property to
> > "org.apache.xerces.jaxp.SAXParserFactoryImpl".
> >
> > On 13.04.2006 16:49:51 John Quinn wrote:
> > > I have tried using Saxon, but the application throws a config
> > exception at
> > > that point because the commons digester must check for a validating
> > > parser and it say the aelfred sax parser implementation is not such a
> > parser
> > > (packaged with Saxon 6.5.3):
> > >
> > > javax.xml.parsers.ParserConfigurationException: AElfred parser is
> > > non-validating
> > >
> > > at com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(
> > > SAXParserFactoryImpl.java:34)
> > >
> > > at org.apache.commons.digester.Digester.getParser(Digester.java:686)
> > >
> > > at org.apache.commons.digester.Digester.getXMLReader (Digester.java
> > :902)
> > >
> > > at org.apache.commons.digester.Digester.parse(Digester.java:1548)
> > >
> > > at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
> > > ActionServlet.java:708)
> > >
> > > at org.apache.struts.action.ActionServlet.initModuleConfig(
> > > ActionServlet.java:670)
> > >
> > > at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
> > >
> > > at javax.servlet.GenericServlet.init (GenericServlet.java:211)
> > > This is version6.5.3  of Saxon, as this is the version the
> > documentation
> > > pointed to as being compatible with FOP.  But clearly not compatible
> > with
> > > JBoss and the application.
> > >
> > > Any other ideas on how to clear up the Namespace problem.
> > <snip/>
> >
> >
> > Jeremias Maerki
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
> >
>

Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by John Quinn <qu...@gmail.com>.
I found it on saxon.sourceforge.net:
Saxon 6.5.4 dropped support for certain rarely-used features of Saxon 6.5.3,
notably support for JDK 1.1 and the Microsoft Java VM, support for FOP
integration, and the applet interface. Users requiring these features should
continue to use version 6.5.3 <http://saxon.sourceforge.net/#F6.5.3>.

I'll try forcing Xerces on Saxon.

Thanks,
John


On 4/13/06, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
>
> Where did you find something that says only SAXON 6.5.3 is compatible
> with FOP? FOP should work fine with any XML Parser and XSLT
> implementation as long as it implements the JAXP API and does not have
> any strange bugs. You can also try to force SAXON to use Xerces by
> setting the "javax.xml.parsers.SAXParserFactory" system property to
> "org.apache.xerces.jaxp.SAXParserFactoryImpl".
>
> On 13.04.2006 16:49:51 John Quinn wrote:
> > I have tried using Saxon, but the application throws a config exception
> at
> > that point because the commons digester must check for a validating
> > parser and it say the aelfred sax parser implementation is not such a
> parser
> > (packaged with Saxon 6.5.3):
> >
> > javax.xml.parsers.ParserConfigurationException: AElfred parser is
> > non-validating
> >
> > at com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(
> > SAXParserFactoryImpl.java:34)
> >
> > at org.apache.commons.digester.Digester.getParser(Digester.java:686)
> >
> > at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
> >
> > at org.apache.commons.digester.Digester.parse(Digester.java:1548)
> >
> > at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
> > ActionServlet.java:708)
> >
> > at org.apache.struts.action.ActionServlet.initModuleConfig(
> > ActionServlet.java:670)
> >
> > at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
> >
> > at javax.servlet.GenericServlet.init(GenericServlet.java:211)
> > This is version6.5.3  of Saxon, as this is the version the documentation
> > pointed to as being compatible with FOP.  But clearly not compatible
> with
> > JBoss and the application.
> >
> > Any other ideas on how to clear up the Namespace problem.
> <snip/>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: Namespace not found error when trying to generate PDF in Servlet using FOP

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Where did you find something that says only SAXON 6.5.3 is compatible
with FOP? FOP should work fine with any XML Parser and XSLT
implementation as long as it implements the JAXP API and does not have
any strange bugs. You can also try to force SAXON to use Xerces by
setting the "javax.xml.parsers.SAXParserFactory" system property to 
"org.apache.xerces.jaxp.SAXParserFactoryImpl".

On 13.04.2006 16:49:51 John Quinn wrote:
> I have tried using Saxon, but the application throws a config exception at
> that point because the commons digester must check for a validating
> parser and it say the aelfred sax parser implementation is not such a parser
> (packaged with Saxon 6.5.3):
> 
> javax.xml.parsers.ParserConfigurationException: AElfred parser is
> non-validating
> 
> at com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(
> SAXParserFactoryImpl.java:34)
> 
> at org.apache.commons.digester.Digester.getParser(Digester.java:686)
> 
> at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
> 
> at org.apache.commons.digester.Digester.parse(Digester.java:1548)
> 
> at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
> ActionServlet.java:708)
> 
> at org.apache.struts.action.ActionServlet.initModuleConfig(
> ActionServlet.java:670)
> 
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
> 
> at javax.servlet.GenericServlet.init(GenericServlet.java:211)
> This is version6.5.3  of Saxon, as this is the version the documentation
> pointed to as being compatible with FOP.  But clearly not compatible with
> JBoss and the application.
> 
> Any other ideas on how to clear up the Namespace problem.
<snip/>


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org