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 Thu, 14 Apr 2005 09:45:48 GMT
<html><div style='background-color:'><DIV class=RTE>
<P>Hello Gianny!!!!</P>
<P>I did what you said. This is my new openejb-jar.xml. I said somethig wrong, ShipEJB
is a BMP, is this supported? Anyway, my problem is to fix cmp, because its what i realy need
now :-). I paste the error deploying just after the descriptor.</P>
<P>&lt;?xml version="1.0"?&gt;</P>
<P>&lt;openejb-jar xmlns="<A href="http://www.openejb.org/xml/ns/openejb-jar">http://www.openejb.org/xml/ns/openejb-jar</A>"
<BR>configId="GeronimoTestEJB" <BR>parentId="org/apache/geronimo/Server"&gt;</P>
<P>&lt;cmp-connection-factory&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;application&gt;null&lt;/application&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;module&gt;org/apache/geronimo/DefaultDatabase&lt;/module&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;name&gt;DefaultDatasource&lt;/name&gt;<BR>&lt;/cmp-connection-factory&gt;</P>
<P>&lt;enterprise-beans&gt; <BR>&lt;entity&gt;<BR>&nbsp;&nbsp;
<BR>&nbsp;&nbsp; &lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;<BR>&nbsp;&nbsp;
&lt;table-name&gt;CabinTable&lt;/table-name&gt; <BR>&nbsp;&nbsp;
<BR>&nbsp;&nbsp; &nbsp;&lt;cmp-field-mapping&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&lt;cmp-field-name&gt;id&lt;/cmp-field-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&lt;table-column&gt;col_id&lt;/table-column&gt; <BR>&nbsp;&lt;/cmp-field-mapping&gt;
<BR>&nbsp;<BR>&nbsp;&lt;cmp-field-mapping&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;cmp-field-name&gt;name&lt;/cmp-field-name&gt;<BR>&nbsp;&nbsp;&lt;table-column&gt;col_name&lt;/table-column&gt;
<BR>&nbsp;&lt;/cmp-field-mapping&gt; <BR>&nbsp;<BR>&nbsp;&lt;cmp-field-mapping&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&lt;cmp-field-name&gt;deckLevel&lt;/cmp-field-name&gt;<BR>&nbsp;&nbsp;&lt;table-column&gt;col_deckLevel&lt;/table-column&gt;
<BR>&nbsp;&lt;/cmp-field-mapping&gt; <BR>&nbsp;<BR>&nbsp;&lt;cmp-field-mapping&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;cmp-field-name&gt;shipId&lt;/cmp-field-name&gt;<BR>&nbsp;&nbsp;&lt;table-column&gt;col_shipId&lt;/table-column&gt;
<BR>&nbsp;&lt;/cmp-field-mapping&gt; <BR>&nbsp;<BR>&nbsp;&lt;cmp-field-mapping&gt;
<BR>&nbsp;&nbsp;&lt;cmp-field-name&gt;bedCount&lt;/cmp-field-name&gt;<BR>&nbsp;&nbsp;&lt;table-column&gt;col_bedCount&lt;/table-column&gt;
<BR>&nbsp;&nbsp;&nbsp; &nbsp;&lt;/cmp-field-mapping&gt; <BR>&nbsp;<BR>&nbsp;&lt;resource-ref&gt;
<BR>&nbsp;&nbsp;&nbsp; &lt;ref-name&gt;jdbc/titanDB&lt;/ref-name&gt;
<BR>&nbsp;&nbsp;&lt;application&gt;null&lt;/application&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&lt;module&gt;org/apache/geronimo/DefaultDatabase&lt;/module&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&lt;name&gt;DefaultDatasource&lt;/name&gt;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;/resource-ref&gt;
<BR>&nbsp;&nbsp; <BR>&lt;/entity&gt;&nbsp; </P>
<P>&lt;entity&gt;<BR>&nbsp;&nbsp; &lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;<BR>&lt;/entity&gt;
</P>
<P>&lt;session&gt;<BR>&nbsp;&nbsp; &lt;ejb-name&gt;TravelAgentEJB&lt;/ejb-name&gt;<BR>&lt;/session&gt;
</P>
<P>&lt;/enterprise-beans&gt; <BR>&nbsp;&nbsp;&nbsp; <BR>&lt;/openejb-jar&gt;
<BR></P>
<P>Error----&gt;</P>
<P>C:\gero&gt;java -jar bin/deployer.jar --user system --password manager deploy
d:/cm<BR>p/build/dist/prueba-ejbs.jar<BR>Deployment failed<BR>&nbsp;
Server reports: org.apache.geronimo.common.DeploymentException: Unknown or amb<BR>iguous
resource name query: geronimo.server:J2EEServer=geronimo,J2EEApplication=<BR>null,j2eeType=JCAManagedConnectionFactory,name=jdbc/titanDB,*
match count: 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Unknown or ambiguous resource name query: geronimo.server:J2EEServer=ger<BR>onimo,J2EEApplication=null,j2eeType=JCAManagedConnectionFactory,name=jdbc/titanD<BR>B,*
match count: 0</P>
<P>&nbsp;</P>
<P>Thanks a los for four help!!!!!!!!!!!!!!!!!!!!!!!!!!!</P>
<P>Katia</P>
<P><BR>&nbsp;</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>Recibe ofertas de empleo
adaptadas a tu perfil. <a href="http://g.msn.com/8HMBESES/2752??PS=47575" target="_top">Introduce
tu CV en MSN Empleo.</a> </html>


Mime
View raw message