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 "Li, Jing" <ji...@roche.com> on 2012/01/30 22:47:53 UTC

Invalid CSS document

Dear All,

I was working on a report using FOP which convert a lot of JFreeCharts to svg and render them in PDF.

I got it all working in my intellj development environment.  In the end, I bundle the whole project in one jar using http://one-jar.sourceforge.net/.

But when I run it in one jar, I got the following messages:

Error: SVG graphic could not be built. Reason: org.w3c.dom.DOMException: <unknown>:
Invalid CSS document.
JAR entry lib/batik-svg-dom-1.7.jar!/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css not found in C:\Users\lij40\AppData\Local\Temp\temp0.jar

And of course, the PDF is missing all the nice charts because of it.

Your suggestions and comment to how to fix it will be highly appreciated.

Thanks
Jing

Re: Invalid CSS document

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Am 30.01.2012 22:47, schrieb Li, Jing:
> Dear All,
> 
> I was working on a report using FOP which convert a lot of JFreeCharts to svg and render them in PDF.
> 
> I got it all working in my intellj development environment.  In the end, I bundle the whole project in one jar using http://one-jar.sourceforge.net/.
> 
> But when I run it in one jar, I got the following messages:
> 
> Error: SVG graphic could not be built. Reason: org.w3c.dom.DOMException: <unknown>:
> Invalid CSS document.
> JAR entry lib/batik-svg-dom-1.7.jar!/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css not found in C:\Users\lij40\AppData\Local\Temp\temp0.jar

Just for completeness, check whether
 C:\Users\lij40\AppData\Local\Temp\temp0.jar
contains
 lib/batik-svg-dom-1.7.jar
Even if it's there, the URL resolver probably can't resolve recursive
jar URLs, so you'd either hack up your very own resolver which will
do this, or unpack the onejar after deployment.

J.Pietschmann

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


Re: Invalid CSS document

Posted by Rob Sargent <rs...@xmission.com>.
Get your development to work at the command line, exclusive of idea.
You're probably getting a jar from intellij when you run there and it's
missing when you don't run from the debugger.

IDE's are not the place from which to deploy.



On 01/30/2012 02:47 PM, Li, Jing wrote:
>
> Dear All,
>
>  
>
> I was working on a report using FOP which convert a lot of JFreeCharts
> to svg and render them in PDF.
>
>  
>
> I got it all working in my intellj development environment.  In the
> end, I bundle the whole project in one jar using
> http://one-jar.sourceforge.net/.
>
>  
>
> But when I run it in one jar, I got the following messages:
>
>  
>
> Error: SVG graphic could not be built. Reason:
> org.w3c.dom.DOMException: <unknown>:
>
> Invalid CSS document.
>
> JAR entry
> lib/batik-svg-dom-1.7.jar!/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
> not found in C:\Users\lij40\AppData\Local\Temp\temp0.jar
>
>  
>
> And of course, the PDF is missing all the nice charts because of it.
>
>  
>
> Your suggestions and comment to how to fix it will be highly appreciated.
>
>  
>
> Thanks
>
> Jing
>