- This topic has 4 replies, 2 voices, and was last updated 14 years, 5 months ago by Ram.
-
AuthorPosts
-
baeurlemMemberHi,
I am evaluating MyEclipse 8.5 on WinXP with JDK 1.6.0_20 and I try to do an exploded deployment on Glassfish V3
The EAR Project references an EJB and a WAR Project:
TestEAR
– TestEJB
– TestWARAll Projects contain a pom.xml and are managed with Maven.
The exploded structure seems to be almost correct with 2 exceptions:
The resulting directory structure is
TestEAR.ear
– lib
– META-INF
– TestEJB.jar
– TestWAR.warGlassfish does not accept the EJB and WAR directories. The names should be
– TestEJB_jar
– TestWAR_warHow can I change this?
Regards
P.S.:The packaged deployment works correctly.
RamMemberbaeurlem,
I have deployed a Test EAR(TraderXEAR) project in Glassfish V3 Final in exploded mode. I am able to exectue the application successfully.
The exploded structure at my end is
TraderXEAR.ear
— META-INF
– TestEJB.jar(This is a directory not a jar file)
– TestWAR.war (This is a directory not a war file)Are you getting any errors or Exceptions with the above structure when you deploy/execute the application?
I think you are assuming TestEJB.jar, TestWAR.war files are jar file,war file respectively. Those two are directories.
Is there any specific reason for using the following naming convention?
– TestEJB_jar
– TestWAR_war
baeurlemMemberHi,
my Glassfish does not start with the directories named TestEJB.jar and TestWAR.war.
The contents of the directories are valid. I thought the underscore for exploded directories is Glassfish convention(see in domains/domain1/applications directory) but if I rename them to TestEJB_jar and TestWAR_war the Glassfish does not start either with the same error, so forget this.[#|2010-06-10T17:32:58.605+0200|INFO|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=23;_ThreadName=AutoDeployer;|Cannot find module TestWAR in application bundle|#]
[#|2010-06-10T17:32:58.605+0200|INFO|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=23;_ThreadName=AutoDeployer;|Cannot find module TestEJB in application bundle|#]
[#|2010-06-10T17:32:58.605+0200|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=23;_ThreadName=AutoDeployer;|Exception while deploying the app
java.lang.IllegalArgumentException: Application [TestEAR] contains no valid components
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:73)
at com.sun.enterprise.deployment.Application.visit(Application.java:1740)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:774)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:253)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:222)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:145)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:78)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
|#]
baeurlemMemberI found the reason:
MyEclipse changes the application.xml on deployment: I selected “Do not modify ‘application.xml’ (I will manually manage it)” in EAR Project.
If I select “Automatically update ‘application.xml’ as needed” it does not work either.The application.xml looks like:
<?xml version=”1.0″ encoding=”UTF-8″?>
<application xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:application=”http://java.sun.com/xml/ns/javaee/application_5.xsd” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd” version=”5″>
<display-name>TestEAR</display-name>
<module>
<web>
<web-uri>TestWar</web-uri>
<context-root>/</context-root>
</web>
</module>
<module>
<ejb>TestEJB</ejb>
</module>
<library-directory>lib</library-directory>
</application>It must look like
…
<web-uri>TestWar.war</web-uri>
…
<ejb>TestEJB.jar</ejb>
…then it works!
Why does MyEclipse change the application.xml?
RamMemberbaeurlem,
Good to know that you are all set. I have escalated this issue to our dev team member. They will get back to you on this.
-
AuthorPosts