Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 309098

Summary: Modified versions of Batik source code blocks using normal version
Product: [RT] RAP Reporter: Andrew Craig <andrewsc>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 1.3   
Target Milestone: 1.3 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Stack Trace that occurs when attempting to use Batik Transcoder logic inside an application
none
Full stack trace when in main application none

Description Andrew Craig CLA 2010-04-14 07:10:21 EDT
Created attachment 164815 [details]
Stack Trace that occurs when attempting to use Batik Transcoder logic inside an application

Eclipse RWT includes a modified version of Batik within the org.eclipse.rap.rwt_1.3.0.X folder.  Even though it was modified, the package names were left the same.  A side-effect of this is that if you need to use the regular batik libraries in a project (for example to use the Transcoder classes), a NullPointerException is thrown (it tries to read the stylesheet that is used to actually parse the SVG document from within batik-svg-dom.jar).  

If it is truly necessary to modify the batik source code for some particular features that RWT needs (this particular one was preventing the InputSource from using URLs), would it be possible to put a copy of the batik source in an alternative package (e.g. org.eclipse.apache.batik)?

Thanks,

Andrew
Comment 1 Rüdiger Herrmann CLA 2010-04-14 09:59:39 EDT
Just out of curiosity, are you using RWT standalone (i.e. in a non-OSGi environment)?
Comment 2 Andrew Craig CLA 2010-04-14 10:16:42 EDT
The above stack trace was non-OSGi because it was just a main class that I threw together in the same project with the "normal" classpath to try and trace the problem down, however when I'm running it for real, I am running it in an OSGi environment.
Comment 3 Andrew Craig CLA 2010-04-14 10:17:31 EDT
Created attachment 164833 [details]
Full stack trace when in main application

Attached stack trace when I get the same error when within the application (not just a quick main test class)
Comment 4 Rüdiger Herrmann CLA 2010-04-14 11:16:25 EDT
For the use in OSGi it should be sufficient to not export the Batik packages at all.
However when running RWT standalone this could still lead to situations as described here.
I changed the package-names to org.eclipse.rwt.apache.batik. Changes are in CVS HEAD.
Comment 5 Rüdiger Herrmann CLA 2010-04-18 13:31:09 EDT
Forgot to mark as RESOLVED FIXED