Date: 2004-07-30T15:39:53 Editor: JacekLaskowski <[EMAIL PROTECTED]> Wiki: Apache Geronimo Wiki Page: PetStore URL: http://wiki.apache.org/geronimo/PetStore
After changes to EAR pack it up Change Log: ------------------------------------------------------------------------------ @@ -20,9 +20,9 @@ NOTE: Explanation on what particular file or configuration setting do(es?) will be added later. - 1. Unpack petstore.ear (one of the files that constitute the application) to a directory, say ''/petstore'' (on Windows it'd be ''c:/petstore'') + 1. Unpack petstore.ear (one of the files that constitute the application) to a directory, say ''/petstore/ear'' (on Windows it'd be ''c:/petstore/ear'') - 1. Change the current working directory to /petstore. + 1. Change the current working directory to /petstore/ear. 1. Edit {{{META-INF/application.xml}}} and change the root tag ''application'' to: @@ -44,49 +44,23 @@ </application> }}} + 1. Only RARs and WARs are currently supported in an unpacked EAR, so jar up /petstore/ear directory. + + {{{ +jar -cf ../petstore.ear * +}}} + 1. Go to the home directory of Geronimo (i.e. ''/geronimo/target/geronimo-1.0-SNAPSHOT'' assuming that as above it's decided to place Geronimo sources to /geronimo directory). - 1. Run the following command and see an exception that asks for a solution, but don't know it yet :( That's where the story ends. + 1. Run the deploy tool (i.e. a executable jar) -NOTE: It's done on Cygwin mounted directory /petstore so replace the magical {{{cygpath --windows /petstore}}} with the the directory where PetStore is. +NOTE: It's done on Cygwin mounted directory /petstore so replace the magical {{{cygpath --windows /petstore/petstore.ear}}} with the path to where PetStore is. {{{ -java -jar bin/deployer.jar --install --module `cygpath --windows /petstore` +java -jar bin/deployer.jar --install --module `cygpath --windows /petstore/petstore.ear` }}} -And the exception for reference: - - {{{org.apache.geronimo.deployment.DeploymentException: Only unpacked RAR are suppored. - at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$1.installModule(EARConfigBuilder.java:268) - at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:373) - at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:276) - at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>) - at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) - at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38) - at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142) - at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:744) - at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89) - at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34) - at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:111) - at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7a1ca0ae.buildConfiguration(<generated> -) - at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:198) - at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>) - at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) - at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38) - at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142) - at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:765) - at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218) - at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121) - at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86) - at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121) - at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121) - at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerIntercep -tor.java:205) - at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079) - at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:231) - at org.apache.geronimo.system.main.CommandLine.main(CommandLine.java:82) -}}} +That's where out story ends up. 1. As mentioned at [http://wiki.apache.org/geronimo/Deployment#head-754164850f38c1ecdaf6b8ed894cb192bc36c5f4 Web Application section] of [http://wiki.apache.org/geronimo/Deployment Deployment] chapter {{{WEB-INF/geronimo-jetty.xml}}} must be added to petstore.war.