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.
Build: \\thumper\50builds\gfesb\v2.1\main\nightly\20090420-0723 The new ‘Compile on Save’ option under Java Application project’s properties (Java Application project/Properties/Build/Compiling), causing JAXB class file to be deleted at runtime. This causes the project to fail at runtime with ‘Exception in thread "main" java.lang.NoClassDefFoundError’. To reproduce: 1)Open the provided Java Application for JAXB. 2)Under the project’s properties/Build/Compiling, make sure to select ‘Compile on Save’ option (which is set by default when the project was created) 3)Clean and Build the project. 4)Check the generated jaxb class files under ‘Files’ tab: 5)Run the project. It will fail with: ‘Exception in thread "main" java.lang.NoClassDefFoundError: CreditReport/CreditReport’ Notice that the generated jaxb class files (shown above) were deleted once the project was run. 6)Do another ‘Clean and Build’ the project. 7)Go under the Files tab, and select the build.xml under the project and select ‘Run Target/run’ (as shown below) and the project will run fine: Work-around: Under the project properties, de-select the project’s ‘Compile on Save’ option (as shown in step 2 above). The the project will be able to run successfully. (ticket filed under: Issuezilla/Component = Java; Sub-component=j2seproject)
Created attachment 80553 [details] Project and screen shots files
What version of NB is bundeled? This should be fixed in final 6.5 - see issue 142360
NetBean 6.5.1.
Still reproducible in trunk. Errors are shown inside editor for JAXB-generated classes. Triggered by CoS. --- Product Version: NetBeans IDE Dev (Build 090515) Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133 System: Mac OS X version 10.5.6 running on i386; MacRoman; en_US (nb)
After clean and build, everything seems to work fine. Maybe a build-impl.xml regeneration issue. It should be probably regenerated upon opening of project. Rpoon, could you please try again in a newer build?
You will only see the problem when run the project after built. I have reverified with the very last build (\\thumper\50builds\gfesb\v2.1\gfesbv21\nightly\20090515-1455) and this is still reproducible.
The work around is to un-select the 'Compile on Save' selection under Compiling of the project properties.
*** This bug has been marked as a duplicate of bug 151845 ***