Modify

Opened 4 years ago

Closed 4 years ago

#3577 closed defect (worksforme)

TCX import is causing ClassNotFoundException for com.sun.xml.bind.v2.ContextFactory

Reported by: mrkbutty@… Owned by: mrkbutty@…
Priority: normal Component: Plugin
Version: tested Keywords: dataimporter tcx classnotfound
Cc: dmuecke

Description

When attempting to import Garmin TCX file I always get this error. I have tried re-installing, clearing out plugins and only installing dataimport - no joy, strange as the class does exist is he dataimport jar file...

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1981
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 1981
Last Changed Date: 2009-08-18 15:21:37 +0200 (Tue, 18 Aug 2009)

Memory Usage: 17 MB / 508 MB (5 MB allocated, but free)
Java version: 1.5.0_21

Plugins: dataimport
Plugin dataimport Version: 17702

java.lang.RuntimeException: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory not found

  • with linked exception:

[java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]

at org.openstreetmap.josm.io.Tcx.parseFile(Tcx.java:113)
at org.openstreetmap.josm.io.Tcx.importData(Tcx.java:74)
at org.openstreetmap.josm.actions.OpenFileAction.openFile(OpenFileAction.java:53)
at org.openstreetmap.josm.actions.OpenFileAction.actionPerformed(OpenFileAction.java:41)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
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)

Caused by: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory not found

  • with linked exception:

[java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]

at javax.xml.bind.ContextFinder.loadClass(ContextFinder.java:192)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:205)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:388)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at org.openstreetmap.josm.io.Tcx.parseFile(Tcx.java:96)
... 28 more

Caused by: java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory

at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.bind.ContextFinder.loadClass(ContextFinder.java:175)
... 33 more

Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory

at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at javax.xml.bind.ContextFinder$1.run(ContextFinder.java:180)
at javax.xml.bind.ContextFinder$1.run(ContextFinder.java:176)
... 35 more

Attachments (1)

2009-09-09-10-27-03.zip (35.5 KB) - added by mrkbutty@… 4 years ago.
TCX file - note all TCX files cause the error

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by stoecker

  • Owner changed from team to mrkbutty@…
  • Status changed from new to needinfo

How do you start JOSM? What system, what (commandline) call do you use?

comment:2 Changed 4 years ago by anonymous

Sorry, Windows XP SP2 and the command batch file is;

set CLASSPATH=.
set JAVA_HOME="C:\Program Files\Java\jre1.5.0_21"
"C:\Program Files\Java\jre1.5.0_21\bin\java.exe" -jar -Xmx512M -Dsun.java2d.opengl=true josm-tested.jar

comment:3 Changed 4 years ago by anonymous

One other thing of note; my system recently auto updated java to Version 1.6, and so JOSM stopped working completely, I installed 1.5 manually and have both co-existing hence the paths in the batch file. I also updated to the latest version of JOSM as I hadn't used it in a while. So this is probably an environmental problem. Note the same error occurs even when all java 1.6 versions are disabled. Note the startup batch file is (correctly formatted);

set CLASSPATH=.
set JAVA_HOME="C:\Program Files\Java\jre1.5.0_21"
"C:\Program Files\Java\jre1.5.0_21\bin\java.exe" -jar -Xmx512M -Dsun.java2d.opengl=true josm-tested.jar

comment:4 Changed 4 years ago by stoecker

Please add a TCX file also. I think Dieter had to convert the TCX stuff without real good testing possibilities, so there may be a bug.

P.S. JOSM works fine with 1.6, so you have a real problem in installation. :-)

comment:5 Changed 4 years ago by stoecker

  • Cc dmuecke added

Changed 4 years ago by mrkbutty@…

TCX file - note all TCX files cause the error

comment:6 Changed 4 years ago by anonymous

Interesting comment regarding Java, when using 1.6 the background window panels are blank (black) some text is missing and windows although operational do not refresh unless the mouse is activating the buttons, it's as though the windows manager isn't working, basically unusable, I will re-install and attempt again.

I just assumed it was the 1.6 upgrade but may not be the issue.

comment:7 Changed 4 years ago by mrkbutty@…

Sused it; Although I do not know why;

I uninstalled everything (java) and reinstalled latest JRE6u16 (I was previously using u15), It now works.

Also note the screen not refreshing/updating was because I was using "sun.java2d.opengl=true", which used to work, so something else (Nvidia driver update / java???) may have caused that.

comment:8 Changed 4 years ago by stoecker

  • Resolution set to worksforme
  • Status changed from needinfo to closed

"It now works" means the TCX import also works? If not, reopen the bug please.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.