Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 210690 - wsimport Ant tasks causes NoClassDefFoundError from many places.
wsimport Ant tasks causes NoClassDefFoundError from many places.
Status: RESOLVED INVALID
Product: webservices
Classification: Unclassified
Component: JAX-WS
7.1.1
PC Linux
: P2 with 2 votes (vote)
: 7.2
Assigned To: Lukas Jungmann
issues@webservices
:
: 211159 211161 212093 213491 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-04 11:38 UTC by Lukas Jungmann
Modified: 2012-08-30 15:36 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
sample apps (7.16 MB, application/x-7z-compressed)
2012-04-04 11:38 UTC, Lukas Jungmann
Details
ide log (493.86 KB, text/plain)
2012-04-04 11:40 UTC, Lukas Jungmann
Details
ide log (69.88 KB, text/plain)
2012-04-04 11:40 UTC, Lukas Jungmann
Details
ide log (52.14 KB, text/plain)
2012-04-04 11:40 UTC, Lukas Jungmann
Details
AbsentInformationException from tools.jar (327 bytes, application/octet-stream)
2012-04-06 09:52 UTC, Lukas Jungmann
Details
log with debugging info (4.41 MB, text/plain)
2012-04-11 10:54 UTC, Lukas Jungmann
Details
fix in GF (5.41 MB, application/octet-stream)
2012-04-25 14:58 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2012-04-04 11:38:43 UTC
Created attachment 117806 [details]
sample apps

IDE version: 7.1, 7.1.1, 7.2-dev
OS: Win 7-x64, ubuntu 11.10-x64
JDK: 6u31-x64, 7u2-x64, 7u3-x64
Ide bundle: javaee


-install IDE & start it with fresh userdir
-open attached webapps in the IDE
-deploy them to the "bundled" GF-3.1.2
-put a break point into webservice2.listener.ApplicationStartupListener, line 27

=>
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.spi.debugger.ui.EditorContextDispatcher$EventFirer
java.lang.ClassNotFoundException: com.sun.jdi.AbsentInformationException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
...

-restart IDE
-put a break point into webservice2.listener.ApplicationStartupListener, line 27

=> break point is set

-do debug on the Webservice2 project

=> 
SEVERE [global]
java.lang.ClassNotFoundException: org.openide.util.actions.ActionInvoker
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
...
Comment 1 Lukas Jungmann 2012-04-04 11:40:17 UTC
Created attachment 117807 [details]
ide log
Comment 2 Lukas Jungmann 2012-04-04 11:40:41 UTC
Created attachment 117808 [details]
ide log
Comment 3 Lukas Jungmann 2012-04-04 11:40:55 UTC
Created attachment 117809 [details]
ide log
Comment 4 Jaroslav Tulach 2012-04-04 15:18:45 UTC
OK, if it is debugger problem, then it should be analysed by debugger guys
Comment 5 Martin Entlicher 2012-04-06 08:16:19 UTC
java.lang.ClassNotFoundException: org.openide.util.actions.CallbackSystemAction$WeakAction
This is definitely not a debugger problem.

java.lang.ClassNotFoundException: com.sun.jdi.AbsentInformationException
This is caused by: Java Home = /home/lukas/work/lock/jdk1.7.0_03/jre

You can not use debugger on JRE.

