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 107171 - Deployment Directory broken for EAR project if has app-client
Summary: Deployment Directory broken for EAR project if has app-client
Status: CLOSED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-19 11:31 UTC by nouar38
Modified: 2007-06-26 13:17 UTC (History)
0 users

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 nouar38 2007-06-19 11:31:53 UTC
NB 6.0 200706180000 (200706141200) & GF v2 b50c on both solaris/sparc and windows xp.

** Deploy an EE project , used Convertor example from Java EE 5 tutorials: ejb, web and app-client 
is broken, when "Enable Directory Deployment" is checked (tried on a local default domain)

Output- Convertor (Undeploy and Deploy action over the project)
<<<
pre-run-deploy:
Initial deploying converter to /javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy
Error during incremental deploy: java.lang.NullPointerException
Start registering the project's server resources
Finished registering server resources
/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/nbproject/build-impl.xml:185: Deployment error:
null
See the server log for details.
BUILD FAILED (total time: 1 second)

>>>

nothing in server.log but in Output "IDE-Log File"
<<<
INFO [global]
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:94)
       at
org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.setStatusDistributeFailed(InitialServerFileDistributor.java:197)
       at
org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor._distribute(InitialServerFileDistributor.java:183)
[catch] at
org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:96)
       at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:152)
       at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:485)
       at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:125)
       at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
       at sun.reflect.GeneratedMethodAccessor62.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:256)
       at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438)
       at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)
INFO [global]
java.lang.NullPointerException
       at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeployment.initialDeploy(DirectoryDeployment.java:297)
       at
org.netbeans.modules.j2ee.sun.ide.j2ee.incrdeploy.DirectoryDeploymentFacade.initialDeploy(DirectoryDeploymentFacade.java:188)
       at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:486)
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:125)
       at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
       at sun.reflect.GeneratedMethodAccessor62.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:256)
       at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438)
       at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)
>>>

On windows, we can find these extra logs in IDE-Log:
<<<
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: line:
C:\WINDOWS\Temp\javaee-5-ex_03\javaeetutorial5\examples\ejb\converter\nbproject\build-impl.xml:184: Deployment error:
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: result: looks like Windows file
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: result: no FO for C
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: Hyperlink:
[C:\WINDOWS\Temp\javaee-5-ex_03\javaeetutorial5\examples\ejb\converter\nbproject\build-impl.xml,184,-1,-1,-1,Deployment
error:]
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: smapfile: [null]
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: line: null
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: result: not a file
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: line: See the server log for details.
INFO [org.netbeans.modules.web.jspcompiler.JSPJavacAntLogger]: result: not a file
>>>>

If the box "Enable Directory Deployment" is UNCHECKED, the ear deployment is OK.

Distributing C:\WINDOWS\Temp\javaee-5-ex_03\javaeetutorial5\examples\ejb\converter\dist\converter.ear to
[localhost:4848_server]


and the Run of the app-client is as expected.
Comment 1 nouar38 2007-06-19 13:59:12 UTC
more info for investigation: this happens only if the EE project has an app-client.

The Convertor project, under Java EE Modules has:
converter-app-client.jar, converter-ejb.jar and converter-war.war
selecting each node in the upper list + action "Open Project"
==>>> opens the 3 projects 

deployment of the converter-ejb project when the Directory Deployment enabled = true is OK (build is used)
deployment of the converter-war project when the Directory Deployment enabled = true is OK (build is used)
deployment of the converter-app-client when the Directory Deployment enabled = true is OK 
(the jar is distributed to the server, as expected app-client directory deployment not supported in GF v2)


when app-client project is deployed can see in IDE-log:
INFO
java.lang.UnsupportedOperationException
	at org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl.save(ModuleConfigurationImpl.java:319)
	at
org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDeploymentPlanFileForDistribution(ConfigSupportImpl.java:759)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getConfigurationFile(ConfigSupportImpl.java:126)	at
org.netbeans.modules.j2ee.deployment.impl.projects.DeploymentTargetImpl.getConfigurationFile(DeploymentTargetImpl.java:208)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:494)
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:125)
	at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor62.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:256)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)


Now, if in Convertor EE project/Java EE Modules, I select convertor-app-client.jar and do action "Remove"=>>
the EE project has no more the app-client ==>>> the Directory Deployment is OK for this EE project.
In Servers/<server>/Applications/Enterprise Applications have the Convertor node with the two expected nodes
for ejb and the war.




Comment 2 nouar38 2007-06-19 14:40:25 UTC
I closed the convertor EE project, open it again.

Opened the convertor-app-client project, and on the convertor EE project I made the Action 
"Add Java EE Module" and selected the convertor-app-client project ==>> convertor-app-client.jar
was added. 

Run Again the Action "Undeploy and Deploy" on the EE project ==>>>
<<
Building jar: /javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/converter.ear
post-dist:
dist:
pre-run-deploy:
Initial deploying converter to /javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy
Completed initial distribution of converter
Start registering the project's server resources
... success
>>

Found in Servers/<server>Enterprise Applictions: the convertor application node with the three sub nodes: 
ejb, war and app-client all deployed.

