users@glassfish.java.net

Problem deploying EAR from folder structure

From: <glassfish_at_javadesktop.org>
Date: Fri, 04 May 2007 05:20:31 PDT

I have one EAR, which has 2 JARs in it:
1. Just a stateless bean in one JAR
2. Just a web services stateless bean in the other.

When all this is packaged as a single EAR file I am able to deploy it on the server, which is GLASSFISH V2 b33e.

If I try to deploy this Enterprise Application directly from the folder structure (therefore not packaging it in EAR - using the "Browse Folders ..." button) - all fails.

After some hours of debugging the source of Glassfish I understood that the directory:
[b]domain1/generated/ejb/j2ee-apps/testApp[/b] is not getting pre-created, upon deployment. However, the JAXB classes for the web services are supposed to be there.

What happens next is that
[code]FileUtils.safeIsDirectory()[/code] returns false, when called in: [code]DeploymentRequest.getStubsDirectory()[/code] which, at later point, causes [code]NullPointerExpection[/code]. Actually this NPE is not reported anywhere in the server logs. You see just: [code]IASDeploymentException[/code].

If you pre-create the directory (manually) just before you go with the DEPLOY - all is working OK and the JAXB classes are generated and you can see them in the
[b]domain1/generated/ejb/j2ee-apps/testApp[/b] directory.

Is there anything I should do in order to tell GLASSFIH to pre-create this directory?
If not, is this a know issue? I was not able to find some bug logged for this.
It is a minor, but annoying if you work (during development using Eclipse) with non-packaged ear folder instead of single packaged .ear file.

Thanks,
Phiko


P.S.
If requested I can upload a sample EA, which reproduces this issue.

some stack trace:


com.sun.enterprise.deployment.backend.IASDeploymentException
        at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1809)
        at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2110)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:346)
        at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:206)
        at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:132)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:174)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:892)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:761)
        at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
        at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
[Message sent by forum member 'phiko6402' (phiko6402)]

http://forums.java.net/jive/thread.jspa?messageID=215522