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 kwokhung <kw...@conven.com.hk> on 2001/12/28 08:59:06 UTC

SVG problem

Hi,

I had problem with the SVG. I just downloaded FOP and tried the examples. I found that if the fo contains SVG, the FOPServlet
will encounter error as

ERROR   10095   [fop     ] (): Could not set base URL for svg
java.net.MalformedURLException
        at java.net.URL.<init>(URL.java:614)
        at java.net.URL.<init>(URL.java:478)
        at java.net.URL.<init>(URL.java:427)
        at org.apache.fop.svg.SVGElement.layout(SVGElement.java:143)
        at org.apache.fop.fo.flow.InstreamForeignObject.layout(InstreamForeignOb
ject.java:198)
        at org.apache.fop.fo.flow.Block.layout(Block.java:259)
        at org.apache.fop.fo.flow.Flow.layout(Flow.java:149)
        at org.apache.fop.fo.flow.Flow.layout(Flow.java:108)
        at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:29
4)
        at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178)

which will not happen if I use command line to produce PDF. For example, instream.fo will produce such error when I
run FOPServlet from my browser.

I wonder why there is a need to set base URL for svg. Anyone knows what happen to this error? And how can I solve it.


Regards

Brian Chu
Conven Corporation Limited
Address : Unit 130, 1/F Tech Centre, 72 Tat Chee Avenue, Kowloon Tong, Hong Kong
Tel : (852) 2777 8681


Re: SVG problem

Posted by kwokhung <kw...@conven.com.hk>.
Hi,

This is to continue the following mail I last sent.

The following error is copy from the System.out of my J2EE server. But I found that the error shown in my browser is a bit different :

java.lang.NoClassDefFoundError
	at org.apache.batik.bridge.SVGColorProfileElementBridge.(SVGColorProfileElementBridge.java:41)
	at org.apache.batik.bridge.SVGBridgeExtension.registerTags(SVGBridgeExtension.java:85)
	at org.apache.batik.bridge.BridgeContext.registerSVGBridges(BridgeContext.java:642)
	at org.apache.batik.bridge.BridgeContext.(BridgeContext.java:173)
	at org.apache.batik.bridge.BridgeContext.(BridgeContext.java:145)
	at org.apache.fop.svg.SVGElement.layout(SVGElement.java:152)
	at org.apache.fop.fo.flow.InstreamForeignObject.layout(InstreamForeignObject.java:198)
	at org.apache.fop.fo.flow.Block.layout(Block.java:259)
	at org.apache.fop.fo.flow.Flow.layout(Flow.java:149)
	at org.apache.fop.fo.flow.Flow.layout(Flow.java:108)
	at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:294)
	at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178)

  ----- Original Message ----- 
  From: kwokhung 
  To: fop-user@xml.apache.org 
  Sent: Friday, December 28, 2001 3:59 PM
  Subject: SVG problem


  Hi,

  I had problem with the SVG. I just downloaded FOP and tried the examples. I found that if the fo contains SVG, the FOPServlet
  will encounter error as

  ERROR   10095   [fop     ] (): Could not set base URL for svg
  java.net.MalformedURLException
          at java.net.URL.<init>(URL.java:614)
          at java.net.URL.<init>(URL.java:478)
          at java.net.URL.<init>(URL.java:427)
          at org.apache.fop.svg.SVGElement.layout(SVGElement.java:143)
          at org.apache.fop.fo.flow.InstreamForeignObject.layout(InstreamForeignOb
  ject.java:198)
          at org.apache.fop.fo.flow.Block.layout(Block.java:259)
          at org.apache.fop.fo.flow.Flow.layout(Flow.java:149)
          at org.apache.fop.fo.flow.Flow.layout(Flow.java:108)
          at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:29
  4)
          at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191)
          at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178)

  which will not happen if I use command line to produce PDF. For example, instream.fo will produce such error when I
  run FOPServlet from my browser.

  I wonder why there is a need to set base URL for svg. Anyone knows what happen to this error? And how can I solve it.


  Regards

  Brian Chu
  Conven Corporation Limited
  Address : Unit 130, 1/F Tech Centre, 72 Tat Chee Avenue, Kowloon Tong, Hong Kong
  Tel : (852) 2777 8681