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 181693 - Can't deploy application if it's marked with compile errors
Summary: Can't deploy application if it's marked with compile errors
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 181694 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-09 08:09 UTC by Sergey Petrov
Modified: 2010-03-22 12:30 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 Sergey Petrov 2010-03-09 08:09:35 UTC
It's tested with gf3 only, but may be related to other issues.
In  order to reproduce:
create web project on gf3
add entity class from database (any sample), let it have name AAA.
add new class in a pakage.
add member(attribute) to the class 'AAA_ meta;'
it will be marked with error badge, but try clean&build
it will complain about missed class but will be compiled successfully as this class will be generated during build.
try to deploy
deployment will fail after two "Run Anyway" dialogs.

the only workaround I know for now is to turn on "Enable annotation in Editor", it will rescan files and no one will be marked with error, even clean&build will still produce "can't find symbol" I will be able to deploy my application.
Comment 1 Sergey Petrov 2010-03-09 08:12:54 UTC
*** Bug 181694 has been marked as a duplicate of this bug. ***
Comment 2 Vince Kraemer 2010-03-09 08:56:02 UTC
what is the message in  the dialog (exactly)?

Do you have the IDE log and.or the server log?
Comment 3 Sergey Petrov 2010-03-09 09:25:16 UTC
2 time dialog with "One or more projects was compiled with errors".
After 2 run anyway I see 
INFO: nullID: /tmp/WebApplication3/build/web/ CLASSES: [class t.A2173028_, class t.A2173028, class d.NewClass]

SEVERE: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: LA2173028_;
        at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:169)
        at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
        at 

        ... 30 more
Caused by: java.lang.ClassNotFoundException: A2173028_
        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 

org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:949)

But if I check project/dist/warname.war file size in first case(with fail) and in second case(without fail) I see the same size (6271 bytes in my case).
Comment 4 Vince Kraemer 2010-03-09 09:47:54 UTC
I was able to get the app to deploy if I turn off 'deploy on save' for the project.

I could also deploy the war file with asadmin.

I also noticed a significant difference in the output of du for the build/web directory...

deploy on save OFF:

VBKMacBookPro:web-main vkraemer$ du ~/NetBeansProjects/WebApplication83/build/web
8	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/META-INF
24	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF/classes/a
8	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF/classes/META-INF
32	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF/classes
48	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF
64	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web

Deploy on Save ON:

VBKMacBookPro:web-main vkraemer$ du ~/NetBeansProjects/WebApplication83/build/web
8	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/META-INF
16	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF/classes/a
8	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF/classes/META-INF
24	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF/classes
40	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web/WEB-INF
56	/Users/vkraemer/NetBeansProjects/WebApplication83/build/web

PetrH: this looks like a DoS issue that could use your input.
Comment 5 Sergey Petrov 2010-03-16 14:21:30 UTC
part with two dialogs is reproducible in j2se also, but finally if press "run anyway" twice in j2se application will be run successfully instead of fail in ee.
Comment 6 Sergey Petrov 2010-03-18 12:27:53 UTC
In case of #182196 support in editor is default now, so may be this issue isn't valid also and it can be consider as a requirement to have "Enable annotation in Editor" on.
Comment 7 Sergey Petrov 2010-03-18 13:39:07 UTC
I made the same changes in web/ejb/app client as in j2se, so default behavior should work now, I still don't like how it will behave if user will switch off support in editor, but may be it can be considered as a feature, not sure if it should be documented or not and also it may be not a p2 any more even if keep open.
Comment 8 Quality Engineering 2010-03-19 05:11:46 UTC
Integrated into 'main-golden', will be available in build *201003190200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/bf2b14c1b5b7
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: fix #181693 made ap in editor support on by default (same as in #182196)
Comment 9 Petr Hejl 2010-03-22 12:30:17 UTC
This already works quite fine with recent fixes enabling annotation processor support in editor.