How do you event manage to run debugger on JRE? When I try that, debugger modules refuse to install when running on JRE, since they miss tools.jar.
Comment 6 Lukas Jungmann 2012-04-06 08:19:30 UTC
(In reply to comment #5)
> java.lang.ClassNotFoundException: com.sun.jdi.AbsentInformationException
> This is caused by: Java Home = /home/lukas/work/lock/jdk1.7.0_03/jre
> 
> You can not use debugger on JRE.
> 
> How do you event manage to run debugger on JRE? When I try that, debugger
> modules refuse to install when running on JRE, since they miss tools.jar.

just by running IDE using './netbeans --jdkhome /home/lukas/work/lock/jdk1.7.0_03'
Comment 7 Jaroslav Tulach 2012-04-06 08:19:55 UTC
The WeakAction problem is reported as bug 210509, if you believe the rest is caused by debugger missing necessary library, deal with it in debugger product, please.
Comment 8 Martin Entlicher 2012-04-06 08:57:27 UTC
O.K., now I see that messages log contains .../jre, even when it uses JDK.

I believe, that debugger has set up all dependencies correctly.
In api.debugger.jpda/manifest.mf there is:
OpenIDE-Module-Package-Dependencies: com.sun.jdi[VirtualMachineManager]

But then there's thrown:
java.lang.ClassNotFoundException: com.sun.jdi.AbsentInformationException
starting from ModuleCL@4624d4d1[org.netbeans.modules.debugger.jpda.ui] with possible defining loaders null and declared parents [ModuleCL@46985138[org.netbeans.modules.editor.lib], ModuleCL@7bd00baf[org.netbeans.modules.editor.lib2], ModuleCL@59d15c2a[org.netbeans.api.debugger.jpda], ModuleCL@28176fec[org.openide.dialogs], ModuleCL@3f801e2c[org.openide.loaders], ModuleCL@14bddbc2[org.netbeans.modules.java.source], ModuleCL@5a62867c[org.openide.text], ModuleCL@47d13d6a[org.openide.awt], ModuleCL@61f9dcce[org.openide.nodes], ModuleCL@5956c062[org.openide.windows], ...12 more]

You really must have something screwed up in your installation.
When I remove tools.jar from my JDK, I get:
Warning - could not install module JPDA Debugger API
	org.netbeans.api.debugger.jpda - <b>The JDK is missing and is required to run some NetBeans modules</b><br> Please use the --jdkhome command line option to specify a JDK<br>installation or see <a href="http://wiki.netbeans.org/FaqRunningOnJre">http://wiki.netbeans.org/FaqRunningOnJre</a> for<br> more information.

If you have tools.jar there, how can you get ClassNotFoundException: com.sun.jdi.AbsentInformationException?

Can you please attach your tools.jar here, so that I can see if this class is there?
Comment 9 Martin Entlicher 2012-04-06 09:04:51 UTC
Anyway, I really do not know why should I be dealing with this.
Can please module system explain, how is it possible, that someone gets
ClassNotFoundException: com.sun.jdi.AbsentInformationException
from org.netbeans.modules.debugger.jpda.ui module, when this module depends on org.netbeans.api.debugger.jpda, which has:
OpenIDE-Module-Package-Dependencies: com.sun.jdi[VirtualMachineManager]

Is there something more I should do to enforce the dependency?

Please note, that both com.sun.jdi.AbsentInformationException and com.sun.jdi.VirtualMachineManager are in the *same* tools.jar.
Comment 10 Martin Entlicher 2012-04-06 09:10:10 UTC
Also there is:
java.lang.ClassNotFoundException: org.openide.util.actions.ActionInvoker
Comment 11 Lukas Jungmann 2012-04-06 09:52:45 UTC
Created attachment 117932 [details]
AbsentInformationException from tools.jar

(In reply to comment #8)
> You really must have something screwed up in your installation.

would really like to hear what it is. I tried different versions (downloaded from internal as well as external link, built myself, used zip bundle as well as installer), different JDKs and different 64-bit OSes and still have no idea what it could be... window manager? kernel? env settings? But these don't get to play on win, right?

btw: just updated my OS to Ubuntu-12.04 beta and it didn't help. When I try to expand web app node I get:
java.lang.NoClassDefFoundError: org/openide/util/ImageUtilities$CompositeImageKey
	at org.openide.util.ImageUtilities.mergeImages(ImageUtilities.java:185)
	at org.netbeans.modules.web.project.ui.DocBaseNodeFactory$BaseNode.computeIcon(DocBaseNodeFactory.java:342)
	at org.netbeans.modules.web.project.ui.DocBaseNodeFactory$BaseNode.getIcon(DocBaseNodeFactory.java:326)
	at org.openide.nodes.FilterNode.getIcon(FilterNode.java:569)
	at org.openide.explorer.view.VisualizerNode.getIcon(VisualizerNode.java:559)
	at org.openide.explorer.view.NodeRenderer.configureFrom(NodeRenderer.java:215)
	at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:147)
...

> If you have tools.jar there, how can you get ClassNotFoundException:
> com.sun.jdi.AbsentInformationException?
> 
> Can you please attach your tools.jar here, so that I can see if this class is
> there?

it's too big (~14.7MB) but the requested class is there (attached)
Comment 12 Jaroslav Tulach 2012-04-06 10:52:20 UTC
1. Try to produce more logs with -J-Dorg.netbeans.JarClassLoader.level=FINE

2. Try to run under debugger and put exception breakpoint to java.lang.NoClassDefFoundError. Call me when it is hit to investigate.
Comment 13 Martin Entlicher 2012-04-06 12:27:56 UTC
Thanks for the class, I sort of didn't believe it's there, because when I extract com/sun/jdi/VirtualMachineManager.class from tools.jar, debugger modules refuse to install. So you MUST have that class there.

Since you get NoClassDefFoundError from many places, the problem is certainly NOT in debugger.
Comment 14 Jaroslav Tulach 2012-04-10 09:05:19 UTC
If you can reproduce, please provide the detailed logs.
Comment 15 Lukas Jungmann 2012-04-11 10:54:47 UTC
Created attachment 118115 [details]
log with debugging info

attached requested ide log with '-J-Dorg.netbeans.JarClassLoader.level=FINE'

with requested breakpoint debugger stops in: java.awt.Component.checkCoalescing() on line 5935

I'm sorry I won't be in the office this week (currently on vacation) but if there's anything you need to know and I can provide it to you, let me know. I think I'll be able to find few minutes to look at this ;-)
Comment 16 Jaroslav Tulach 2012-04-13 19:26:46 UTC
*** Bug 211159 has been marked as a duplicate of this bug. ***
Comment 17 Jaroslav Tulach 2012-04-13 20:55:27 UTC
The problem with TopSecurityManager is that it is on classpath of the Java application. E.g. 
java.lang.ClassNotFoundException: org.netbeans.TopSecurityManager$PrivilegedCheck
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
Caused: java.lang.NoClassDefFoundError: org/netbeans/TopSecurityManager$PrivilegedCheck
	at org.netbeans.TopSecurityManager.checkExit(TopSecurityManager.java:158)
	at java.lang.Runtime.exit(Runtime.java:105)
	at java.lang.System.exit(System.java:960)
	at org.netbeans.TopSecurityManager.exit(TopSecurityManager.java:213)
	at org.netbeans.core.NbLifecycleManager$ExitActions.run(NbLifecycleManager.java:140)
	at org.openide.util.Task.run(Task.java:248)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)


