Yes Hernan, this is a known problem with the GEP that is slated to be fixed in the GEP 2.1.0 release -- although it's not yet fixed....

Hernan Cunico wrote:
hmmmm, I just realized about the deployment-1.1 in the geronimo-web.xml however this is automatically generated by the plugin so we may want to take a look into that as well.

Other than that, I ran this sample several times, starting from scratch every time and got it to work following those steps. If I have to bet I would say you are forgetting to delete the openejb-jar.xml.

Just for the record, this doc is for Geronimo 2.1 with the GEP 2.1. If you are using Geronimo 2.0 you may want to take a look at http://cwiki.apache.org/GMOxSAMPLES/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
there are a very slight differences.

HTH

Cheers!
Hernan

Jason Warner wrote:
The first thing that jumps out at me is that you're using the deployment-1.1 schema. For deployment on Geronimo 2.0, you should be using deployment-1.2. I think the eclipse plugin sets the deployment xmlns to 1.1 when a new web project is created for Geronimo 2.0. This was a bug that was noted a week or so ago in this jira: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-253

Try changing over to deployment-1.2 in your geronimo-web.xml.

Hope this helps!


On Sat, Mar 1, 2008 at 1:44 PM, seleshmaster <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:


    Hi guys;

    I am a newbi to JEE. I installed geronimo 2.0 and I was just
    following this
    tutorial to get my hands wet
http://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html#5-minuteTutorialonEnterpriseApplicationDevelopmentwithEclipseandGeronimo-CreateEnterpriseApplicationProject http://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html#5-minuteTutorialonEnterpriseApplicationDevelopmentwithEclipseandGeronimo-CreateEnterpriseApplicationProject

    Finally when I tried to deploy  the EAR project on the server, I am
    getting
    the following exception. Anyone has any idea?

    thx for the help.


    [severity=ERROR,message=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%7Dejb-ql-compiler-factory>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Denterprise-beans>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}service <http://geronimo.apache.org/xml/ns/deployment-1.2%7Dservice>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}gbean <http://geronimo.apache.org/xml/ns/deployment-1.2%7Dgbean>>,<{http://java.sun.com/xml/ns/persistence}persistence <http://java.sun.com/xml/ns/persistence%7Dpersistence>>,<{http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory <http://geronimo.apache.org/xml/ns/naming-1.2%7Dcmp-connection-factory>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Ddb-syntax-factory>>,<{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination <http://geronimo.apache.org/xml/ns/naming-1.2%7Dmessage-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%7Denforce-foreign-key-constraints>>,<{http://geronimo.apache.org/xml/ns/security-2.0}security <http://geronimo.apache.org/xml/ns/security-2.0%7Dsecurity>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Drelationships>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}environment <http://geronimo.apache.org/xml/ns/deployment-1.2%7Denvironment>>,<{http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security <http://geronimo.apache.org/xml/ns/j2ee/application-1.2%7Dsecurity>>,locator=[node=null,object=null,url=null,line=3,col=20,offset=-1]]
    13:29:20,805 ERROR [Deployer] Deployment failed due to
    org.apache.geronimo.common.DeploymentException: Failed parsing
    descriptors
    for module: /tmp/geronimo-deploymentUtil35456.jar
           at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule(EjbModuleBuilder.java:277)
           at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule(EjbModuleBuilder.java:199)
           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:124)
           at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
           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$$2b8f267d.createModule(<generated>)
           at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules(EARConfigBuilder.java:767)
           at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java:384)
           at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:277)
           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:124)
           at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
           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$$62bca092.getDeploymentPlan(<generated>)
           at
    org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:234)
           at
    org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
           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:124)
           at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
           at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
           at
    org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
           at
org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.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:124)
           at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
           at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
           at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:168)
           at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
           at
    com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
           at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
           at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
           at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
           at
javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
           at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
           at java.security.AccessController.doPrivileged(Native Method)
           at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
           at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784) at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
           at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at
    sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
           at sun.rmi.transport.Transport$1.run(Transport.java:153)
           at java.security.AccessController.doPrivileged(Native Method)
           at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
           at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
           at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
           at java.lang.Thread.run(Thread.java:613)
    Caused by: org.apache.openejb.OpenEJBException: Cannot unmarshall the
    openejb-jar.xml. Xml content written to: /tmp/openejb-jar-35457.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%7Dejb-ql-compiler-factory>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Denterprise-beans>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}service <http://geronimo.apache.org/xml/ns/deployment-1.2%7Dservice>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}gbean <http://geronimo.apache.org/xml/ns/deployment-1.2%7Dgbean>>,<{http://java.sun.com/xml/ns/persistence}persistence <http://java.sun.com/xml/ns/persistence%7Dpersistence>>,<{http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory <http://geronimo.apache.org/xml/ns/naming-1.2%7Dcmp-connection-factory>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Ddb-syntax-factory>>,<{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination <http://geronimo.apache.org/xml/ns/naming-1.2%7Dmessage-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%7Denforce-foreign-key-constraints>>,<{http://geronimo.apache.org/xml/ns/security-2.0}security <http://geronimo.apache.org/xml/ns/security-2.0%7Dsecurity>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Drelationships>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}environment <http://geronimo.apache.org/xml/ns/deployment-1.2%7Denvironment>>,<{http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security
    <http://geronimo.apache.org/xml/ns/j2ee/application-1.2%7Dsecurity>>
           at
org.apache.openejb.config.ReadDescriptors.readOpenejbJar(ReadDescriptors.java:207)
           at
org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:65)
           at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule(EjbModuleBuilder.java:272)
           ... 58 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%7Dejb-ql-compiler-factory>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Denterprise-beans>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}service <http://geronimo.apache.org/xml/ns/deployment-1.2%7Dservice>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}gbean <http://geronimo.apache.org/xml/ns/deployment-1.2%7Dgbean>>,<{http://java.sun.com/xml/ns/persistence}persistence <http://java.sun.com/xml/ns/persistence%7Dpersistence>>,<{http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory <http://geronimo.apache.org/xml/ns/naming-1.2%7Dcmp-connection-factory>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Ddb-syntax-factory>>,<{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination <http://geronimo.apache.org/xml/ns/naming-1.2%7Dmessage-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%7Denforce-foreign-key-constraints>>,<{http://geronimo.apache.org/xml/ns/security-2.0}security <http://geronimo.apache.org/xml/ns/security-2.0%7Dsecurity>>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships <http://openejb.apache.org/xml/ns/openejb-jar-2.2%7Drelationships>>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}environment <http://geronimo.apache.org/xml/ns/deployment-1.2%7Denvironment>>,<{http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security
    <http://geronimo.apache.org/xml/ns/j2ee/application-1.2%7Dsecurity>>
           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
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
           at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
           at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
           at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
           at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
           at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
           at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
           at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
           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:117)
           ... 60 more


    --
    View this message in context:
http://www.nabble.com/exception-while-running-the-5-minute-GEP-tutorial-example-tp15779115s134p15779115.html
    Sent from the Apache Geronimo - Users mailing list archive at
    Nabble.com <http://Nabble.com>.




--
~Jason Warner


--
Thanks,
Tim McConnell

Reply via email to