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 134635 - NB6.1: Problem deploying EAR with a "packaged archive" module (RAR)
Summary: NB6.1: Problem deploying EAR with a "packaged archive" module (RAR)
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: pslechta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-06 20:44 UTC by jmarine
Modified: 2008-11-25 19:22 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 jmarine 2008-05-06 20:44:51 UTC
Hi all,

With NetBeans 6.0, I used to package/deploy an "enterprise application" that requires a JCA connector (packaged in a 
RAR module). So, I create a "Packaged Archive" from the RAR module, to easily add this type of Java EE module in the 
EAR project.

But with NetBeans 6.1, I get this exception when deploying the generated EAR in Glassfish V2 ur2:
Deployment error:
null
See the server log for details.
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166)
        at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.lang.NullPointerException
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getJ2eeModule(ConfigSupportImpl.java:720)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:496)
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:151)
        ... 16 more
BUILD FAILED (total time: 0 seconds)


It's not a critical issue, because I can manually deploy the generated EAR with Glassfish's administrative console, 
but it would be nice that newer NB versions will be able to do all the tasks (compile/package and deploy this type of 
applications).

I think the reason is that the "packaged archive" module is represented by 
the "org.netbeans.modules.j2ee.archive.project.ArchiveProject" class , that returns a "null" in the "getUrl()" method. 
And it causes a NullPointerException in "org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getJ2eeModule" 
method (when matching the null value returned from "childModule.getUrl()" with the moduleUri parameter that is also 
null).


Thanks.
Comment 1 pslechta 2008-06-20 09:35:32 UTC
I can reproduce this issue.
Comment 2 pslechta 2008-06-20 11:45:34 UTC
Fixed.

http://hg.netbeans.org/main/rev/c6c4f9cc8d9c

Petre, please double check if the fix is not breaking anything else. Thanks!
Comment 3 jmarine 2008-06-20 18:35:10 UTC
After applying the patch to my system, I can deploy the EAR project with packaged archives from NetBeans 6.1.
Thank you very much!
Comment 4 jmarine 2008-07-03 18:11:00 UTC
After some succesful deployments, I tried to start a debugging session of some tests. After that, and I'm having a new 
error when deploying the same project on NB6.1 + patch "c6c4f9cc8d9c":

Deployment error:
null
See the server log for details.
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166)
        at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.util.ConcurrentModificationException
        at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
        at java.util.AbstractList$Itr.next(AbstractList.java:343)
        at org.netbeans.modules.j2ee.deployment.plugins.api.ServerProgress.notify(ServerProgress.java:116)
        at 
org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.setStatusDistributeFailed(InitialServerFileDistributor.java:230)
        at 
org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:137)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:186)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:518)
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:151)
        ... 16 more
BUILD FAILED (total time: 16 seconds)


I think the reason could be that "getJ2eeModule" method should return "null" for this type of "packaged RAR" modules 
(instead of returning "j2eeModule")?

Thanks.
Comment 5 pslechta 2008-07-04 08:57:41 UTC
Can you please provide steps to reproduce? Or project on which it is failing?
Thanks!
Comment 6 jmarine 2008-07-06 16:50:58 UTC
Sorry, I think I have generated the new error when I removed the Glassfish domain in NetBeans' server preferences, and 
registered a new domain with the "Directory Deployment Enabled" option checked (by default). 
Comment 7 jmarine 2008-07-06 16:53:12 UTC
After disabling "Directory Deployment Enabled" option, I can deploy the project again (from NetBeans 6.1 with 
patch "c6c4f9cc8d9c" applied).
Comment 8 rbalada 2008-07-18 14:48:06 UTC
I've transplanted the changeset http://hg.netbeans.org/main/rev/c6c4f9cc8d9c into release61_fixes repository as
http://hg.netbeans.org/release61_fixes/rev/ac659c59aba3
Comment 9 jmarine 2008-11-25 19:22:02 UTC
I've verified that I can correctly deploy again this type of projects with NetBeans 6.5 and 6.1+updates.
Thank you very much,