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 149217 - Cannot Run J2SE Application Main class
Summary: Cannot Run J2SE Application Main class
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 12:14 UTC by Milan Kuchtiak
Modified: 2008-10-13 15:43 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kuchtiak 2008-10-06 12:14:34 UTC
Steps to reproduce:

- create J2SE Application
- create WS Client (e.g. for http:/www.webservicex.net/CurrencyConvertor.asmx?wsdl)
- Drag & Drop WS Operation into main() method
- run the Main class

Run action works neither for Main class nor for Project.
It has something to do with Compile on Save.
Comment 1 Martin Fousek 2008-10-06 12:23:53 UTC
dump from the output tab (in the messages log isn't anythink)

Exception in thread "main" java.lang.NoClassDefFoundError: org/test/MyWSService
Caused by: java.lang.ClassNotFoundException: org.test.MyWSService
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Comment 2 Milan Kuchtiak 2008-10-06 12:31:32 UTC
This is the Exception from Output Window:

run:
Exception in thread "main" java.lang.NoClassDefFoundError: net/webservicex/CurrencyConvertor
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

Note: 
I implemented some changes in JaxWsSourceForBinaryQuery. 
Now, the JAX-WS  generated sources are not resolved for project/build/classes URI, or should they?
Anyway, I found the problem existed even before this change (Friday).

This is the change in JaxWsSourceForBinaryQuery:
http://hg.netbeans.org/main/rev/972ad4b57399
Comment 3 Milan Kuchtiak 2008-10-08 11:00:38 UTC
Fixed.

Problem with Run action (case after project is build) fixed by resolving source root for build/classes:
http://hg.netbeans.org/main?cmd=changeset;node=a9048daacf55

Problem with Run action (case after project is cleaned) fixed by disabling Compile on Save feature in J2SE Project,
containing WS References:
http://hg.netbeans.org/main?cmd=changeset;node=be03667c5b52
Comment 4 Quality Engineering 2008-10-09 05:58:37 UTC
Integrated into 'main-golden', will be available in build *200810090201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a9048daacf55
User: mkuchtiak@netbeans.org
Log: #149217: resolve sources also for build/classes
Comment 5 Martin Fousek 2008-10-13 15:43:49 UTC
Verified in NetBeans IDE Dev (Build 200810111401).