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

Bug 362466

Summary: Plug-In org.apache.batik.swing is not declaring the dependency to org.apache.batik.css
Product: [Tools] Orbit Reporter: Ivan Motsch <ivan.motsch>
Component: bundlesAssignee: Orbit Bundles <orbit.bundles-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_williams, stephan.leichtvogt
Version: unspecified   
Target Milestone: Kepler M5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
hello world app
none
additional fragment none

Description Ivan Motsch CLA 2011-10-31 06:51:23 EDT
When using tooltips in an svg, the swing viewer (JSVGCanvas) is throwing exceptions.

Analysis shows, that the Plug-In org.apache.batik.swing is not declaring the dependency to org.apache.batik.css
The class JSVGCanvas uses in its inner class ToolTipModifier a reference to CSSEngine.

Even when importing the Plug-In org.apache.batik.swing to the workspace it is red at that location!.

Solution: Please add the missing dependency org.apache.batik.css to the Plug-In manifest of org.apache.batik.swing.


The exception is:
java.lang.NoClassDefFoundError: org/apache/batik/css/engine/CSSEngine
	at org.apache.batik.swing.JSVGCanvas$ToolTipModifier.handleEvent(JSVGCanvas.java:1229)
	at org.apache.batik.dom.events.EventSupport.fireEventListeners(EventSupport.java:324)
	at org.apache.batik.dom.events.EventSupport.fireEventListeners(EventSupport.java:366)
	at org.apache.batik.dom.events.EventSupport.dispatchEvent(EventSupport.java:276)
	at org.apache.batik.dom.AbstractNode.dispatchEvent(AbstractNode.java:1014)
	at org.apache.batik.bridge.BridgeEventSupport$Listener.dispatchMouseEvent(BridgeEventSupport.java:405)
	at org.apache.batik.bridge.BridgeEventSupport$Listener.mouseExited(BridgeEventSupport.java:280)
	at org.apache.batik.gvt.event.AbstractAWTEventDispatcher.processMouseEvent(AbstractAWTEventDispatcher.java:597)
	at org.apache.batik.gvt.event.AbstractAWTEventDispatcher.dispatchMouseEvent(AbstractAWTEventDispatcher.java:503)
	at org.apache.batik.gvt.event.AbstractAWTEventDispatcher.dispatchEvent(AbstractAWTEventDispatcher.java:387)
	at org.apache.batik.gvt.event.AbstractAWTEventDispatcher.mouseMoved(AbstractAWTEventDispatcher.java:210)
	at org.apache.batik.swing.svg.AbstractJSVGComponent$1$MouseMovedRunnable.run(AbstractJSVGComponent.java:2248)
	at org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:237)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.apache.batik.css.engine.CSSEngine
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	... 14 more


I created a demo RCP Headless application, that is attached as ZIP.
Simply load into a eclipse 3.6+ workspace and start the test.product.
It uses the resource/svg/sample.svg with two polygons. When moving the mouse over the two polygons it shows that exception.

The product uses a fragment "jre16.fragment" which is attached to the ticket as well.
Comment 1 Ivan Motsch CLA 2011-10-31 06:53:10 EDT
Created attachment 206197 [details]
hello world app
Comment 2 Ivan Motsch CLA 2011-10-31 06:53:30 EDT
Created attachment 206198 [details]
additional fragment
Comment 3 David Williams CLA 2011-11-04 13:37:31 EDT
Ivan, I can't speak to the technical issues (yet) but a few questions and clarifications.

1. "critical" is reserved to mean "data loss" or "crash" type issues. Is that the case here? Or is it just "not working" which sound more like "major" (loss of function)? Or is it just an "exception in the log" for you ... in which case, sounds like a "normal" bug. 

2. You set the target milestone to "Indigo SR2", but that's more for a committer to set, once they plan on putting the fix into SR2. If you just mean to _request_ the fix be in SR2, then you should just say so in a comment. (You are not a committer in Orbit, right? Your name is not familiar ... but, admit I might not know every committer by name ...). 

3. It'd probably be obvious if I looked at your examples, but what version of the bundles are you talking about? And, I assumed you got them from the latest R repository? Or something earlier? (You mention 3.6, which sounds old ... like Helios ... so, I want to be sure what you are using). 

Thanks very much for opening the issue.
Comment 4 David Williams CLA 2011-11-04 13:40:33 EDT
Anthony, assigning to you as the "Batik contact" ... can you please comment on (or fix) this issue?
Comment 5 Ivan Motsch CLA 2011-11-04 17:08:46 EDT
(In reply to comment #3)
> 1. "critical" is reserved to mean "data loss" or "crash" type issues. 

You are right. I have minor loss of functionality. I change it to P3 "normal".


> 2. You set the target milestone to "Indigo SR2"

You are right. I will clear it again, i am not committer on Orbit.

 
> 3. It'd probably be obvious if I looked at your examples...

The example contains it all. The versions in the Manifest are:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SVG Developer
Bundle-SymbolicName: foo.bar.test;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Foo Bar
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.apache.batik.css;bundle-version="1.7.0",
 org.apache.batik.swing;bundle-version="1.7.0",
 org.eclipse.core.runtime;bundle-version="3.6.0",
 org.apache.batik.dom;bundle-version="1.7.0",
 org.apache.batik.dom.svg;bundle-version="1.7.0",
 org.apache.batik.xml;bundle-version="1.7.0",
 org.w3c.dom.svg;bundle-version="1.1.0",
 org.apache.batik.util;bundle-version="1.7.0",
 org.apache.batik.bridge;bundle-version="1.7.0"


Thanks for your patience with me:)
Comment 6 Ivan Motsch CLA 2012-09-13 02:41:52 EDT
Can you please give me feedback on this.
It is really just a missing dependecy in the orbit bundle.
This is not an apache batik issue but an orbit bundling issue.

You may give it directly to Stephan Leicht Vogt.
Comment 7 David Williams CLA 2012-09-13 12:19:29 EDT
(In reply to comment #5)

> > 3. It'd probably be obvious if I looked at your examples...
> 
> The example contains it all. The versions in the Manifest are:

I meant which "download site" did you get it from? such as ... ? 

http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/

Wanted to be sure you were using the latest, and it wasn't something already fixed.
Comment 8 David Williams CLA 2012-09-13 12:23:23 EDT
(In reply to comment #6)

> You may give it directly to Stephan Leicht Vogt.

Ok, I've assigned to Stephan ... but keep us well informed (here) on changes made. 

I'm assuming (so far) this would be a change only for Kepler (no maintenance branches) so a) Kepler M2 is due real soon next few days? I need to to check and send a note, and b) if you do need it for some maintenance version (such as Juno SR2) you'll need to ask. We don't routinely produce Orbit maintenance, but happy to do so if you a need.
Comment 9 Stephan Leicht Vogt CLA 2013-02-01 08:12:28 EST
fixed and map files updated. Should be in next Orbit build.