SVGViewer: NPE on startup

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

at javax.swing.ImageIcon.(Unknown Source) at idea.plugin.svgviewer.SVGViewerPanel$RefreshAction.(SVGViewerPa at idea.plugin.svgviewer.SVGViewerPanel.]]>(
at idea.plugin.svgviewer.SVGViewerRegistry.register(SVGViewerRegistry.ja
at idea.plugin.svgviewer.SVGViewerProjectComponent.initToolWindow(SVGVie
at idea.plugin.svgviewer.SVGViewerProjectComponent.projectOpened(SVGView
at com.intellij.openapi.project.a.c.q(
at com.intellij.openapi.project.a.c.b(
at com.intellij.openapi.project.a.h.projectOpened(
at com.intellij.openapi.project.a.i.projectOpened(
at com.intellij.openapi.project.a.o.e(
at com.intellij.openapi.project.a.o.a(
at com.intellij.ide.o.q.a(
at com.intellij.idea.v.s(
at com.intellij.idea.v.c(
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.q.a(
at com.intellij.ide.q.dispatchEvent(
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 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?



评论操作 固定链接


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:

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