Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 125493 - ClassNotFoundException: JAXBException with jdk 6u4
ClassNotFoundException: JAXBException with jdk 6u4
Status: RESOLVED DUPLICATE of bug 125655
Product: platform
Classification: Unclassified
Component: Module System
6.x
PC Linux
: P1 with 1 vote (vote)
: TBD
Assigned To: Jesse Glick
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-17 16:05 UTC by mgoe
Modified: 2008-12-23 14:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Module suite project showing the issue. (2.22 MB, application/x-gzip)
2008-01-17 16:08 UTC, mgoe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mgoe 2008-01-17 16:05:57 UTC
I'm using JAXB in a Netbeans 6 module suite project. After I switched to jdk 6u4 the application does no longer work. 
The application compiles. But during runtime I get the following ClassNotFoundException:

java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:232)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Caused: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at org.yourorghere.module1.JAXBAction.performAction(JAXBAction.java:15)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118)
	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
	at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
	at java.awt.Component.processMouseEvent(Component.java:6041)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5806)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4413)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4243)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2440)
	at java.awt.Component.dispatchEvent(Component.java:4243)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 mgoe 2008-01-17 16:08:44 UTC
Created attachment 55209 [details]
Module suite project showing the issue.
Comment 2 mgoe 2008-01-17 16:11:21 UTC
I added a module suite project which shows the problem. Just select File>JAXBAction to trigger the Exception shown in 
my bug report.
Comment 3 Lukas Hasik 2008-01-21 14:44:39 UTC
reassigning to pnejedly - isn't it caused by the warmup cache? 
also CC'ing Jarda. Maybe he fixed in issue 125655.

Anyway, please evaluate it. This is P1 that is considered to be stopper for 6.1 M1. It needs to be evaluated/fixed ASAP
thank you
Comment 4 Petr Nejedly 2008-01-21 15:43:04 UTC
Hardly related to startup cache - the user runs NB6.0, not a dev build.
Comment 5 Jesse Glick 2008-01-21 19:20:20 UTC
You cannot currently use the JRE's version of these classes. You must include JAXB in a lib wrapper module and depend on it.

*** This issue has been marked as a duplicate of 96711 ***
Comment 6 mgoe 2008-01-22 10:20:38 UTC
I don't think that it is a good idea to suppress the jre provided classes for several reasons:

1. Bugs
If there is a bug in a class normally provided by the jre but replaced/suppressed by netbeans you will not be able to 
write a bug report against the jre. The jre people will always reject bug reports for classes not contained in the jre 
because the jre has been tested with the classes it contains.

2. License issues
Even for a lawyer it is sometimes very hard to find out if you are allowed to extract some jars from a project and use 
them in another project. For that reason I don't want to use classes from an external source if they are present in 
the jre.

3. Endorsed dirs mechanism
There is an established way to replace classes in the jre with newer ones using the endorsed dirs mechanism. Why 
reinvent the wheel?

4 Documentation issues
Where is the documentation of the classes suppressed by netbeans. Who will decide which classes should be suppressed.

For the reasons mentioned above I would like to have a netbeans platform which per default does not alter the jre in 
any way. If a developer requires changes the developer should be forced to switch on these changes manually for 
example by a property.

Best regards,
Martin Goettlicher
Comment 7 Jesse Glick 2008-01-23 21:17:52 UTC
See issue #96711.
Comment 8 Jesse Glick 2008-02-16 00:51:49 UTC
x
Comment 9 Jesse Glick 2008-02-16 00:52:06 UTC

*** This issue has been marked as a duplicate of 125655 ***
Comment 10 Quality Engineering 2008-12-23 14:24:57 UTC
This issue had *4 votes* before move to platform component


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo