Modify

Opened 13 years ago

Closed 13 years ago

#5690 closed defect (fixed)

Exception when the bug id in the "bug details" tab is clicked

Reported by: jBeata Owned by: team
Priority: major Milestone:
Component: Plugin mapdust Version: tested
Keywords: MapDust Cc:

Description

Steps to reproduce:
1.select a open bug in the map.
2.go to the "bug details"-tab and do a double click on the number of the bug id.

Exception:
Build-Date: 2010-12-02 02:31:24
Revision: 3690
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2010-12-01 14:02:38 +0100 (Wed, 01 Dec 2010)
Last Changed Rev: 3690
Identification: JOSM/1.5 (3690 de)
Java version: 1.6.0_22, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Linux
Plugin: mapdust (24514)


java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform at java.awt.Desktop.getDesktop(Desktop.java:126)

at org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustBugDetailsPanel.hyperlinkUpdate(MapdustBugDetailsPanel.java:138)
at javax.swing.JEditorPane.fireHyperlinkUpdate(JEditorPane.java:326)
at javax.swing.text.html.HTMLEditorKit$LinkController.activateLink(HTMLEditorKit.java:838)
at javax.swing.text.html.HTMLEditorKit$LinkController.mouseClicked(HTMLEditorKit.java:648)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
at java.awt.Component.processMouseEvent(Component.java:6270)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Attachments (0)

Change History (34)

comment:1 by bastiK, 13 years ago

Component: PluginPlugin mapdust

comment:2 by Fabi2, 13 years ago

This may be a problem with the sun jdk, as it may be bad integrated with the freedesktop.org-services/apis. It shall work under kubuntu, so it will try openjdk. I switched some time ago, as openjdk had these zooming and map display bugs.

comment:3 by jBeata, 13 years ago

This a problem of sun jdk. If your problem persist we will find a work around for opening the MapDust bug page from the MapDust plugin.

comment:4 by anonymous, 13 years ago

Hi jBeata, welcome to the team!

We have implemented some fallback in org.openstreetmap.josm.tools.OpenBrowser.displayUrl(). Maybe you can make use of this.

comment:5 by bastiK, 13 years ago

anonymous is me

in reply to:  5 comment:6 by jBeata, 13 years ago

Replying to bastiK:

anonymous is me

Thanks for the help. Also thanks for creating a new component for the mapdust project.
Actually we did tested the plugin on Linux Kubuntu, and did work fine without any problem or exception. As far I know this problem happens only for Fabi2. If the problem will persist I will consider using the method which you suggested.

comment:7 by bastiK, 13 years ago

I've set you as owner of the component "Plugin mapdust". This way, you'll get an email whenever a new bug in this category is created.

comment:8 by jBeata, 13 years ago

Thanks again for the help.

comment:9 by Fabi2, 13 years ago

It also doesn't work with openjdk. I use Archlinux with KDE and have working (tested with a URL) xdg-open and kfmclient in the path, but still get the same error.

comment:10 by Fabi2, 13 years ago

Also tested with kde-open wrapper which will also work with a test url. I don't know how java will check for KDE, as it seems to me, that these check will fail (have working dbus,hal,policy-kit,..).

comment:11 by jBeata, 13 years ago