should be loaded by JDK! I have no idea why it is not loaded.
Comment 18 Jaroslav Tulach 2012-04-17 09:19:52 UTC
Lukáš allowed me to debug on his computer. The application classloader really cannot find class from a JAR on classpath. Lukáš promised to find sources for sun.misc.URLClassPath, so we can debug it and find out what is wrong.
Comment 19 Jaroslav Tulach 2012-04-17 15:34:11 UTC
I suspect some Glassfish(?) library uses reflection to empty the classpath in sun.misc.Launcher$AppClassLoader
Comment 20 Lukas Jungmann 2012-04-18 10:26:40 UTC
you're almost right, wsimport ant task seems to be guilty here - it tries to clean up accessed resources too aggressively.
Comment 21 Jaroslav Tulach 2012-04-18 12:47:34 UTC
I was thinking about using TopSecurityManager to prevent the task cleanup, but that would fail the Ant build:

https://svn.java.net/svn/istack-commons~svn/trunk/istack-commons/tools/src14/com/sun/istack/tools/ProtectedTask.java
Comment 22 Lukas Jungmann 2012-04-18 13:32:21 UTC
this should be fixed on the jax-ws ri side, reassigning to myself
Comment 23 Jaroslav Tulach 2012-04-18 13:49:06 UTC
*** Bug 211161 has been marked as a duplicate of this bug. ***
Comment 24 Petr Jiricka 2012-04-25 08:41:32 UTC
Hi Lukas, so when you address this issue on the JAX-WS side, will there be a new release of JAX-WS that we could include in NetBeans? Any estimate when that could happen? Thanks.
Comment 25 Lukas Jungmann 2012-04-25 14:58:22 UTC
Created attachment 118754 [details]
fix in GF

