Modify

Opened 6 years ago

Closed 6 years ago

#16887 closed defect (fixed)

opendata depends on JAXB plugin

Reported by: james2432 Owned by: james2432
Priority: normal Milestone:
Component: Plugin opendata Version: latest
Keywords: jaxb Cc:

Description (last modified by Don-vip)

opendata plugin depends on javax.xml.bind and is no longer in Java9 and completely removed in Java 11. The only way to get around it in Java9 is to launch it with:

java -jar --add-modules java.xml.bind josm-latest.jar

As it is no longer in the default class path location

With openjdk 11.0.1 I am unable to bypass the error and ultimately unable to use the opendata plugin:

2018-10-24 18:19:13.506 SEVERE: Handled by bug report queue: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. Cause: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
        at org.openstreetmap.josm.plugins.opendata.core.io.XmlImporter.acceptFile(XmlImporter.java:28)
        at org.openstreetmap.josm.plugins.opendata.core.io.archive.ArchiveReader.lookForCandidate(ArchiveReader.java:197)
        at org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipReader.extractArchive(ZipReader.java:79)
        at org.openstreetmap.josm.plugins.opendata.core.io.archive.ArchiveReader.getDocsToParse(ArchiveReader.java:70)
        at org.openstreetmap.josm.plugins.opendata.core.io.archive.ArchiveReader.parseDoc(ArchiveReader.java:115)
        at org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipReader.parseDataSet(ZipReader.java:38)
        at org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipImporter.parseDataSet(ZipImporter.java:33)
        at org.openstreetmap.josm.gui.io.importexport.OsmImporter.loadLayer(OsmImporter.java:120)
        at org.openstreetmap.josm.gui.io.importexport.OsmImporter.importData(OsmImporter.java:97)
        at org.openstreetmap.josm.plugins.opendata.core.io.AbstractImporter.importData(AbstractImporter.java:55)
        at org.openstreetmap.josm.gui.io.importexport.FileImporter.importDataHandleExceptions(FileImporter.java:95)
        at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.importData(OpenFileAction.java:367)
        at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:319)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at org.openstreetmap.josm.plugins.PluginClassLoader.loadClass(PluginClassLoader.java:73)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 20 more
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-10-23 01:34:26 +0200 (Tue, 23 Oct 2018)
Revision:14358
Build-Date:2018-10-23 01:33:02
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (14358 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1803 (17134)
Memory Usage: 222 MB / 2040 MB (82 MB allocated, but free)
Java version: 11.0.1+13, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080

Plugins:
+ apache-commons (34506)
+ ejml (34389)
+ geotools (34513)
+ jts (34524)
+ opendata (34675)
+ utilsplugin2 (34506)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: Handled by bug report queue: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. Cause: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
- W: Warning - <html>JOSM could not find information about the following plugins:<ul><li>utilsplugin2</li><li>apache-commons</li><li>geotools</li><li>opendata</li><li>jts</li><li>ejml</li></ul>The plugins are not going to be loaded.</html>

Attachments (1)

StatusReport.txt (26.2 KB ) - added by anonymous 6 years ago.
Status Report

Download all attachments as: .zip

Change History (15)

comment:1 by anonymous, 6 years ago

Version: latest

comment:2 by Don-vip, 6 years ago

Owner: changed from Don-vip to james2432
Priority: majornormal
Status: newneedinfo

Please attach your status report.

by anonymous, 6 years ago

Attachment: StatusReport.txt added

Status Report

comment:3 by Don-vip, 6 years ago

Description: modified (diff)

comment:4 by Don-vip, 6 years ago

Keywords: jaxb added
Summary: opendata depends on outdated Java EE modulesopendata depends on JAXB plugin

OK the Plugin-Requires directive lacks jaxb plugin. You can install it manually until I release a new version.

comment:5 by Don-vip, 6 years ago

Resolution: fixed
Status: needinfoclosed

Fixed in [o34698:34699].

comment:6 by Don-vip, 6 years ago

Ticket #16886 has been marked as a duplicate of this ticket.

comment:7 by anonymous, 6 years ago

installing jaxb from plugins doesn't solve the issue.

comment:8 by anonymous, 6 years ago

jaxb has moved to:
com.sun.xml.bind jaxb-core jaxb-impl

it's no longer in:

javax.xml.bind for java 9+

comment:9 by anonymous, 6 years ago

Resolution: fixed
Status: closedreopened

comment:11 by Don-vip, 6 years ago

Status: reopenedneedinfo

Nothing has moved, the packages are still the same. If you use opendata 34698, it should work as JAXB will be in the plugin classloader. Please test.

comment:12 by anonymous, 6 years ago

Seems to only happen when a shapefile is in a .zip, when I extract it, it doesnt seem to happen

comment:13 by Don-vip, 6 years ago

Can you please attach your file?

comment:14 by anonymous, 6 years ago

Resolution: fixed
Status: needinfoclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain james2432.
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.