In order to work the plugin you need to have install sun jdk 1.6 properly (http://www.java.com/en/download/help/linux_install.xml ). However I will try to found a work around for your problem.

in reply to:  11 comment:12 by bastiK, 13 years ago

Replying to jBeata:

In order to work the plugin you need to have install sun jdk 1.6 properly (http://www.java.com/en/download/help/linux_install.xml ). However I will try to found a work around for your problem.

Why not support openjdk? In JOSM we try our best and there have been only few openjdk specific problems. In a project that is so much focused on openness, it's somewhat cynical to demand a proprietary software when an (almost) free alternative that is just as good.

comment:13 by jBeata, 13 years ago

For the first release was not planned to support openjdk. With jdk 1.6 the plugin works properly. Maybe in the future we will support also openjdk.

comment:14 by bastiK, 13 years ago

I suppose, you already do. :)

The compatibility is quite hight.

comment:15 by jBeata, 13 years ago

Yes. But the plugin was developed using sun jdk 1.6. And was not planned to support the cases when a given method from sun jdk 1.6 is not supported in open jdk.

comment:16 by bastiK, 13 years ago

The problem was reported for sun/oracle jdk 1.6. Later on, Fabi2 confirmed that the bug persists if he switches from sun to openjdk.

comment:17 by jBeata, 13 years ago

For the moment, at least I will add a condition, in order to not generate any exception , if the Desktop API is not supported.

comment:18 by jBeata, 13 years ago

After a research related to this problem I did found the following info: On the Solaris Operating System and the Linux platform, java.awt.Desktop API is dependent on Gnome libraries. If those libraries are unavailable, the java.awt.Desktop methods will not work. (http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/desktop_api/)

in reply to:  11 comment:19 by Fabi2, 13 years ago

Replying to jBeata:

In order to work the plugin you need to have install sun jdk 1.6 properly (http://www.java.com/en/download/help/linux_install.xml ). However I will try to found a work around for your problem.

I have packages for the latest sun/oracle and openjdk, so everything is in my $PATH after a relogin. The Java doc don't tell which "GNOME library" and software they really want, as there is not just one application/library. See http://projects.gnome.org/

I tried http://java-gnome.sourceforge.net/ (only seems to be a gtk-interface) and also installed the java-gnome-accessibility framework (libdesktop-agnostic and libnotify was already installed before), but still get the same error under openjdk:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-12-06 02:31:46
Last Changed Author: bastiK
Revision: 3700
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-12-05 17:56:01 +0100 (Sun, 05 Dec 2010)
Last Changed Rev: 3700

Identification: JOSM/1.5 (3700 de)
Memory Usage: 215 MB / 3111 MB (109 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: AddrInterpolation (23420)
Plugin: DirectUpload (24239)
Plugin: SimplifyArea (21873)
Plugin: alignways (23560)
Plugin: dataimport (22542)
Plugin: download_along (22427)
Plugin: editgpx (23659)
Plugin: graphview (23435)
Plugin: imagery (24572)
Plugin: mapdust (24514)
Plugin: measurement (22547)
Plugin: multipoly-convert (21706)
Plugin: openstreetbugs (23747)
Plugin: openvisible (21706)
Plugin: osmarender (22765)
Plugin: remotecontrol (22734)
Plugin: restart (24396)
Plugin: reverter (23278)
Plugin: tageditor (21026)
Plugin: tagging-preset-tester (22454)
Plugin: undelete (22365)
Plugin: waypoint_search (23220)
Plugin: wmsplugin (24223)

java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform

at java.awt.Desktop.getDesktop(Desktop.java:144)
at org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustBugDetailsPanel.hyperlinkUpdate(MapdustBugDetailsPanel.java:138)
at javax.swing.JEditorPane.fireHyperlinkUpdate(JEditorPane.java:342)
at javax.swing.text.html.HTMLEditorKit$LinkController.activateLink(HTMLEditorKit.java:870)
at javax.swing.text.html.HTMLEditorKit$LinkController.mouseClicked(HTMLEditorKit.java:676)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
at java.awt.Component.processMouseEvent(Component.java:6178)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:5940)
at java.awt.Container.processEvent(Container.java:2105)
at java.awt.Component.dispatchEventImpl(Component.java:4536)
at java.awt.Container.dispatchEventImpl(Container.java:2163)
at java.awt.Component.dispatchEvent(Component.java:4362)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4134)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
at java.awt.Container.dispatchEventImpl(Container.java:2149)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4362)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

comment:20 by jBeata, 13 years ago

In the http://www.java.com/en/download/help/linux_install.xml it is about sun jdk 1.6 not openjdk. However I will consider to implement a work-around for the case when the java.awt.Desktop is not supported under Linux. At least in the first step I will consider to remove the hyperlink in the case if under Linux it is not supported the java.awt.Desktop functionality.
Sorry for having you problem with using the mapdust plugin. We did not expect to have any problem with this, especially because we did test the plugin under Linux Ubuntu before release, and after you did reported this problem, we did also re-test; but we did not reproduce this problem.
I will notify you when this problem is fixed.

