Date: 2004-07-29T08:12:05
   Editor: JacekLaskowski <[EMAIL PROTECTED]>
   Wiki: Apache Geronimo Wiki
   Page: PetStore
   URL: http://wiki.apache.org/geronimo/PetStore

   Info on geronimo-application.xml

Change Log:

------------------------------------------------------------------------------
@@ -18,6 +18,8 @@
 
 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: 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. Change the current working directory to /petstore.
@@ -28,32 +30,62 @@
 <application xmlns="http://java.sun.com/xml/ns/j2ee";>
 }}}
 
- Save it.
+ 1. Create {{{META-INF/geronimo-application.xml}}}:
+
+ {{{
+<?xml version="1.0" encoding="UTF-8"?>
 
- 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).
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application";
+    configId="petstore"
+    parentId="org/apache/geronimo/Server">
+
+    <gbean name="petstore:j2eeType=J2EEDomain,name=petstore" 
class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+
+</application>
+}}}
+
+ 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.
 
- 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}}} with the the directory where PetStore is.
 
  {{{
 java -jar bin/deployer.jar --install --module `cygpath --windows /petstore`
 }}}
 
- And the exception for reference:
+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)
+ {{{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)
-...
-Caused by: javax.management.MalformedObjectNameException: Invalid value:
-        at javax.management.ObjectName.<init>(ObjectName.java:95)
-        at 
org.apache.geronimo.j2ee.deployment.EARContext.<init>(EARContext.java:89)
-        ... 26 more
+        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)
 }}}
 
  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.

Reply via email to