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 macsmaker <ma...@aol.com> on 2007/10/29 21:30:07 UTC
0.94 as a servlet?
(in response to issues with external-graphic..)
Okay, I upgraded to 0.94 because I found other things that may be issues
with 0.20.5. Now I'm completely hosed... Using the supplied FOP servlet, the
same xml and xsl files (i'm using a option on the servlet) I get the
following error:
javax.servlet.ServletException: org.xml.sax.SAXParseException: Content is
not allowed in prolog
(I'm not going to include all the error info unless someone wants it.)
I have researched the problem and cannot find an answer to it. The only
"answers" I can find are:
(1)incorrect coding on the xml declaration; (2)the xml file is not well
formed; (3)there are extraneous characters in the file.
I have made sure that my XML, XSL and any associated files I can find are
well formed, using UTF-8 for encoding, and no extraneous characters. I even
pared my XML file down to only a few elements and took out any unecessary
attributes. I have also looked at the web.xml supplied with distribution,
but don't see anything wrong with. Don't want to change it and potentially
make things worse.
No luck. I'm going back to 0.20.5 until I can figure this out.
--
View this message in context: http://www.nabble.com/0.94-as-a-servlet--tf4714463.html#a13476183
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: 0.94 as a servlet?
Posted by macsmaker <ma...@aol.com>.
More info on 0.94...
There were issues with my xsl file that worked with 0.20.5. I found these
using the command line to create the pdf. I fixed those and I still get the
"Content not allowed in prolog" error call the fop processor using a
servlet.
For grins, I used the command line and generated a .fo file from my xml/xsl
files. That DOES work calling the servlet. I'm able to generate a pdf from
it.
Does this give anyone any ideas? I would really like for this work...
macsmaker wrote:
>
> (in response to issues with external-graphic..)
>
> Okay, I upgraded to 0.94 because I found other things that may be issues
> with 0.20.5. Now I'm completely hosed... Using the supplied FOP servlet,
> the same xml and xsl files (i'm using a option on the servlet) I get the
> following error:
>
> javax.servlet.ServletException: org.xml.sax.SAXParseException: Content is
> not allowed in prolog
> (I'm not going to include all the error info unless someone wants it.)
>
> I have researched the problem and cannot find an answer to it. The only
> "answers" I can find are:
> (1)incorrect coding on the xml declaration; (2)the xml file is not well
> formed; (3)there are extraneous characters in the file.
>
> I have made sure that my XML, XSL and any associated files I can find are
> well formed, using UTF-8 for encoding, and no extraneous characters. I
> even pared my XML file down to only a few elements and took out any
> unecessary attributes. I have also looked at the web.xml supplied with
> distribution, but don't see anything wrong with. Don't want to change it
> and potentially make things worse.
>
> No luck. I'm going back to 0.20.5 until I can figure this out.
>
--
View this message in context: http://www.nabble.com/0.94-as-a-servlet--tf4714463.html#a13476185
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: 0.94 as a servlet?
Posted by macsmaker <ma...@aol.com>.
Mr. Sancho, thanks for the reponse.
My research turned up this as a possibility, so I did check it. There are no
extraneous characters in my XML file.
I can run this fine from the command line (using JAVA). It does generate a
pdf. I can also generate a .fo file from my .xml and .xsl and use the
servlet to generate a pdf. Works fine. But if I use the servlet passing the
.xml and .xsl files I get the error.
Again, thanks for the help.
Pascal Sancho wrote:
>
> Hi,
>
> "Content not allowed in prolog" is thrown by xml parser, not FOP (see
> archives at
> http://www.nabble.com/forum/Search.jtp?query=content+allowed+prolog+message%3A%22Content+not+allowed+in+prolog%22&sort=date&local=y&forum=353&daterange=0)
>
> Generally, there is extra character before xml declaration, probably
> linefeed, or erroneous Byte Outer Marker.
>
> Pascal
>
>> -----Message d'origine-----
>> De : macsmaker [mailto:macsmaker@aol.com]
>> Envoyé : lundi 29 octobre 2007 21:32
>> À : fop-users@xmlgraphics.apache.org
>> Objet : Re: 0.94 as a servlet?
>>
>>
>> More info on 0.94...
>>
>> There were issues with my xsl file that worked with 0.20.5. I
>> found these
>> using the command line to create the pdf. I fixed those and I
>> still get the
>> "Content not allowed in prolog" error call the fop processor using a
>> servlet.
>>
>> For grins, I used the command line and generated a .fo file
>> from my xml/xsl
>> files. That DOES work calling the servlet. I'm able to
>> generate a pdf from
>> it.
>>
>> Does this give anyone any ideas? I would really like for this work...
>>
>>
>> macsmaker wrote:
>> >
>> > (in response to issues with external-graphic..)
>> >
>> > Okay, I upgraded to 0.94 because I found other things that
>> may be issues
>> > with 0.20.5. Now I'm completely hosed... Using the supplied
>> FOP servlet,
>> > the same xml and xsl files (i'm using a option on the
>> servlet) I get the
>> > following error:
>> >
>> > javax.servlet.ServletException:
>> org.xml.sax.SAXParseException: Content is
>> > not allowed in prolog
>> > (I'm not going to include all the error info unless someone
>> wants it.)
>> >
>> > I have researched the problem and cannot find an answer to
>> it. The only
>> > "answers" I can find are:
>> > (1)incorrect coding on the xml declaration; (2)the xml file
>> is not well
>> > formed; (3)there are extraneous characters in the file.
>> >
>> > I have made sure that my XML, XSL and any associated files
>> I can find are
>> > well formed, using UTF-8 for encoding, and no extraneous
>> characters. I
>> > even pared my XML file down to only a few elements and took out any
>> > unecessary attributes. I have also looked at the web.xml
>> supplied with
>> > distribution, but don't see anything wrong with. Don't want
>> to change it
>> > and potentially make things worse.
>> >
>> > No luck. I'm going back to 0.20.5 until I can figure this out.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/0.94-as-a-servlet--tf4714463.html#a13489651
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: 0.94 as a servlet?
Posted by macsmaker <ma...@aol.com>.
Pascal,
After reading what you said, I decided to simplify matters by rewriting my
code to produce an FO file that is handed off to the servlet. This seems to
work. Don't know why my xml/xsl combination did not work. Thanks for the
help.
Pascal Sancho wrote:
>
> Hmm,
>
> This exception can be thrown for any xml file during a validation process.
>
> You should check all used xml files:
> - XSLT or XSL-FO files,
> - config file,
> - etc.
>
> Or, better, as suggested by J.Pietschmann, look at your XML parser,
> comparing what is used in your command line environment, against what is
> used in your servlet environment.
>
> Pascal
>
>> -----Message d'origine-----
>> De : macsmaker [mailto:macsmaker@aol.com]
>> Envoyé : mardi 30 octobre 2007 15:23
>>
>> Mr. Sancho, thanks for the reponse.
>> My research turned up this as a possibility, so I did check
>> it. There are no
>> extraneous characters in my XML file.
>> I can run this fine from the command line (using JAVA). It
>> does generate a
>> pdf. I can also generate a .fo file from my .xml and .xsl and use the
>> servlet to generate a pdf. Works fine. But if I use the
>> servlet passing the
>> .xml and .xsl files I get the error.
>> Again, thanks for the help.
>>
>> Pascal Sancho wrote:
>> >
>> > Hi,
>> >
>> > "Content not allowed in prolog" is thrown by xml parser,
>> not FOP (see
>> > archives at
>> >
>> http://www.nabble.com/forum/Search.jtp?query=content+allowed+p
>> rolog+message%3A%22Content+not+allowed+in+prolog%22&sort=date&
>> local=y&forum=353&daterange=0)
>> >
>> > Generally, there is extra character before xml declaration, probably
>> > linefeed, or erroneous Byte Outer Marker.
>> >
>> > Pascal
>> >
>> >> -----Message d'origine-----
>> >> De : macsmaker [mailto:macsmaker@aol.com]
>> >> Envoyé : lundi 29 octobre 2007 21:32
>> >>
>> >> More info on 0.94...
>> >>
>> >> There were issues with my xsl file that worked with 0.20.5. I
>> >> found these
>> >> using the command line to create the pdf. I fixed those and I
>> >> still get the
>> >> "Content not allowed in prolog" error call the fop
>> processor using a
>> >> servlet.
>> >>
>> >> For grins, I used the command line and generated a .fo file
>> >> from my xml/xsl
>> >> files. That DOES work calling the servlet. I'm able to
>> >> generate a pdf from
>> >> it.
>> >>
>> >> Does this give anyone any ideas? I would really like for
>> this work...
>> >>
>> >>
>> >> macsmaker wrote:
>> >> >
>> >> > (in response to issues with external-graphic..)
>> >> >
>> >> > Okay, I upgraded to 0.94 because I found other things that
>> >> may be issues
>> >> > with 0.20.5. Now I'm completely hosed... Using the supplied
>> >> FOP servlet,
>> >> > the same xml and xsl files (i'm using a option on the
>> >> servlet) I get the
>> >> > following error:
>> >> >
>> >> > javax.servlet.ServletException:
>> >> org.xml.sax.SAXParseException: Content is
>> >> > not allowed in prolog
>> >> > (I'm not going to include all the error info unless someone
>> >> wants it.)
>> >> >
>> >> > I have researched the problem and cannot find an answer to
>> >> it. The only
>> >> > "answers" I can find are:
>> >> > (1)incorrect coding on the xml declaration; (2)the xml file
>> >> is not well
>> >> > formed; (3)there are extraneous characters in the file.
>> >> >
>> >> > I have made sure that my XML, XSL and any associated files
>> >> I can find are
>> >> > well formed, using UTF-8 for encoding, and no extraneous
>> >> characters. I
>> >> > even pared my XML file down to only a few elements and
>> took out any
>> >> > unecessary attributes. I have also looked at the web.xml
>> >> supplied with
>> >> > distribution, but don't see anything wrong with. Don't want
>> >> to change it
>> >> > and potentially make things worse.
>> >> >
>> >> > No luck. I'm going back to 0.20.5 until I can figure this out.
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> > For additional commands, e-mail:
>> fop-users-help@xmlgraphics.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/0.94-as-a-servlet--tf4714463.html#a13489651
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/0.94-as-a-servlet--tf4714463.html#a13494680
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org