comment:21 by jBeata, 13 years ago

Priority: normalmajor

changed to major

comment:22 by jBeata, 13 years ago

A fix for this problem will be contained in the next MapDust release.

in reply to:  20 comment:23 by bastiK, 13 years ago

Replying to jBeata:

In the http://www.java.com/en/download/help/linux_install.xml it is about sun jdk 1.6 not openjdk. However I will consider to implement a work-around for the case when the java.awt.Desktop is not supported under Linux. At least in the first step I will consider to remove the hyperlink in the case if under Linux it is not supported the java.awt.Desktop functionality.
Sorry for having you problem with using the mapdust plugin. We did not expect to have any problem with this, especially because we did test the plugin under Linux Ubuntu before release, and after you did reported this problem, we did also re-test; but we did not reproduce this problem.
I will notify you when this problem is fixed.

On 99% of all systems it might work. Unfortunately we have more than 100 users. ;-)

comment:24 by Fabi2, 13 years ago

The main problem is that I don't know what the java desktop api want to use on my system. If I did, i would install or compile the lib/program and don't nedd the workaround when there is a fix. ;-) But there may be other linux distros also affected.
I don't find anything useful with google.

comment:25 by jBeata, 13 years ago

I did used the browse method of the java.awt.Desktop API. This method launches the default browser to display a given URI.

in reply to:  25 comment:26 by Fabi2, 13 years ago

Replying to jBeata:

I did used the browse method of the java.awt.Desktop API. This method launches the default browser to display a given URI.

Thanks, but I don't mean the part of the java code. I don't know what they call on my system from the java/JVM code.

comment:27 by anonymous, 13 years ago

Next week I will submit a new release for the plugin. This will contain also a fix your problem.

in reply to:  27 comment:28 by Fabi2, 13 years ago

Replying to anonymous:

Next week I will submit a new release for the plugin. This will contain also a fix your problem.

Yes, but a real fix would be better the a workaround.

comment:29 by bastiK, 13 years ago

@Fabi2:
You could take a strace and see what command Java calls. ;)

in reply to:  29 comment:30 by Fabi2, 13 years ago

Replying to bastiK:

@Fabi2:
You could take a strace and see what command Java calls. ;)

Yes, I did so, but don't get anything meaningful, even with verbose message output.

Ouput of "strace java -verbose:jni -verbose:class -esa -jar Desktop/josm-latest.jar > str.log 2>&1" before the execption occurs:

[Dynamic-linking native method sun.java2d.loops.FillPath.FillPath ... JNI]
[Loaded java.util.Collections$UnmodifiableList$1 from /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
[Loaded javax.swing.event.HyperlinkEvent$EventType from /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
[Loaded sun.reflect.GeneratedMethodAccessor30 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor31 from __JVM_DefineClass__]
[Loaded java.awt.Desktop from /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
[Loaded java.awt.peer.DesktopPeer from /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
[Loaded sun.awt.X11.XDesktopPeer from /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
[Dynamic-linking native method sun.awt.X11.XDesktopPeer.init ... JNI]
java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
        at java.awt.Desktop.getDesktop(Desktop.java:144)

in reply to:  31 comment:32 by Fabi2, 13 years ago

Replying to bastiK:

Maybe look here: http://hg.openjdk.java.net/icedtea/jdk7/jdk/file/e7fc51780596/src/solaris/native/sun/xawt/awt_Desktop.c

Thanks! This dynamically loads the gnome and gnome-vfs library. This means I had really to install the gnome lib, even for KDE.
Needed packages are named "libgnome" and "gnome-vfs" on ArchLinux (which uses the real package name) and "libgnome2" and "libgnomevfs2 on Debian derived distros.

After I also installed the gnome lib everything works as expected here, meaning: the detail page are opend in a new firefox tab.

comment:33 by jBeata, 13 years ago

Fixed. A solution for this problem is contained in the new mapdust.jar file (version:24735)

comment:34 by jBeata, 13 years ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.