geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Katia Aresti Gonzalez" <kaare...@hotmail.com>
Subject Deployment fail at persistent EJB
Date Mon, 11 Apr 2005 22:39:34 GMT
Hello!!!

I was trying to deploy the persistent EJB. Im using the OpenEJB example off 
ships and titan... Its an easy example, just 2 entity bean and a session 
bean. The problem is that the deployment fails and this the error
that appears:

i cant guess what is the problem. Im trying to deploy de jar, build with 
maven, and buils succesfull,
using the ejb-jar.xml and the openejb-jar.xml

Anybody can help??? thank you!!!!

Katia


C:\gero>start java -jar bin/server.jar

C:\gero>java -jar bin/deployer.jar --user system --password manager deploy 
d:/cm
p/build/dist/prueba-ejbs.jar
Deployment failed
  Server reports: org.apache.geronimo.common.DeploymentException: Error 
parsing
ejb-jar.xml
        Error parsing ejb-jar.xml
        Invalid deployment descriptor: [error: Element not allowed: 
reentrant@ht
tp://java.sun.com/xml/ns/j2ee in element 
entity@http://java.sun.com/xml/ns/j2ee,
error: String 'container' is not a valid enumerated value for 
persistence-typeT
ype in namespace http://java.sun.com/xml/ns/j2ee, error: Element not 
allowed: cm
p-field@http://java.sun.com/xml/ns/j2ee in element 
entity@http://java.sun.com/xm
l/ns/j2ee, error: Element not allowed: 
cmp-field@http://java.sun.com/xml/ns/j2ee
in element entity@http://java.sun.com/xml/ns/j2ee, error: Element not 
allowed:
cmp-field@http://java.sun.com/xml/ns/j2ee in element 
entity@http://java.sun.com/
xml/ns/j2ee, error: Element not allowed: 
cmp-field@http://java.sun.com/xml/ns/j2
ee in element entity@http://java.sun.com/xml/ns/j2ee, error: Element not 
allowed
: cmp-field@http://java.sun.com/xml/ns/j2ee in element 
entity@http://java.sun.co
m/xml/ns/j2ee, error: Element not allowed: 
primkey-field@http://java.sun.com/xml
/ns/j2ee in element entity@http://java.sun.com/xml/ns/j2ee, error: Element 
not a
llowed: resource-ref@http://java.sun.com/xml/ns/j2ee in element 
entity@http://ja
va.sun.com/xml/ns/j2ee, error: Expected element(s) in element 
entity@http://java
.sun.com/xml/ns/j2ee, error: Element not allowed: 
reentrant@http://java.sun.com/
xml/ns/j2ee in element entity@http://java.sun.com/xml/ns/j2ee, error: String 
'be
an' is not a valid enumerated value for persistence-typeType in namespace 
http:/
/java.sun.com/xml/ns/j2ee, error: Element not allowed: 
primkey-field@http://java
.sun.com/xml/ns/j2ee in element entity@http://java.sun.com/xml/ns/j2ee, 
error: E
lement not allowed: resource-ref@http://java.sun.com/xml/ns/j2ee in element 
enti
ty@http://java.sun.com/xml/ns/j2ee, error: Expected element(s) in element 
entity
@http://java.sun.com/xml/ns/j2ee]
Descriptor: <ejb-jar 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://j
ava.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1" 
xmlns:xsi="http://www.w3.
org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee">
  <enterprise-beans>
    <entity>
      <ejb-name>CabinEJB</ejb-name>
      <home>com.titan.cabin.CabinHomeRemote</home>
      <remote>com.titan.cabin.CabinRemote</remote>
      <ejb-class>com.titan.cabin.CabinBean</ejb-class>
      <reentrant>False</reentrant>
      <persistence-type>container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      <cmp-field>
        <field-name>id</field-name>
      </cmp-field>
      <cmp-field>
        <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
        <field-name>deckLevel</field-name>
      </cmp-field>
      <cmp-field>
        <field-name>shipId</field-name>
      </cmp-field>
      <cmp-field>
        <field-name>bedCount</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>
      <resource-ref>
        <res-ref-name>jdbc/titanDB</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>
    </entity>
    <entity>
      <description>This bean represents a cruise ship.</description>
      <ejb-name>ShipEJB</ejb-name>
      <home>com.titan.ship.ShipHomeRemote</home>
      <remote>com.titan.ship.ShipRemote</remote>
      <ejb-class>com.titan.ship.ShipBean</ejb-class>
      <reentrant>False</reentrant>
      <persistence-type>bean</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      <primkey-field>id</primkey-field>
      <resource-ref>
        <description>DataSource for the Titan database</description>
        <res-ref-name>jdbc/titanDB</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>
    </entity>
    <session>
      <ejb-name>TravelAgentEJB</ejb-name>
      <home>com.titan.travelagent.TravelAgentHomeRemote</home>
      <remote>com.titan.travelagent.TravelAgentRemote</remote>
      <ejb-class>com.titan.travelagent.TravelAgentBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
        <ejb-ref-name>ejb/titan/CabinEJB</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>com.titan.cabin.CabinHomeRemote</home>
        <remote>com.titan.cabin.CabinRemote</remote>
        <ejb-link>CabinEJB</ejb-link>
      </ejb-ref>
    </session>
  </enterprise-beans>
  <assembly-descriptor>
    <security-role>
      <description>This role represents everyone who is allowed full access
                to te CabinEJB.</description>
      <role-name>everyone</role-name>
    </security-role>
    <method-permission>
      <role-name>everyone</role-name>
      <method>
        <ejb-name>CabinEJB</ejb-name>
        <method-name>*</method-name>
      </method>
      <method>
        <ejb-name>TravelAgentEJB</ejb-name>
        <method-name>*</method-name>
      </method>
    </method-permission>
    <method-permission>
      <role-name>everyone</role-name>
      <method>
        <ejb-name>ShipEJB</ejb-name>
        <method-name>*</method-name>
      </method>
    </method-permission>
    <container-transaction>
      <method>
        <ejb-name>CabinEJB</ejb-name>
        <method-name>*</method-name>
      </method>
      <method>
        <ejb-name>ShipEJB</ejb-name>
        <method-name>*</method-name>
      </method>
      <method>
        <ejb-name>TravelAgentEJB</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>

/---------------open EJB jar.xml----------
<?xml version="1.0"?>

<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
    <ejb-deployment ejb-name="CabinEJB" deployment-id="titan/CabinEJB" 
container-id="Default CMP Container">
        <resource-link res-ref-name="jdbc/titanDB" res-id="Default JDBC 
Database"/>
    </ejb-deployment>
    <ejb-deployment ejb-name="ShipEJB" deployment-id="titan/ShipEJB" 
container-id="Default BMP Container">
        <resource-link res-ref-name="jdbc/titanDB" res-id="Default JDBC 
Database"/>
    </ejb-deployment>
    <ejb-deployment ejb-name="TravelAgentEJB" 
deployment-id="titan/TravelAgentEJB" container-id="Default Stateless 
Container"/>
</openejb-jar>

_________________________________________________________________
Acepta el reto MSN Premium: Correos más divertidos con fotos y textos 
increíbles en MSN Premium. Descárgalo y pruébalo 2 meses gratis. 
http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_correosmasdivertidos


Mime
View raw message