attached binary with the fix for this issue on the GF side, put it into $GF_HOME/glassfish/modules folder
Comment 26 Lukas Jungmann 2012-04-25 15:07:58 UTC
(In reply to comment #24)
> Hi Lukas, so when you address this issue on the JAX-WS side, will there be a
> new release of JAX-WS that we could include in NetBeans? Any estimate when that
> could happen? Thanks.

Hi Petr, we can plan it - what is tentative last day you need it delivered somehow? Fix is ready to be commited[1] and GF 3.1.2 compatible binary should be already attached to this issue for testing purposes.

But since the cause of the issue lies in fact in Ant[2] - or at least it is related to it - is there some option it could be somehow handled on the NB side? Jesse?


[1]: http://java.net/jira/browse/JAX_WS-1059
[2]: https://issues.apache.org/bugzilla/show_bug.cgi?id=35436
Comment 27 Denis Anisimov 2012-04-25 15:27:30 UTC
I need to clarify :
wsimport ant task with the bug is GF bundled. I misinformed Petr about 
bundling buggy library with NB.
So it is completely external GF 3.1.2 issue. Updated GF version
( with available fix ) should be used to avoid the bug ( no need to update any 
NB library).
Comment 28 Lukas Jungmann 2012-04-25 15:34:56 UTC
(In reply to comment #27)
> I need to clarify :
> wsimport ant task with the bug is GF bundled. I misinformed Petr about 
> bundling buggy library with NB.
> So it is completely external GF 3.1.2 issue. Updated GF version
> ( with available fix ) should be used to avoid the bug ( no need to update any 
> NB library).

depends on which versions are currently bundled in the IDE. This issue should affect JAX-WS 2.2.6 and Metro 2.2 (and GF 3.1.2)
Comment 29 Denis Anisimov 2012-04-25 15:38:32 UTC
(In reply to comment #28)
> (In reply to comment #27)
> > I need to clarify :
> > wsimport ant task with the bug is GF bundled. I misinformed Petr about 
> > bundling buggy library with NB.
> > So it is completely external GF 3.1.2 issue. Updated GF version
> > ( with available fix ) should be used to avoid the bug ( no need to update any 
> > NB library).
> 
> depends on which versions are currently bundled in the IDE. This issue should
> affect JAX-WS 2.2.6 and Metro 2.2 (and GF 3.1.2)

JAX-WS version 2.2 and Metro 2.0 are bundled with NB.
Comment 30 Lukas Jungmann 2012-04-26 08:10:29 UTC
(In reply to comment #29)
> > depends on which versions are currently bundled in the IDE. This issue should
> > affect JAX-WS 2.2.6 and Metro 2.2 (and GF 3.1.2)
> 
> JAX-WS version 2.2 and Metro 2.0 are bundled with NB.

=> won't fix on NB side then I think (unless something can be done directly in Ant support or around it), feel free to reopen if needed
Comment 31 Petr Jiricka 2012-04-26 09:48:45 UTC
WONTFIX is not acceptable for P2 bugs, instead we should request a waiver for 7.2.
Comment 32 Denis Anisimov 2012-04-26 09:50:08 UTC
(In reply to comment #31)
> WONTFIX is not acceptable for P2 bugs, instead we should request a waiver for
> 7.2.

Probably INVALID fits the best in this case.
This is not NB bug so this is wrong tracker for this issue.
Comment 33 Petr Jiricka 2012-04-26 11:04:50 UTC
True.
Comment 34 Martin Entlicher 2012-05-07 10:11:32 UTC
*** Bug 212093 has been marked as a duplicate of this bug. ***
Comment 35 Vince Kraemer 2012-05-18 16:55:25 UTC
Please file a bug in http://java.net/jira/browse/GLASSFISH, so this can be resolved completely.

I would, but I do not know what release of JAX-WS is broken and/or fixed...
Comment 36 noteimporte 2012-05-23 12:46:15 UTC
Hello, 

 Could you please state instructions for Netbeans to work properly when building a WS?  What components do we have to update?
Comment 37 Denis Anisimov 2012-05-23 14:14:40 UTC
(In reply to comment #36)
> Hello, 
> 
>  Could you please state instructions for Netbeans to work properly when
> building a WS?  What components do we have to update?

This is not NB bug.
NB uses GF bundled jars to perform some tasks. GF 3.1.2 has a bug.
So the answer is : don't use GF 3.1.2 as a target server.
Use most recent GF version.
Comment 38 Martin Entlicher 2012-06-04 11:57:27 UTC
*** Bug 213491 has been marked as a duplicate of this bug. ***
Comment 39 Vince Kraemer 2012-06-07 07:42:12 UTC
There is a patch for this issue.  You can read about it here: http://wiki.netbeans.org/MetroIssue


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