(removed . and .. and totals lines)

gamay-03# ls -alR /javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy

-rw-r--r--   1 root     root        3446 Jun 19 15:19 converter-app-client.jar
drwxr-xr-x   4 root     root         512 Jun 19 15:19 converter-app-client_jar
-rw-r--r--   1 root     root        2416 Jun 19 15:19 converter-ejb.jar
drwxr-xr-x   4 root     root         512 Jun 19 15:19 converter-ejb_jar
-rw-r--r--   1 root     root        3541 Jun 19 15:19 converter-war.war
drwxr-xr-x   4 root     root         512 Jun 19 15:19 converter-war_war
-rw-r--r--   1 root     root           0 Jun 19 15:19 J2EE.dpf
drwxr-xr-x   2 root     root         512 Jun 19 15:19 META-INF

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-app-client_jar:

drwxr-xr-x   3 root     root         512 Jun 19 15:19 converter
-rw-r--r--   1 root     root           0 Jun 19 15:19 J2EE.dpf
drwxr-xr-x   2 root     root         512 Jun 19 15:19 META-INF

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-app-client_jar/converter:

drwxr-xr-x   2 root     root         512 Jun 19 15:19 client

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-app-client_jar/converter/client:

-rw-r--r--   1 root     root        1672 Jun 19 15:19 ConverterClient.class

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-app-client_jar/META-INF:

-rw-r--r--   1 root     root         356 Jun 19 15:19 application-client.xml
-rw-r--r--   1 root     root         152 Jun 19 15:19 MANIFEST.MF
-rw-r--r--   1 root     root         292 Jun 19 15:19 sun-application-client.xml

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-ejb_jar:

drwxr-xr-x   3 root     root         512 Jun 19 15:19 converter
drwxr-xr-x   2 root     root         512 Jun 19 15:19 META-INF

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-ejb_jar/converter:

drwxr-xr-x   2 root     root         512 Jun 19 15:19 ejb

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-ejb_jar/converter/ejb:

-rw-r--r--   1 root     root         265 Jun 19 15:19 Converter.class
-rw-r--r--   1 root     root         950 Jun 19 15:19 ConverterBean.class

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-ejb_jar/META-INF:

-rw-r--r--   1 root     root         106 Jun 19 15:19 MANIFEST.MF
-rw-r--r--   1 root     root         255 Jun 19 15:19 sun-ejb-jar.xml

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-war_war:

-rw-r--r--   1 root     root        1462 Jun 19 15:19 index.jsp
drwxr-xr-x   2 root     root         512 Jun 19 15:19 META-INF
drwxr-xr-x   2 root     root         512 Jun 19 15:19 WEB-INF

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-war_war/META-INF:

-rw-r--r--   1 root     root         106 Jun 19 15:19 MANIFEST.MF

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/converter-war_war/WEB-INF:
-rw-r--r--   1 root     root         715 Jun 19 15:19 sun-web.xml
-rw-r--r--   1 root     root         504 Jun 19 15:19 web.xml

/javaeetutorial5-1.0_03/javaeetutorial5/examples/ejb/converter/dist/gfdeploy/META-INF:

-rw-r--r--   1 root     root         578 Jun 19 15:19 application.xml
-rw-r--r--   1 root     root          23 Jun 19 15:19 MANIFEST.MF
-rw-r--r--   1 root     root         247 Jun 19 15:19 sun-application.xml




Finished registering server resources
Comment 3 Vince Kraemer 2007-06-19 16:15:01 UTC
I have tested this in the past, so it may be an easy issue that I just missed...
Comment 4 Vince Kraemer 2007-06-19 17:43:17 UTC
I just tried an ear with an app client... and ran into no issues.

I also ran the converter that I downloaded from...
http://java.sun.com/javaee/5/docs/tutorial/information/download.html

So, it looks like I need to get more details from you.

1. was converter already deployed on the domain, by some other mechanism?

2. was the converter project and all of its sub-projuects open?
   Though I tested this and it appeared to work...

Please re-open when more info is available
Comment 5 nouar38 2007-06-20 09:38:40 UTC
found the reason, as tried to reproduce many times and was not able.

From a previous individual deployment of Convertor projects
(war project, ejb project and app-client project) in the domain, the Convertor-app-client was not seen 
in IDE -Servers/Applications/App Client Modules instead can see the "Wait" node.

Using the Admin Console, I was able to see that Convertor-app-client was already deployed, so I 
undeployed it and retried again with IDE to deploy the EE project and it worked as expected.

So, in this particular case when we have "Wait" node we get the problem.
Comment 6 nouar38 2007-06-20 10:11:53 UTC
ok found for my windows/xp the reason: 
as the Convertor EE project was deployed/undeployed before having the EAR directory
deployment available, in order to get the feature Directory Deployment with success for the EAR, 
a "Clean and Build" of the EE project is mandatory before doing "Undeploy and Deploy".

Comment 7 nouar38 2007-06-26 13:17:42 UTC
marking this issue as closed, as it happens only if some one uses a nb 6.0 build before 0604 and after upgarde
to a more recent build which implements the EAR directory deployment and deploy without a clean / build.