Skip to main content

Problem deploying EAR from folder structure

13 replies [Last post]
phiko6402
Offline
Joined: 2006-12-05

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:
domain1/generated/ejb/j2ee-apps/testApp 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
FileUtils.safeIsDirectory() returns false, when called in: DeploymentRequest.getStubsDirectory() which, at later point, causes NullPointerExpection. Actually this NPE is not reported anywhere in the server logs. You see just: IASDeploymentException.

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
domain1/generated/ejb/j2ee-apps/testApp 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)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gcruscoe
Offline
Joined: 2003-06-30

Well it seems after some offline discussion, the problem might be solved!!!

I am very much looking forward to using the next build which should have this working like a charm.

Thank you so much Hong for figuring this out for us!

So in summary:
* Name your module directories _war, _jar etc.
* When using autodeploy it would appear that you need to name your ear directory .ear although when using the UI or the command line tool this doesn't seem to matter at all
* If you have trouble with autodeploy try deploying with the gui or with the asadmin tool:
# asadmin deploy MyTestEar
* And the bug that is being discussed here, the _war directory not deploying correctly when deployed as an exploded module inside an exploded ear (and using @WebService web services) should be fixed in the next nightly build (and thus build 52 and onwards).
* And to throw in one extra piece of info, Netbeans 6 m10 is supposed to support this type of exploded deployment, so we can all start taking advantage of it and becoming even more productive!

Thanks again to Hong!

-Geoff

gcruscoe
Offline
Joined: 2003-06-30

So deploying through the web console or the auto deploy have the same results.

I have created a sample ear that deploys correctly packaged but fails unjarred using the correct file structure.

When using the deployer in the admin console of the app server:

I select the deploy local file or directory -> choose directory -> /tmp/MyTestEar.ear/

and it fails with:

[#|2007-06-19T12:14:34.758-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=20;_ThreadName=Thread-59;_RequestID=62bbef08-5323-448e-b73d-db30da15ef3b;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException
at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1837)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2237)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:774)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
|#]

gcruscoe
Offline
Joined: 2003-06-30

I cannot provide the current project as a sample as it has proprietary information in it. I will try to create a small sample.

Should I try any different versions of the app server?

Is the name of the war's directory supposed to end with _war or .war I get different errors depending which one I use. If I use anything else it doesn't even try to deploy it as a war.

The exact error message for the _war is:

Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException
at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1837)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2237)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:276)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:294)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:555)
at sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:564)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:545)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:492)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:267)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

And the exact error for the .war is:

Cannot load [package name omitted] OrderProcessingWebServices reason : [package name omitted] OrderProcessingWebServices
java.lang.ClassNotFoundException: [package name omitted] OrderProcessingWebServices
at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:714)
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:627)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:174)
at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:127)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:445)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:346)
at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:318)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:321)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.open(ApplicationArchivist.java:238)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:763)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:744)
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:349)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:358)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:276)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:294)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:564)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:545)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:492)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:267)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Hong Zhang

Hi,
Yes, a small test case would be helpful.
Since you were using v2 b51 which is the latest build already,
changing to a different build will not help much.
1. The directory name should be ended with _war (please look at the
supported directory format here
https://glassfish.dev.java.net/javaee5/deployment/index.html#0.0.0.0.Pac...
).
2. Currently the officially supported two ways to do directory
deployment are through admin cli (using asadmin deploy command) and
through admin gui. So please try to deploy through them and see whether
it makes a difference.

- Hong

glassfish@javadesktop.org wrote:

