Hi, try using
<?xml version="1.0" encoding="UTF-8"?> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"> <dep:environment xmlns:dep=" http://geronimo.apache.org/xml/ns/deployment-1.2"> <!-- Stuff here --> </dep:environment> </openejb-jar> On 8/20/07, tobstar <[EMAIL PROTECTED]> wrote: > > > Hi Viet, > > I have started to write the openejb-jar.xml, yet I have difficulties. My > weblogic-ejb-jar.xml which I assume is the equivalent to the > openejb-jar.xml > in geronimo shows following discriptors for each ejb: > > weblogic-ejb-jar.xml > > <weblogic-enterprise-bean> > <ejb-name>myEJB</ejb-name> > <stateless-session-descriptor> > <pool> > <initial-beans-in-free-pool>0</initial-beans-in-free-pool> > </pool> > </stateless-session-descriptor> > <transaction-descriptor> > <trans-timeout-seconds>600</trans-timeout-seconds> > </transaction-descriptor> > <local-jndi-name>AdminEJB</local-jndi-name> > </weblogic-enterprise-bean> > > My mapping the the openejb-jar looks like this so far (I am not quite sure > about it): > > openejb-jar.xml > > <session> > <ejb-name>myEJB</ejb-name> > <ejb-ref> > <ref-name>ejb/myEJB</ref-name> > <ejb-link>myEJB</ejb-link> > <local-jndi-name>myEJB</local-jndi-name> > </ejb-ref> > </session> > > > > I am running into following error: > > org.apache.geronimo.common.DeploymentException: Failed parsing descriptors > for module: /opt/geronimo/var/temp/geronimo-deploymentUtil7017.tmpdir > org.apache.geronimo.common.DeploymentException: > org.apache.geronimo.common.DeploymentException: Failed parsing descriptors > for module: /opt/geronimo/var/temp/geronimo-deploymentUtil7017.tmpdir > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java > :383) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java > :124) > at > org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke > (<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > GBeanOperation.java:127) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java > :863) > at > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) > at > org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy > (AbstractDeployCommand.java:116) > at > org.apache.geronimo.deployment.plugin.local.DistributeCommand.run( > DistributeCommand.java:61) > at java.lang.Thread.run(Thread.java:595) > Caused by: org.apache.geronimo.common.DeploymentException: Failed parsing > descriptors for module: > /opt/geronimo/var/temp/geronimo-deploymentUtil7017.tmpdir > at > org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule( > EjbModuleBuilder.java:237) > at > org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule( > EjbModuleBuilder.java:166) > at > > org.apache.geronimo.openejb.deployment.EjbModuleBuilder$$FastClassByCGLIB$$cd80af20.invoke > (<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > GBeanOperation.java:127) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java > :828) > at org.apache.geronimo.gbean.runtime.RawInvoker.invoke( > RawInvoker.java:57) > at > org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke( > RawOperationInvoker.java:35) > at > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( > ProxyMethodInterceptor.java:96) > at > > org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$51236dab.createModule > (<generated>) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules( > EARConfigBuilder.java:755) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan( > EARConfigBuilder.java:372) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan( > EARConfigBuilder.java:269) > at > > org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke > (<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > GBeanOperation.java:127) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java > :828) > at org.apache.geronimo.gbean.runtime.RawInvoker.invoke( > RawInvoker.java:57) > at > org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke( > RawOperationInvoker.java:35) > at > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( > ProxyMethodInterceptor.java:96) > at > > org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$$EnhancerByCGLIB$$8850e7c0.getDeploymentPlan > (<generated>) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java > :232) > ... 10 more > Caused by: org.apache.openejb.OpenEJBException: Cannot unmarshall the > openejb-jar.xml. Xml content written to: > /opt/geronimo/var/temp/openejb-jar-7018.xml: unexpected element > (uri:"http://geronimo.apache.org/xml/ns/deployment-1.1", > local:"environment"). Expected elements are > <{http://openejb.apache.org/xml/ns/openejb-jar-2.2}ejb-ql-compiler-factory > >,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans>,<{ > http://geronimo.apache.org/xml/ns/deployment-1.2}service>,<{ > http://geronimo.apache.org/xml/ns/deployment-1.2}gbean>,<{ > http://java.sun.com/xml/ns/persistence}persistence>,<{ > http://geronimo.apache.org/xml/ns/security-1.2}security>,<{ > http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory>,<{ > http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory>,<{ > http://geronimo.apache.org/xml/ns/naming-1.2}message-destination>,<{ > http://openejb.apache.org/xml/ns/openejb-jar-2.2}enforce-foreign-key-constraints > >,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships>,<{ > http://geronimo.apache.org/xml/ns/deployment-1.2}environment>,<{ > http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security> > at > org.apache.openejb.config.ReadDescriptors.readOpenejbJar( > ReadDescriptors.java:210) > at > org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:56) > at > org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule( > EjbModuleBuilder.java:235) > ... 33 more > Caused by: javax.xml.bind.UnmarshalException: unexpected element > (uri:"http://geronimo.apache.org/xml/ns/deployment-1.1", > local:"environment"). Expected elements are > <{http://openejb.apache.org/xml/ns/openejb-jar-2.2}ejb-ql-compiler-factory > >,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans>,<{ > http://geronimo.apache.org/xml/ns/deployment-1.2}service>,<{ > http://geronimo.apache.org/xml/ns/deployment-1.2}gbean>,<{ > http://java.sun.com/xml/ns/persistence}persistence>,<{ > http://geronimo.apache.org/xml/ns/security-1.2}security>,<{ > http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory>,<{ > http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory>,<{ > http://geronimo.apache.org/xml/ns/naming-1.2}message-destination>,<{ > http://openejb.apache.org/xml/ns/openejb-jar-2.2}enforce-foreign-key-constraints > >,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships>,<{ > http://geronimo.apache.org/xml/ns/deployment-1.2}environment>,<{ > http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security> > at > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent( > UnmarshallingContext.java:523) > at > com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java > :199) > at > com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java > :194) > at > > com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement > (Loader.java:71) > at > com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java > :65) > at > com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement( > StructureLoader.java:209) > at > > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement > (UnmarshallingContext.java:366) > at > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement > (UnmarshallingContext.java:347) > at > com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement( > SAXConnector.java:101) > at org.xml.sax.helpers.XMLFilterImpl.startElement( > XMLFilterImpl.java:527) > at > org.apache.openejb.jee.oejb2.NamespaceFilter.startElement( > NamespaceFilter.java:179) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > Source) > at > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch > (Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source) > at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > at > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0( > UnmarshallerImpl.java:194) > at > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal( > UnmarshallerImpl.java:167) > at > javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal( > AbstractUnmarshallerImpl.java:120) > at > javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal( > AbstractUnmarshallerImpl.java:103) > at > org.apache.openejb.jee.oejb2.JaxbOpenejbJar2.unmarshal( > JaxbOpenejbJar2.java:104) > at > org.apache.openejb.jee.oejb2.JaxbOpenejbJar2.unmarshal( > JaxbOpenejbJar2.java:66) > at > org.apache.openejb.config.ReadDescriptors.readOpenejbJar( > ReadDescriptors.java:120) > ... 35 more > > any idea??? > > It looks like the environment tag in my openejb-jar.xml is not accepted. > This i what I got as header for my geronimo xml files: > > openejb-jar.xml > > <dep:environment > xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"> > <dep:moduleId> > <dep:groupId>my_group</dep:groupId> > <dep:artifactId>myapp</dep:artifactId> > <dep:version>1.0</dep:version> > <dep:type>car</dep:type> > </dep:moduleId> > </dep:environment> > > Should I change it, when do I use dep and when sys?? A bit confused! > > > Thanks for your help, I really appreciate it! > > tm > > > Viet Nguyen-4 wrote: > > > > Hi, > > > > If you have an ejb-jar.xml, I'm pretty sure it's EJB 2.1. For an example > > of > > how to map session beans refer to this sample > > > > http://cwiki.apache.org/GMOxDOC11/very-simple-session-ejb-example.html. > > > > And about the persistence.xml question, I doubt that you need to worry > > about > > it because it is an EJB 3.0 thing. It allows you to make a reference to > a > > datasource on the app server in your code. > > > > Hope this example will make your migration journey easier, > > Viet Nguyen > > > > On 8/17/07, tobstar <[EMAIL PROTECTED]> wrote: > >> > >> > >> Hi Viet, > >> I will try the <context-root> in the geronimo-web.xml, but what is the > >> context-root tag in my application.xml then? > >> > >> application.xml > >> > >> <module> > >> <web> > >> <web-uri>myweb.war</web-uri> > >> <context-root>/myapp</context-root> > >> </web> > >> </module> > >> > >> or do I need both. > >> > >> EJBs I am using the 2.1 I believe, I have to check with the developer, > >> since > >> I am only the migrator. The dtd on the ejb-jar.xml is 2.0 so I assume > it > >> is > >> 2 something. > >> > >> Thanks for further help and a nice weekend. > >> > >> tm > >> > >> > >> > >> Viet Nguyen-4 wrote: > >> > > >> > You should have your <context-root> in your geronimo-web.xml. If you > >> want > >> > your url to be > >> > > >> > http://localhost:8080/myapp > >> > > >> > you should have > >> > > >> > <context-root>/myapp</context-root> in geronimo-web.xml somewhere. > >> > > >> > Also, are you using ejb 2.1 or 3.0? > >> > > >> > Hope this will help, > >> > Viet Nguyen > >> > > >> > On 8/17/07, tobstar <[EMAIL PROTECTED]> wrote: > >> >> > >> >> > >> >> Hi list, > >> >> I am a total noob with Geronimo, and I am currently looking into > >> >> migrating > >> >> our application from BEA Weblogic to Geronimo2. > >> >> > >> >> I have created a geronimo-web.xml and a geronimo-application.xml. I > >> have > >> >> also adapted the application.xml towards geronimo. Geronimo is > >> deploying > >> >> my > >> >> EAR file without any problems, yet it does not publish the war file > to > >> a > >> >> url. I cannot access my application. > >> >> > >> >> application.xml > >> >> > >> >> <?xml version="1.0" encoding="UTF-8"?> > >> >> <application > >> >> xmlns="http://java.sun.com/xml/ns/j2ee" > >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> >> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > >> >> http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" > >> >> version="1.4"> > >> >> <display-name>My Application</display-name> > >> >> <module> > >> >> <ejb>myejb.jar</ejb> > >> >> </module> > >> >> <module> > >> >> <web> > >> >> <web-uri>myweb.war</web-uri> > >> >> <context-root>/myapp</context-root> > >> >> </web> > >> >> </module> > >> >> </application> > >> >> > >> >> geronimo-application.xml > >> >> > >> >> <application > >> >> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1 > >> >> "> > >> >> <dep:environment > >> >> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"> > >> >> <dep:moduleId> > >> >> <dep:groupId>myapp_group</dep:groupId> > >> >> <dep:artifactId>myapp</dep:artifactId> > >> >> <dep:version>1.0</dep:version> > >> >> <dep:type>ear</dep:type> > >> >> </dep:moduleId> > >> >> </dep:environment> > >> >> </application> > >> >> > >> >> > >> >> geronimo-web.xml > >> >> > >> >> <?xml version="1.0" encoding="UTF-8"?> > >> >> <web-app > >> >> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"> > >> >> <dep:environment > >> >> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"> > >> >> <dep:moduleId> > >> >> <dep:groupId>clinpoint_group</dep:groupId> > >> >> <dep:artifactId>clinpoint</dep:artifactId> > >> >> <dep:version>1.0</dep:version> > >> >> <dep:type>ear</dep:type> > >> >> </dep:moduleId> > >> >> <dep:dependencies/> > >> >> <dep:hidden-classes/> > >> >> <dep:non-overridable-classes/> > >> >> </dep:environment> > >> >> > >> >> <context-root>admin</context-root> > >> >> <security-realm-name>myrealm</security-realm-name> > >> >> <security> > >> >> <default-principal realm-name="myrealm"> > >> >> <principal name="anonymous" > >> >> > >> >> class=" > >> org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" > >> >> /> > >> >> </default-principal> > >> >> <role-mappings> > >> >> <role role-name="myrole"> > >> >> <realm realm-name="myrealm"> > >> >> <principal > >> >> name="restricted" > >> >> > >> >> class=" > >> org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal > >> >> "/> > >> >> </realm> > >> >> </role> > >> >> </role-mappings> > >> >> </security> > >> >> </web-app> > >> >> > >> >> > >> >> I also use ejbs, but I am quite confused about on how to add these > to > >> the > >> >> geronimo-web.xml. > >> >> > >> >> I have lots of session EJBs in the web.xml like this, how do I > access > >> >> these > >> >> session beans with geronimo: > >> >> > >> >> <ejb-local-ref> > >> >> <ejb-ref-name>ejb/myEJB</ejb-ref-name> > >> >> <ejb-ref-type>Session</ejb-ref-type> > >> >> <local-home>mylocalhome</local-home> > >> >> <local>mypackage</local> > >> >> <ejb-link>myEJB</ejb-link> > >> >> </ejb-local-ref> > >> >> > >> >> > >> >> I am also using struts. > >> >> > >> >> Can anybody give me a hint on how to solve the problem? Am I missing > >> >> something? I have seen lots of talk about persistence.xml. What is > it? > >> Do > >> >> I > >> >> need it? Getting the application to be published via > >> localhost:8080/myapp > >> >> would be a start. Thanks in advance. > >> >> -- > >> >> View this message in context: > >> >> > >> > http://www.nabble.com/Bea-Ear-file-will-not-deploy-in-Geronimo2-after-migration-tf4285430s134.html#a12198753 > >> >> Sent from the Apache Geronimo - Users mailing list archive at > >> Nabble.com. > >> >> > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Bea-Ear-file-will-not-deploy-in-Geronimo2-after-migration-tf4285430s134.html#a12206261 > >> Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Bea-Ear-file-will-not-deploy-in-Geronimo2-after-migration-tf4285430s134.html#a12233310 > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. > >