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 "Preuss, Jacqueline - ENCOWAY" <Pr...@encoway.de> on 2008/05/21 11:26:28 UTC

MalformedURLException when using relative paths

Hi!

 

We're just upgrading from fop_0.92 to fop_0.95beta. In our Fop
Configuration File we defined a base and a font-base like this:

 

<base>./pdf_test</base>

<font-base>./pdf_test/pdf_fonts</font-base>

 

With 0.92 everything works fine but with the newer version we get the
following exception:

 

java.net.MalformedURLException: no protocol: ./pdf_test/

                at java.net.URL.<init>(URL.java:567)

                at java.net.URL.<init>(URL.java:464)

                at java.net.URL.<init>(URL.java:413)

                at
org.apache.fop.apps.FopFactory.checkBaseURL(FopFactory.java:339)

                at
org.apache.fop.apps.FopFactory.setBaseURL(FopFactory.java:355)

                at
org.apache.fop.apps.FopFactoryConfigurator.configure(FopFactoryConfigura
tor.java:116)

                at
org.apache.fop.apps.FopFactoryConfigurator.setUserConfig(FopFactoryConfi
gurator.java:231)

                at
org.apache.fop.apps.FopFactoryConfigurator.setUserConfig(FopFactoryConfi
gurator.java:203)

                at
org.apache.fop.apps.FopFactory.setUserConfig(FopFactory.java:637)

 

Are relative paths not allowed anymore? What can we do to solve this?
Are there any suggestions available?

 

Regards,

Jacqueline.


AW: MalformedURLException when using relative paths

Posted by "Preuss, Jacqueline - ENCOWAY" <Pr...@encoway.de>.
Hi, 

thanks for your replies. I tried: file:pdf_test, file://pdf_test Works both for me, because we have our own URI Resolver Implementation. Now, we have to check whether the case path starts with file:// and remove this.

Regards,
Jacqueline.

> -----Ursprüngliche Nachricht-----
> Von: Ted Young [mailto:tyoung1@tx.rr.com]
> Gesendet: Mittwoch, 21. Mai 2008 22:41
> An: fop-users@xmlgraphics.apache.org
> Betreff: RE: MalformedURLException when using relative paths
> 
> 
> I know it works with FOP .94 since I am doing exactly this right now.  :-)
> 
> Ted
> 
> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> Sent: Wednesday, May 21, 2008 3:11 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: MalformedURLException when using relative paths
> 
> Ted Young wrote:
> > Yes, it supports relative, but relative URLs not relative file paths.  So,
> > what you want it:
> > file:pdf_test
> 
> Everything starting with file: (or anything else which looks like
> an URI scheme) is by specification an absolute URL. The string
> file:pdf_test is not a valid URL at all, although some libraries
> will try to interpret it the way you do. I'm not sure whether FOP
> does it, and I'm too tired to check the URI resolver class right
> now.
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> 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


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


RE: MalformedURLException when using relative paths

Posted by Ted Young <ty...@tx.rr.com>.
I know it works with FOP .94 since I am doing exactly this right now.  :-)

Ted

-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
Sent: Wednesday, May 21, 2008 3:11 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: MalformedURLException when using relative paths

Ted Young wrote:
> Yes, it supports relative, but relative URLs not relative file paths.  So,
> what you want it:
> file:pdf_test

Everything starting with file: (or anything else which looks like
an URI scheme) is by specification an absolute URL. The string
file:pdf_test is not a valid URL at all, although some libraries
will try to interpret it the way you do. I'm not sure whether FOP
does it, and I'm too tired to check the URI resolver class right
now.

J.Pietschmann


---------------------------------------------------------------------
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


Re: MalformedURLException when using relative paths

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ted Young wrote:
> Yes, it supports relative, but relative URLs not relative file paths.  So,
> what you want it:
> file:pdf_test

Everything starting with file: (or anything else which looks like
an URI scheme) is by specification an absolute URL. The string
file:pdf_test is not a valid URL at all, although some libraries
will try to interpret it the way you do. I'm not sure whether FOP
does it, and I'm too tired to check the URI resolver class right
now.

J.Pietschmann


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


RE: MalformedURLException when using relative paths

Posted by Ted Young <ty...@tx.rr.com>.
Yes, it supports relative, but relative URLs not relative file paths.  So,
what you want it:

 

file:pdf_test

 

and

 

file:pdf_test/pdf_fonts

 

Good Luck,

 

Ted

 

 

  _____  

From: Preuss, Jacqueline - ENCOWAY [mailto:PreussJa@encoway.de] 
Sent: Wednesday, May 21, 2008 4:26 AM
To: fop-users@xmlgraphics.apache.org
Subject: MalformedURLException when using relative paths

 

Hi!

 

We're just upgrading from fop_0.92 to fop_0.95beta. In our Fop Configuration
File we defined a base and a font-base like this:

 

<base>./pdf_test</base>

<font-base>./pdf_test/pdf_fonts</font-base>

 

With 0.92 everything works fine but with the newer version we get the
following exception:

 

java.net.MalformedURLException: no protocol: ./pdf_test/

                at java.net.URL.<init>(URL.java:567)

                at java.net.URL.<init>(URL.java:464)

                at java.net.URL.<init>(URL.java:413)

                at
org.apache.fop.apps.FopFactory.checkBaseURL(FopFactory.java:339)

                at
org.apache.fop.apps.FopFactory.setBaseURL(FopFactory.java:355)

                at
org.apache.fop.apps.FopFactoryConfigurator.configure(FopFactoryConfigurator.
java:116)

                at
org.apache.fop.apps.FopFactoryConfigurator.setUserConfig(FopFactoryConfigura
tor.java:231)

                at
org.apache.fop.apps.FopFactoryConfigurator.setUserConfig(FopFactoryConfigura
tor.java:203)

                at
org.apache.fop.apps.FopFactory.setUserConfig(FopFactory.java:637)

 

Are relative paths not allowed anymore? What can we do to solve this? Are
there any suggestions available?

 

Regards,

Jacqueline.