geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Katia Aresti Gonzalez" <kaare...@hotmail.com>
Subject Re: Deployment fail at persistent EJB
Date Tue, 12 Apr 2005 23:50:32 GMT
<html><div style='background-color:'><DIV class=RTE>
<P>Hello Gianny!!</P>
<P>Im going to try what you say tomorrow morning (here is now 2:00 am, Bilbao :-) ),
and i will tell you, and copy the error in the answer message.</P>
<P>Thank you very much!!!!!!!!!!!</P>
<P>Katia<BR><BR></P></DIV>
<DIV></DIV>&gt;From: Gianny Damour &lt;gianny.damour@optusnet.com.au&gt;
<DIV></DIV>&gt;Reply-To: user@geronimo.apache.org
<DIV></DIV>&gt;To: user@geronimo.apache.org
<DIV></DIV>&gt;Subject: Re: Deployment fail at persistent EJB
<DIV></DIV>&gt;Date: Wed, 13 Apr 2005 09:27:08 +1000
<DIV></DIV>&gt;
<DIV></DIV>&gt;Katia,
<DIV></DIV>&gt;
<DIV></DIV>&gt;The last version of Geronimo, built from source, supports CMP.
<DIV></DIV>&gt;
<DIV></DIV>&gt;Also, could you please provide the error message that you get
during
<DIV></DIV>&gt;the deployment process?
<DIV></DIV>&gt;
<DIV></DIV>&gt;I comment your openejb-jar.xml deployment descriptor further
down.
<DIV></DIV>&gt;
<DIV></DIV>&gt;Thanks,
<DIV></DIV>&gt;Gianny
<DIV></DIV>&gt;
<DIV></DIV>&gt;On 12/04/2005 8:20 PM, Katia Aresti Gonzalez wrote:
<DIV></DIV>&gt;
<DIV></DIV>&gt;&gt;Hello again David!!!!
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;The problems still go on xD. The openejb-jar.xml is
wrong, and I
<DIV></DIV>&gt;&gt;cant find any reference of an xml file to look at and
compare. I
<DIV></DIV>&gt;&gt;know im doing somethig really bad :-).
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;Here is the openejb-jar.xml of the ejb-jar.xml. Can
you help me
<DIV></DIV>&gt;&gt;again please? thank you!!!!!
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;Katia
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;&lt;?xml version="1.0"?&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;&lt;openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
<DIV></DIV>&gt;&gt;configId="GeronimoTestEJB"
<DIV></DIV>&gt;&gt;parentId="org/apache/geronimo/Server"&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;&lt;cmp-connection-factory&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;application&gt;null&lt;/application&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;module&gt;org/apache/geronimo/DefaultDatabase&lt;/module&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;name&gt;DefaultDatasource&lt;/name&gt;
<DIV></DIV>&gt;&gt;&lt;/cmp-connection-factory&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;OK.
<DIV></DIV>&gt;
<DIV></DIV>&gt;&gt;&lt;enterprise-beans&gt;
<DIV></DIV>&gt;&gt;&lt;entity&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;jndi-name&gt;CabinEJB&lt;/jndi-name&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;You do not need to specify a jndi-name. This construct is only
used
<DIV></DIV>&gt;to specify a global JNDI name, which you do not need in your
case.
<DIV></DIV>&gt;
<DIV></DIV>&gt;You need to specifiy a mapping table for this CMP. This is
something
<DIV></DIV>&gt;like:
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;table-name&gt;MyTableName&lt;/table-name&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;Furthermore, you also need to specify a mapping for each of
the
<DIV></DIV>&gt;persistent fields identified in your ejb-jar.xml DD. This is
<DIV></DIV>&gt;something like:
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cmp-field-mapping&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cmp-field-name&gt;id&lt;/cmp-field-name&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;table-column&gt;col_id&lt;/table-column&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/cmp-field-mapping&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;resource-ref&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ref-name&gt;jdbc/titanDB&lt;/ref-name&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/resource-ref&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;This is now enough information. You need to map a resource
reference
<DIV></DIV>&gt;to this resource name. This is something like:
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;application&gt;null&lt;/application&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;module&gt;org/apache/geronimo/DefaultDatabase&lt;/module&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;DefaultDatasource&lt;/name&gt;
<DIV></DIV>&gt;Such a configuration references the default datasource of Geronimo,
<DIV></DIV>&gt;which is by the way the datasource used under the cover by
the CMP
<DIV></DIV>&gt;engine to interact with the database.
<DIV></DIV>&gt;
<DIV></DIV>&gt;Please have a look to this file:
<DIV></DIV>&gt;modules/naming-builder/src/schema/geronimo-naming.xsd and especially
<DIV></DIV>&gt;to the resource-refType complex type to understand how mapping
<DIV></DIV>&gt;works.
<DIV></DIV>&gt;
<DIV></DIV>&gt;&gt;&lt;/entity&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;&lt;entity&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;jndi-name&gt;ShipEJB&lt;/jndi-name&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;Same as above.
<DIV></DIV>&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;resource-ref&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ref-name&gt;jdbc/titanDB&lt;/ref-name&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;Same as above.
<DIV></DIV>&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/resource-ref&gt;
<DIV></DIV>&gt;&gt;&lt;/entity&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;&lt;session&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ejb-name&gt;TravelAgentEJB&lt;/ejb-name&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;jndi-name&gt;TravelAgentEJB&lt;/jndi-name&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp; &lt;/session&gt;
<DIV></DIV>&gt;&gt;&lt;/enterprise-beans&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/openejb-jar&gt;
<DIV></DIV>&gt;&gt;
<DIV></DIV></div><br clear=all><hr>Busca a la vez en Internet,
en directorios, en enciclopedias...  <a href="http://g.msn.com/8HMBESES/2740??PS=47575"
target="_top">Atrévete con el nuevo MSN Search</a> </html>


Mime
View raw message