cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 163169 - Run Failed due to JAXB Class Files Deleted at Runtime
: Run Failed due to JAXB Class Files Deleted at Runtime
Status: NEW
: java
Project
: 6.5
: All All
: P3 (vote)
: 6.8
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-04-21 02:02 by
Modified: 2010-02-08 08:45 (History)
Issue Type: DEFECT
:


Attachments
Project and screen shots files (111.10 KB, application/octet-stream)
2009-04-21 02:06, rpoon
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-04-21 02:02:19
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)
------- Comment #1 From 2009-04-21 02:06:29 -------
Created an attachment (id=80553) [details]
Project and screen shots files
------- Comment #2 From 2009-04-21 11:36:56 -------
What version of NB is bundeled? This should be fixed in final 6.5 - see issue
142360
------- Comment #3 From 2009-04-21 16:36:45 -------
NetBean 6.5.1.
------- Comment #4 From 2009-05-18 16:17:28 -------
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)
------- Comment #5 From 2009-05-19 13:13:47 -------
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?
------- Comment #6 From 2009-05-22 16:35:07 -------
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.
------- Comment #7 From 2009-05-22 16:41:15 -------
The work around is to un-select the 'Compile on Save' selection under Compiling
of the project properties.