>I cannot provide the current project as a sample as it has proprietary information in it. I will try to create a small sample.
>
>Should I try any different versions of the app server?
>
>Is the name of the war's directory supposed to end with _war or .war I get different errors depending which one I use. If I use anything else it doesn't even try to deploy it as a war.
>
>
>The exact error message for the _war is:
>
>Exception occured in J2EEC Phase
>com.sun.enterprise.deployment.backend.IASDeploymentException
> at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1837)
> at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2237)
> at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
> at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
> at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
> at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
> at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:276)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:294)
> at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:555)
> at sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
> at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
> at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
> at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
> at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
> at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
> at $Proxy1.invoke(Unknown Source)
> at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
> at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:564)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:545)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:492)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:267)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
>
>
>
>
>And the exact error for the .war is:
>
>Cannot load [package name omitted] OrderProcessingWebServices reason : [package name omitted] OrderProcessingWebServices
>java.lang.ClassNotFoundException: [package name omitted] OrderProcessingWebServices
> at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:714)
> at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:627)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:174)
> at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:127)
> at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:445)
> at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:346)
> at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:318)
> at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
> at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:321)
> at com.sun.enterprise.deployment.archivist.ApplicationArchivist.open(ApplicationArchivist.java:238)
> at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:763)
> at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:744)
> at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:349)
> at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:358)
> at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
> at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
> at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
> at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:276)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:294)
> at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:555)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
> at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
> at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
> at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
> at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
> at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
> at $Proxy1.invoke(Unknown Source)
> at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
> at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:564)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:545)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:492)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:267)
> at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
>[Message sent by forum member 'gcruscoe' (gcruscoe)]
>
>http://forums.java.net/jive/thread.jspa?messageID=222881
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

gcruscoe
Offline
Joined: 2003-06-30

How can I send you the sample directory? I can't figure out how to attach on here. I'm sorry for this silly question...

Hong Zhang

No, you couldn't do attachment through forum ;-) You could open a
glassfish issue with attachment or you could just send to my java net email:
hzhang_jn@dev.java.net

Something for you to try in the meantime: could you please rename the
top level directory to MyTestEar instead of MyTestEar.ear and see
whether it makes a difference?

hzhang_jn@dev.java.net

glassfish@javadesktop.org wrote:

>How can I send you the sample directory? I can't figure out how to attach on here. I'm sorry for this silly question...
>[Message sent by forum member 'gcruscoe' (gcruscoe)]
>
>http://forums.java.net/jive/thread.jspa?messageID=222913
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

gcruscoe
Offline
Joined: 2003-06-30

Okay I sent the email with a tar.gz with both the directory version and the .ear packaged version.

I tried to name the deployment MyTestEar as well and had the same exact result as MyTestEar.ear and MyTestEar_ear (using the deployer from the web console).

Incidentally, when using the autodeploy feature only the .ear directory name results in this same error (the WsGen error). If I autodeploy using MyTestEar_ear or just MyTestEar then I get the following ClassNotFound issues (but I guess this is for another day :-):

[#|2007-06-19T12:55:19.052-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;|[AutoDeploy] Selecting file /var/home/gruscoe/local/glassfish-v2-b51/domains/domain1/autodeploy/MyTestEar_ear/MyTestWeb_war/WEB-INF/classes/com/tests/mytester/TestClasses.class for autodeployment.|#]

[#|2007-06-19T12:55:19.053-0400|WARNING|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;_RequestID=b5f964c7-42a8-4a69-b973-520362814e12;|MyTestEar.ear.MyTestWeb.war.WEB-INF.classes.com.tests.mytester.TestClasses
java.lang.ClassNotFoundException: MyTestEar.ear.MyTestWeb.war.WEB-INF.classes.com.tests.mytester.TestClasses
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 java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.getTypeFromFile(DeploymentServiceUtils.java:1155)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.getTypeFromFile(ApplicationsConfigMBean.java:2553)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:479)
at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:564)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:545)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:492)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:267)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
|#]

