You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2012/08/09 01:21:23 UTC

[Bug 53680] New: org.apache.batik.bridge.BridgeException: Unable to make sense of URL for connection

https://issues.apache.org/bugzilla/show_bug.cgi?id=53680

          Priority: P2
            Bug ID: 53680
          Assignee: fop-dev@xmlgraphics.apache.org
           Summary: org.apache.batik.bridge.BridgeException: Unable to
                    make sense of URL for connection
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: lmpmbernardo@gmail.com
          Hardware: All
            Status: NEW
           Version: 1.1dev
         Component: svg
           Product: Fop

The example provided by bug 49516 cannot be run with the current trunk. The
console error is this when generating PDF:

SVG graphic could not be built. Reason:
org.apache.batik.bridge.BridgeException: Unable to make sense of URL for
connection
org.apache.batik.bridge.BridgeException: Unable to make sense of URL for
connection

The resulting PDF document does not include the SVG. This was not the case in
FOP-1.0, where the generated PDF would include the SVG.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53680] org.apache.batik.bridge.BridgeException: Unable to make sense of URL for connection

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53680

--- Comment #2 from Mehdi Houshmand <me...@gmail.com> ---
The recent changes to URI handling don't affect FOP1.1, I could be wrong but
they haven't been merged into 1.1rc1... Hubris is a cruel mistress though, hope
I don't eat my words ;)(In reply to comment #1)

> I suspect this issue relates to the recent changes made to the URI resolver.
> After comparing both FOP 1.0 and Trunk I found the main difference stemmed
> from line found at [trunk]URIResover.getNode:114. It is comparing two
> ParsedURL's where on trunk they do not match match, however on 1.0 they do
> which results in a value being returned and different paths being followed.
> The differences in the ParsedURL's are due to one being passed with just the
> filename e.g.
> 
> (trunk) setpaint.svg
> 
> whereas the other is being passed the full path:
> 
> (1.0) file://home/user/temp/setpaint.svg
> 
> This stems from ImageSource.java:123 which accepts the uri. Both make a call
> to the FOUserAgent.resolveURI() but whereas 1.0 appended the path to the
> source, the new code does not and simply leaves it as just the name. The
> reason for the exception is that down the line, due to there being no
> defined protocol, the ParserURLDefaultProtocolHandler.java:302 then defines
> the parseURL as a null:setpaint.svg and thus causes a MalformedURLException.
> 
> The next steps would be to investigate why the baseURL() is no longer being
> appended to the Source object as that seems to possibly be the source of the
> problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53680] org.apache.batik.bridge.BridgeException: Unable to make sense of URL for connection

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53680

--- Comment #3 from Matthias Reischenbacher <ma...@gmx.at> ---
I think I had a similar issue when upgrading my application to fop trunk. Not
setting the system id (in FOUserAgent.resolveURI) for the "data" scheme worked
around the issue. I was under the impression that the source of the problem was
batik and the recent changes in fop just uncovered that, but that might be
different in this case. If anyone wants to take a closer look, I can try to
provide an additional test cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53680] org.apache.batik.bridge.BridgeException: Unable to make sense of URL for connection

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53680

Arun MR <ar...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arunmr980@yahoo.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53680] org.apache.batik.bridge.BridgeException: Unable to make sense of URL for connection

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53680

--- Comment #1 from Robert Meyer <rm...@hotmail.co.uk> ---
I suspect this issue relates to the recent changes made to the URI resolver.
After comparing both FOP 1.0 and Trunk I found the main difference stemmed from
line found at [trunk]URIResover.getNode:114. It is comparing two ParsedURL's
where on trunk they do not match match, however on 1.0 they do which results in
a value being returned and different paths being followed. The differences in
the ParsedURL's are due to one being passed with just the filename e.g.

(trunk) setpaint.svg

whereas the other is being passed the full path:

(1.0) file://home/user/temp/setpaint.svg

This stems from ImageSource.java:123 which accepts the uri. Both make a call to
the FOUserAgent.resolveURI() but whereas 1.0 appended the path to the source,
the new code does not and simply leaves it as just the name. The reason for the
exception is that down the line, due to there being no defined protocol, the
ParserURLDefaultProtocolHandler.java:302 then defines the parseURL as a
null:setpaint.svg and thus causes a MalformedURLException.

The next steps would be to investigate why the baseURL() is no longer being
appended to the Source object as that seems to possibly be the source of the
problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.