Date: 2004-07-28T07:41:18 Editor: JacekLaskowski <[EMAIL PROTECTED]> Wiki: Apache Geronimo Wiki Page: PetStore URL: http://wiki.apache.org/geronimo/PetStore
Warm-up Change Log: ------------------------------------------------------------------------------ @@ -2,7 +2,7 @@ = '''About''' = -Due to the ongoing architectural refactorings the page is completely outdated unless Geronimo last_geronimombean version is used. See [BuildingAndRunning] for more information. +Let's dust it off and see how much Geronimo improved since the last update (it was really a long time ago). The page is about deploying [http://java.sun.com/blueprints/code/index.html#java_pet_store_demo Java Pet Store Demo 1.3.2] in Apache Geronimo. @@ -12,17 +12,58 @@ * [wiki:BuildingAndRunning Build Apache Geronimo] - * Install [wiki:OpenEJBNova OpenEJB Nova Service] - - * Install [wiki:OpenJCA OpenJCA] or any J2EE Connector Architecture JDBC implementation - * Download [http://java.sun.com/blueprints/code/index.html#java_pet_store_demo Java Pet Store Demo 1.3.2] = Deploying PetStore = Before going on, please keep in mind that {{{"whom ever wrote petstore should be hunted down..."}}}. It's been said during one IRC session and I couldn't resist to include it. -NOTE: Unless otherwise specified the directory names are all relative to '''incubator-geronimo/target/geronimo-DEV''' directory. + 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. Change the current working directory to /petstore. + + 1. Edit {{{META-INF/application.xml}}} and change the root tag ''application'' to: + + {{{ +<application xmlns="http://java.sun.com/xml/ns/j2ee"> +}}} + + Save it. + + 1. Go to the home directory of Geronimo (i.e. ''/geronimo/target'' 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. + + NOTE: It's done on Cygwin mounted directory /petstore so replace the magical {{{cygpath --windows /petstore}}} with the the directory where PetStore is. + + {{{ +java -jar bin/deployer.jar --install --module `cygpath --windows /petstore` +}}} + + And the exception for reference: + + {{{ +org.apache.geronimo.deployment.DeploymentException: Unable to construct J2EEApplication ObjectName + at org.apache.geronimo.j2ee.deployment.EARContext.<init>(EARContext.java:91) + at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:339) + 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) +}}} + + 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. + + {{{ +<?xml version="1.0" encoding="UTF-8"?> +<web-app + xmlns="http://geronimo.apache.org/xml/ns/web/jetty" + configId="your/domain/name/Example" + parentId="org/apache/geronimo/Server" + > + <context-root>/debug-tool</context-root> + <context-priority-classloader>false</context-priority-classloader> +</web-app> +}}} 1. Create '''petstore''' directory as a place where deployables are to be found. Open '''etc/boot-service.xml''' and add '''${geronimo.home}/petstore''' after the comma, next to'''${geronimo.home}/deploy''' in '''org.apache.geronimo.kernel.deployment.scanner.DeploymentScanner''' MBean as shown below: {{{ <mbean descriptor="org.apache.geronimo.kernel.deployment.scanner.DeploymentScanner"