I can't figure out how you got that error from the xml you show. Can
you send the stack trace?
Also, I think you can use simpler resource-refs:
<resource-ref>
<ref-name>jdbc/titanDB</ref-name>
<resource-link>DefaultDatasource</resource-link>
</resource-ref>
and
<cmp-connection-factory>
<resource-link>DefaultDatasource</resource-link>
<cmp-connection-factory>
thanks
david jencks
On Apr 14, 2005, at 2:45 AM, Katia Aresti Gonzalez wrote:
Hello Gianny!!!!
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.
<?xml version="1.0"?>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
configId="GeronimoTestEJB"
parentId="org/apache/geronimo/Server">
<cmp-connection-factory>
<application>null</application>
<module>org/apache/geronimo/DefaultDatabase</module>
<name>DefaultDatasource</name>
</cmp-connection-factory>
<enterprise-beans>
<entity>
<ejb-name>CabinEJB</ejb-name>
<table-name>CabinTable</table-name>
<cmp-field-mapping>
<cmp-field-name>id</cmp-field-name>
<table-column>col_id</table-column>
</cmp-field-mapping>
<cmp-field-mapping>
<cmp-field-name>name</cmp-field-name>
<table-column>col_name</table-column>
</cmp-field-mapping>
<cmp-field-mapping>
<cmp-field-name>deckLevel</cmp-field-name>
<table-column>col_deckLevel</table-column>
</cmp-field-mapping>
<cmp-field-mapping>
<cmp-field-name>shipId</cmp-field-name>
<table-column>col_shipId</table-column>
</cmp-field-mapping>
<cmp-field-mapping>
<cmp-field-name>bedCount</cmp-field-name>
<table-column>col_bedCount</table-column>
</cmp-field-mapping>
<resource-ref>
<ref-name>jdbc/titanDB</ref-name>
<application>null</application>
<module>org/apache/geronimo/DefaultDatabase</module>
<name>DefaultDatasource</name>
</resource-ref>
</entity>
<entity>
<ejb-name>ShipEJB</ejb-name>
</entity>
<session>
<ejb-name>TravelAgentEJB</ejb-name>
</session>
</enterprise-beans>
</openejb-jar>
Error---->
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:
Unknown or amb
iguous resource name query:
geronimo.server:J2EEServer=geronimo,J2EEApplication=
null,j2eeType=JCAManagedConnectionFactory,name=jdbc/titanDB,* match
count: 0
Unknown or ambiguous resource name query:
geronimo.server:J2EEServer=ger
onimo,J2EEApplication=null,j2eeType=JCAManagedConnectionFactory,name=jd
bc/titanD
B,* match count: 0
Thanks a los for four help!!!!!!!!!!!!!!!!!!!!!!!!!!!
Katia
>From: Gianny Damour <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: Deployment fail at persistent EJB
>Date: Wed, 13 Apr 2005 09:27:08 +1000
>
>Katia,
>
>The last version of Geronimo, built from source, supports CMP.
>
>Also, could you please provide the error message that you get during
>the deployment process?
>
>I comment your openejb-jar.xml deployment descriptor further down.
>
>Thanks,
>Gianny
>
>On 12/04/2005 8:20 PM, Katia Aresti Gonzalez wrote:
>
>>Hello again David!!!!
>>
>>The problems still go on xD. The openejb-jar.xml is wrong, and I
>>cant find any reference of an xml file to look at and compare. I
>>know im doing somethig really bad :-).
>>
>>Here is the openejb-jar.xml of the ejb-jar.xml. Can you help me
>>again please? thank you!!!!!
>>
>>Katia
>>
>>
>><?xml version="1.0"?>
>>
>><openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
>>configId="GeronimoTestEJB"
>>parentId="org/apache/geronimo/Server">
>>
>><cmp-connection-factory>
>> <application>null</application>
>> <module>org/apache/geronimo/DefaultDatabase</module>
>> <name>DefaultDatasource</name>
>></cmp-connection-factory>
>>
>OK.
>
>><enterprise-beans>
>><entity>
>> <ejb-name>CabinEJB</ejb-name>
>> <jndi-name>CabinEJB</jndi-name>
>>
>You do not need to specify a jndi-name. This construct is only used
>to specify a global JNDI name, which you do not need in your case.
>
>You need to specifiy a mapping table for this CMP. This is something
>like:
> <table-name>MyTableName</table-name>
>
>Furthermore, you also need to specify a mapping for each of the
>persistent fields identified in your ejb-jar.xml DD. This is
>something like:
> <cmp-field-mapping>
> <cmp-field-name>id</cmp-field-name>
> <table-column>col_id</table-column>
> </cmp-field-mapping>
>
>> <resource-ref>
>> <ref-name>jdbc/titanDB</ref-name>
>> </resource-ref>
>>
>This is now enough information. You need to map a resource reference
>to this resource name. This is something like:
> <application>null</application>
> <module>org/apache/geronimo/DefaultDatabase</module>
> <name>DefaultDatasource</name>
>Such a configuration references the default datasource of Geronimo,
>which is by the way the datasource used under the cover by the CMP
>engine to interact with the database.
>
>Please have a look to this file:
>modules/naming-builder/src/schema/geronimo-naming.xsd and especially
>to the resource-refType complex type to understand how mapping
>works.
>
>></entity>
>>
>><entity>
>> <ejb-name>ShipEJB</ejb-name>
>> <jndi-name>ShipEJB</jndi-name>
>>
>Same as above.
>
>> <resource-ref>
>> <ref-name>jdbc/titanDB</ref-name>
>>
>Same as above.
>
>> </resource-ref>
>></entity>
>>
>><session>
>> <ejb-name>TravelAgentEJB</ejb-name>
>> <jndi-name>TravelAgentEJB</jndi-name>
>> </session>
>></enterprise-beans>
>> </openejb-jar>
>>
Recibe ofertas de empleo adaptadas a tu perfil. Introduce tu CV en
MSN Empleo.