[#|2007-06-19T12:55:19.122-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;|deployed with moduleid = MyTestEar_ear_MyTestWeb_war_WEB-INF_classes_com_tests_mytester_TestClasses|#]

[#|2007-06-19T12:55:19.196-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;|[AutoDeploy] Successfully autodeployed : /var/home/gruscoe/local/glassfish-v2-b51/domains/domain1/autodeploy/MyTestEar_ear/MyTestWeb_war/WEB-INF/classes/com/tests/mytester/TestClasses.class.|#]

[#|2007-06-19T12:55:19.197-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;|[AutoDeploy] Selecting file /var/home/gruscoe/local/glassfish-v2-b51/domains/domain1/autodeploy/MyTestEar_ear/MyTestWeb_war/WEB-INF/classes/com/tests/webservices/WebServiceTester.class for autodeployment.|#]

[#|2007-06-19T12:55:19.198-0400|WARNING|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;_RequestID=b5f964c7-42a8-4a69-b973-520362814e12;|MyTestEar.ear.MyTestWeb.war.WEB-INF.classes.com.tests.webservices.WebServiceTester
java.lang.ClassNotFoundException: MyTestEar.ear.MyTestWeb.war.WEB-INF.classes.com.tests.webservices.WebServiceTester
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 java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.getTypeFromFile(DeploymentServiceUtils.java:1155)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.getTypeFromFile(ApplicationsConfigMBean.java:2553)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:479)
at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:564)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:545)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:492)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:267)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
|#]

