This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125493

Summary: ClassNotFoundException: JAXBException with jdk 6u4
Product: platform Reporter: mgoe <mgoe>
Component: Module SystemAssignee: Jesse Glick <jglick>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: jtulach
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Module suite project showing the issue.

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