PreviousNextTracker indexSee it online !

(207/300) 3531320 - Cannot install XML plugin

After installing XML plugin 2.8.3-jedit-4.5 on jEdit 4.5.1:

15:31:44 [AWT-EventQueue-0] [error] Roster$Install: java.lang.NullPointerException
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at org.gjt.sp.util.IOUtilities.copyStream(IOUtilities.java:102)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at org.gjt.sp.jedit.pluginmgr.Roster$Install.runInAWTThread(Roster.java:342)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at org.gjt.sp.jedit.pluginmgr.Roster.performOperationsInAWTThread(Roster.java:106)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at org.gjt.sp.jedit.pluginmgr.InstallPanel$InstallButton.actionPerformed(InstallPanel.java:1085)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Component.processMouseEvent(Component.java:6263)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Component.processEvent(Component.java:6028)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Container.processEvent(Container.java:2041)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Component.dispatchEventImpl(Component.java:4630)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Container.dispatchEventImpl(Container.java:2099)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Component.dispatchEvent(Component.java:4460)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Container.dispatchEventImpl(Container.java:2085)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Window.dispatchEventImpl(Window.java:2478)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.Component.dispatchEvent(Component.java:4460)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
15:31:44 [AWT-EventQueue-0] [error] Roster$Install: at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Whats wrong?

Thanks

Submitted poweryl - 2012-06-01 - 13:42:52z Assigned kerik-sf
Priority 5 Category None
Status Open Group None
Resolution Fixed Visibility No

Comments

2012-06-01 - 14:24:00z
jarekczek
I cannot reproduce on Windows 7, sun java 6. Please try to restart the computer, download other plugins, choose another mirror. Is all working ok? Is your system stable?

Looks like zipFile.getInputStream returns null althogh java documentation denies such a possibility.
2012-06-01 - 14:25:16z
jarekczek
Please provide operating system and exact java version.
2012-06-01 - 14:45:32z
poweryl
Windows XP SP3, jdk1.6.0_20
2012-06-01 - 14:59:17z
jarekczek
Is it java from sun or open jdk? What do you get by "java -version"?

I checked openJdk code and seems like strange filenames may cause null to be returned. I see at least one such a strange filename in xml.jar: it's quite new "ümlaut", from 2011-07-17.

So it seems a plugin bug. Eric, if you think this is the cause, please move back to plugin bugs.

See the open jdk code here:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/zip/ZipFile.java#ZipFile.getInputStream%28java.util.zip.ZipEntry%29
It first translates Entry to name (String), then back to Entry. That may be the clue.
2012-06-02 - 08:44:50z
kerik-sf
yes, it's a bug in XML plugin: test data gets wrongly packaged in XML.jar.
Ironically, this "ümlaut" directory was to confirm that XML plugin was dealing correctly with non ascii directories...
2012-06-04 - 07:17:57z
poweryl
the next release of the XML plugin will solve it?
2012-06-04 - 17:17:21z
kerik-sf
Yes. Sorry for the inconvenience.
Meanwhile, I've uploaded a jar without test_data here : http://kerik-sf.users.sourceforge.net/dropbox/XML.jar

Can you copy it to your %JEDIT_HOME%/jars folder with jEdit not running and launch jEdit ?
After that, you should check that it installed correctly in jEdit plugin manager (Plugins > Plugin Manager > Manage).

I think %JEDIT_HOME% is C:\Documents and Settings\YOUR_USERNAME\Application Data\jEdit on windows.

If jEdit complains about missing libraries, copy the following 3 to %JEDIT_HOME%/jars:
http://jedit.svn.sourceforge.net/viewvc/jedit/plugins/XML/tags/release-2.8.3-jedit-4.5/lib/jing.jar?revision=21760
http://jedit.svn.sourceforge.net/viewvc/jedit/plugins/XML/tags/release-2.8.3-jedit-4.5/lib/relaxngDatatype.jar?revision=21760
http://jedit.svn.sourceforge.net/viewvc/jedit/plugins/XML/tags/release-2.8.3-jedit-4.5/lib/trang.jar?revision=21760
2012-06-05 - 06:45:25z
poweryl
All works fine with these new files.

Thanks
2012-06-18 - 08:14:34z
poweryl
The question again. Will the next release of the XML plugin solve it?
2012-07-10 - 17:48:35z
snarum-micron
Is there a patch for the 4.5 version, for those of us who haven't yet upgraded to 5.0 daily?
2012-07-10 - 20:23:18z
kerik-sf
yes: the fixed XML.jar is still available (see my comment dated 2012-06-04 10:17:21).

I've committed a fix in r21928, but I'll have to make a new release request.
2012-07-13 - 11:10:17z
kerik-sf
I'll close this bug after a new release of XMLPlugin

Attachments