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 108524 - NoClassDefFoundError appears when Java EE 5 web application with W/S deployed to Tomcat 6.0
Summary: NoClassDefFoundError appears when Java EE 5 web application with W/S deployed...
Status: VERIFIED WORKSFORME
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Quy Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-29 14:27 UTC by Roman Mostyka
Modified: 2007-07-11 10:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error log (4.76 KB, text/plain)
2007-06-29 14:28 UTC, Roman Mostyka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2007-06-29 14:27:55 UTC
1. Add Web Service http://www.webservicemart.com/uszip.asmx?WSDL.
2. Create web application with "Visual Web JSF" framework.
3. Add Web Service to application's page.
4. Copy all jars from the C:\Sun\NetBeans6.0M10\java1\modules\ext\jaxws21\api folder to 
$HOME\.netbeans\6.0m10\apache-tomcat-6.0.13_base\endorsed.
5. Deploy to Tomcat 6.0.

Result: Error: "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.spi.ProviderImpl". Application
doesn't work.
Comment 1 Roman Mostyka 2007-06-29 14:28:37 UTC
Created attachment 44569 [details]
Error log
Comment 2 Quy Nguyen 2007-06-29 18:58:25 UTC
Workaround - add the JAX-WS 2.1 library to the project

After this, it should deploy properly.
Comment 3 Quy Nguyen 2007-06-29 19:49:19 UTC
The correct libraries are now included in the project when the web service is added to the page.  The fix is only
integrated in the trunk.

Checking in src/org/netbeans/modules/visualweb/websvcmgr/consumer/DesignerWebServiceTransferManager.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/consumer/DesignerWebServiceTransferManager.java,v
 <--  DesignerWebServiceTransferManager.java
new revision: 1.5; previous revision: 1.4
done
Comment 4 Roman Mostyka 2007-07-02 12:35:28 UTC
Verified with build 200707020000.
I got the same error, what is described in issue #108523. But now I get exception even after copying all jars from the
$NetBeans6.0\java1\modules\ext\jaxws21\api folder to 
$HOME\.netbeans\6.0m10\apache-tomcat-6.0.13_base\endorsed.
When I look at libraries in project's properties, I see there "JAX-WS2.1" library.
Comment 5 Quy Nguyen 2007-07-02 17:26:49 UTC
Which exception do you get?  The exception from this issue or the exception from
http://www.netbeans.org/issues/show_bug.cgi?id=108523?
Comment 6 Roman Mostyka 2007-07-03 07:46:56 UTC
I get LinkageError - the same error which is described in issue #108523, not in this issue.
Comment 7 Quy Nguyen 2007-07-03 19:27:52 UTC
The fix for this issue is unrelated to #108523.  Did you stop and restart Tomcat after copying the jar files to the
endorsed directory?
Comment 8 Roman Mostyka 2007-07-04 09:58:08 UTC
Yes, I restarted Tomcat.
I installed IDE, GlassFish, Tomcat, opened IDE, started Tomcat, created
$HOME\.netbeans\6.0m10\apache-tomcat-6.0.13_base\endorsed, copied there jar files from
$NetBeans6.0\java1\modules\ext\jaxws21\api, restarted Tomcat, created Java EE 5 web application, deployed it to Tomcat
and got exception.
Comment 9 Quy Nguyen 2007-07-06 00:13:19 UTC
You may have to copy the jars before you start the IDE or initially start up Tomcat.  Using the restart command may not
be sufficient.
Comment 10 Roman Mostyka 2007-07-06 08:28:44 UTC
I installed IDE and Tomcat, started IDE, started Tomcat (without this apache-tomcat-6.0.13_base doesn't exist), then
stopped Tomcat, closed IDE, copied jar files, started IDE, started Tomcat, added W/S, created project, added W/S to it
and deployed. Result is the same.
Comment 11 Quy Nguyen 2007-07-10 20:00:35 UTC
The jax-ws jars need to be added an /endorsed subdirectory of the tomcat 6 install directory, not the NB user directory.
 I'm not sure why the error message indicates that this is the correct place to put the jars.
Comment 12 Roman Mostyka 2007-07-11 10:02:10 UTC
Verified with build 2707100000.