SVGViewer: NPE on startup

If I follow the instructions to install SVGViewer under build 675 I get the following NPE on startup:

java.lang.NullPointerException
at javax.swing.ImageIcon.(Unknown Source) at idea.plugin.svgviewer.SVGViewerPanel$RefreshAction.(SVGViewerPa nel.java:129) at idea.plugin.svgviewer.SVGViewerPanel.]]>(SVGViewerPanel.java:41)
at idea.plugin.svgviewer.SVGViewerRegistry.register(SVGViewerRegistry.ja
va:41)
at idea.plugin.svgviewer.SVGViewerProjectComponent.initToolWindow(SVGVie
werProjectComponent.java:71)
at idea.plugin.svgviewer.SVGViewerProjectComponent.projectOpened(SVGView
erProjectComponent.java:48)
at com.intellij.openapi.project.a.c.q(c.java:58)
at com.intellij.openapi.project.a.c.b(c.java:52)
at com.intellij.openapi.project.a.h.projectOpened(h.java:8)
at com.intellij.openapi.project.a.i.projectOpened(i.java:29)
at com.intellij.openapi.project.a.o.e(o.java:73)
at com.intellij.openapi.project.a.o.a(o.java:95)
at com.intellij.ide.o.q.a(q.java:12)
at com.intellij.idea.v.s(v.java:66)
at com.intellij.idea.v.c(v.java:3)
at com.intellij.idea.i.run(i.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.q.a(q.java:118)
at com.intellij.ide.q.dispatchEvent(q.java:66)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

I am using the batik-libs.jar and js.jar from the intellij twiki, I have installed these into idea's lib directory as adding them to the claa path does not seem to work (class not found). Is this plugin working for others?

Thanks,

Scott

0
Avatar
Permanently deleted user

Scott,

I couldn't reproduce your problem (actually, I had a worse problem: classnotfound). Your NPE happened because it was trying to load an icon supplied with IDEA. Thinking it may have been renamed, I downloaded the 675 build but the icon in question is still called the same thing. I've changed the code to dynamically build an icon if it can't find one, so this shouldn't happen again (although what you see won't be pretty).

Try downloading the latest version:
http://www.intellij.org/twiki/pub/Main/SvgViewer/SVGViewerPlugin.jar

...and put batik-libs.jar and js.jar in your idea's jre\lib\ext directory (create it if necessary). This solved (with a sledge hammer) my classnotfound problem.

Cheers,
A.

0

请先登录再写评论。