[#|2007-06-19T12:55:19.216-0400|WARNING|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;_RequestID=b5f964c7-42a8-4a69-b973-520362814e12;|Error in annotation processing: java.lang.NoClassDefFoundError: MyTestEar_ear/MyTestWeb_war/WEB-INF/classes/com/tests/webservices/WebServiceTester (wrong name: com/tests/webservices/WebServiceTester)|#]

[#|2007-06-19T12:55:19.254-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;|deployed with moduleid = MyTestEar_ear_MyTestWeb_war_WEB-INF_classes_com_tests_webservices_WebServiceTester|#]

[#|2007-06-19T12:55:19.329-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Timer-6;|[AutoDeploy] Successfully autodeployed : /var/home/gruscoe/local/glassfish-v2-b51/domains/domain1/autodeploy/MyTestEar_ear/MyTestWeb_war/WEB-INF/classes/com/tests/webservices/WebServiceTester.class.|#]

gcruscoe
Offline
Joined: 2003-06-30

Hi I am having a similar problem. I am trying to work with the exploded deployment option and am getting an error with the runWsGen(WsUtil.java:1837), which looks like it's trying to read the Manifest file.

So here is the full picture. I start with an ear (with a couple jars in the /lib, a war and an ejb).

If I deploy this as a file it deploys fine.

it has a web service in the war (as a POJO w/ the @WebService, etc. and no web service deployment descriptors). There is an ejb.jar at the root of the project also it is also fine under the "file" deployment. They both reference the POJO entities in the /lib directory.

If I deploy this as an exploded directory to glassfish v2 b51

I explode the ejb.jar to ejb_jar and it seems to read everything in fine

I explode the web.war to web_war and it recognizes its there but then bombs when it tries to do the WsGen on it. I have tried this using the autodeploy as well as using the directory deployment using the admin console. They both have the same result. Now if I don't rename the .war to _war I get ClassNotFoundExceptions like this:

Cannot load com.papajohns.profit.orderservices.startupservlet.StartupServlet reason : com.papajohns.profit.orderservices.startupservlet.StartupServlet
java.lang.ClassNotFoundException: com.papajohns.profit.orderservices.startupservlet.StartupServlet
at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:737)

Where startupServlet is just a regular servlet (not sure why its talking about the EJB here). And it does this for every class in the war.

So either way, I'm pretty stuck. Should I try a nightly build or something? A previous build? Anyway thanks again

The exploded deployment will be such a huge improvement. A simple change takes several minutes to process and I am trying to teach everyone Java EE 5, so it is causing headaches (They are doing a lot of quick redeployments).

So as I mentioned this is glassfish v2 b51, on Linux, using jdk 5_11. Please let me know if there's anything I can do to help trouble shoot this problem. I started looking into it because netbeans 6 m10 is coming out and is supposed to support this exploded deployment. So I have been testing it manually to make sure all of our stuff is going to work.

Anyway, thanks in advance!

-Geoff

Hong Zhang

Hi, Geoff
What type of error message did you get when it tries to do Wsgen on
the web_war? As it had no problem reading classes from ejb_jar, this
might be a problem in the classpath setting of webservices for directory
deployment.
Could you send us your application (the ear format which worked and
also the directory format with ejb_jar, web_war which didn't work for
you) or open a glassfish issue with the application as attachments so we
could take a look?

Thanks,

- Hong

glassfish@javadesktop.org wrote:

>Hi I am having a similar problem. I am trying to work with the exploded deployment option and am getting an error with the runWsGen(WsUtil.java:1837), which looks like it's trying to read the Manifest file.
>
>So here is the full picture. I start with an ear (with a couple jars in the /lib, a war and an ejb).
>
>If I deploy this as a file it deploys fine.
>
>it has a web service in the war (as a POJO w/ the @WebService, etc. and no web service deployment descriptors). There is an ejb.jar at the root of the project also it is also fine under the "file" deployment. They both reference the POJO entities in the /lib directory.
>
>If I deploy this as an exploded directory to glassfish v2 b51
>
>I explode the ejb.jar to ejb_jar and it seems to read everything in fine
>
>I explode the web.war to web_war and it recognizes its there but then bombs when it tries to do the WsGen on it. I have tried this using the autodeploy as well as using the directory deployment using the admin console. They both have the same result. Now if I don't rename the .war to _war I get ClassNotFoundExceptions like this:
>
>Cannot load com.papajohns.profit.orderservices.startupservlet.StartupServlet reason : com.papajohns.profit.orderservices.startupservlet.StartupServlet
>java.lang.ClassNotFoundException: com.papajohns.profit.orderservices.startupservlet.StartupServlet
> at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:737)
>
>Where startupServlet is just a regular servlet (not sure why its talking about the EJB here). And it does this for every class in the war.
>
>So either way, I'm pretty stuck. Should I try a nightly build or something? A previous build? Anyway thanks again
>
>The exploded deployment will be such a huge improvement. A simple change takes several minutes to process and I am trying to teach everyone Java EE 5, so it is causing headaches (They are doing a lot of quick redeployments).
>
>So as I mentioned this is glassfish v2 b51, on Linux, using jdk 5_11. Please let me know if there's anything I can do to help trouble shoot this problem. I started looking into it because netbeans 6 m10 is coming out and is supposed to support this exploded deployment. So I have been testing it manually to make sure all of our stuff is going to work.
>
>Anyway, thanks in advance!
>
>-Geoff
>[Message sent by forum member 'gcruscoe' (gcruscoe)]
>
>http://forums.java.net/jive/thread.jspa?messageID=222784
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

vbkraemer
Offline
Joined: 2003-09-03

You may want to read through this blog entry: http://blogs.sun.com/vkraemer/entry/a_history_lesson_of_deployment. It contains a reference to information which will help resolve this issue.

It sounds like you are trying to do directory deployment (covered in http://developers.sun.com/appserver/reference/techart/deployment.html#5)

vbk

tjquinn
Offline
Joined: 2005-03-30

Hi, Phiko.

Can you please post this information?

1. The output from jar ft

2. The output from find

3. Please try deploying the directory using asadmin deploydir. I don't necessarily expect different behavior compared to trying the directory deployment through the admin GUI console, but this will help narrow down the source of the problem.

In any case, ideally GlassFish should not be allowing the NPE let alone hiding it. That may merit opening an issue, but before doing that let's take a look at the results from #1 and #2.

- Tim

phiko6402
Offline
Joined: 2006-12-05

Hi TJ,

sorry I was not answering so long, but I was not available.

1. I actually do not have a JAR file. If all is packaged in a JAR and then the JAR into EAR - it works fine. Imagine now that all JARs and the EAR are exploded into directory structure (say, unzip the EAR and JAR). You can see the problem only if you try to deploy as exploded.

2. I will post this asap, because currently I don't have this project active.

Meanwhile, I have developed a simple tool, which monitors the generated/ejb directory inside the GLASSFISH and when needed it creates the directory for my application.

Thanks,
Phiko

tjquinn
Offline
Joined: 2005-03-30

Hi, Phiko.

You can use the jar command on an EAR file, and that's what I'm interested in for #1. Since the EAR works, I want to be able to compare the contents of the EAR with the contents of the directory. So both #1 and #2 will be helpful, when you have the chance.

- Tim