geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivanrc <iri...@indra.es>
Subject Re: EJB CMP + Database Pools config
Date Wed, 24 Oct 2007 15:33:32 GMT

I´ve added this lines and now I obtain this exception. I use
geronimo-tomcat6-jee5-2.0.1 version. Do you know what is the problem?


org.apache.geronimo.common.DeploymentException: Unable to resolve resource
reference 'gsePool' (Could not auto-map to resource.  Try adding a
resource-ref mapping to your Geronimo deployment plan.
Search conducted in current module and dependencies:
[ALL: org.apache.geronimo.configs/openejb//car]
[ALL: org.apache.geronimo.configs/system-database//car]
[ALL: org.apache.geronimo.configs/tomcat6//car]
[ALL: org.apache.openejb/openejb-core//jar]
[ALL: org.apache.geronimo.modules/geronimo-openejb//jar]
[ALL: org.apache.geronimo.configs/openjpa//car]
[ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
[ALL: org.apache.geronimo.configs/axis//car]
[ALL: org.apache.geronimo.configs/axis2//car]
)
org.apache.geronimo.common.DeploymentException:
org.apache.geronimo.common.DeploymentException: Unable to resolve resource
reference 'gsePool' (Could not auto-map to resource.  Try adding a
resource-ref mapping to your Geronimo deployment plan.
Search conducted in current module and dependencies:
[ALL: org.apache.geronimo.configs/openejb//car]
[ALL: org.apache.geronimo.configs/system-database//car]
[ALL: org.apache.geronimo.configs/tomcat6//car]
[ALL: org.apache.openejb/openejb-core//jar]
[ALL: org.apache.geronimo.modules/geronimo-openejb//jar]
[ALL: org.apache.geronimo.configs/openjpa//car]
[ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
[ALL: org.apache.geronimo.configs/axis//car]
[ALL: org.apache.geronimo.configs/axis2//car]





vhnguy2 wrote:
> 
> On 10/24/07, ivanrc <iriano@indra.es> wrote:
>>
>>
>> Hi,
>>
>> I want to deploy EJB CMP. The EJB is deployed well, but I obtain by logs
>> this lines about dababase pool that I want to use:
>>
>> 10:06:58,154 WARN  [ResourceRefBuilder] Failed to build reference to
>> resource reference [jdbc/gsePool] defined in plan file, reason -
>> corresponding entry in deployment descriptor missing.
>>
>> In openejb-jar.xml,  this is the Entity tag´s resource-ref:
>>
>> <resource-ref>
>>         <ref-name>jdbc/gsePool</ref-name>
>>         <resource-link>gsePool</resource-link>
>> </resource-ref>
>>
>> I can connect remotedly to EJB but I don´t obtain elements from DB.
>>
>> Could anyone help me?.Thanks
>>
>>
>>
>>
>> OPENEJB-JAR.XML
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <openejb-jar
>>                 xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
>>                 xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
>>                 xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
>>                
>> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
>>                 xmlns:sys="
>> http://geronimo.apache.org/xml/ns/deployment-1.2">
>>
>>         <sys:environment>
>>                 <sys:moduleId>
>>                         <sys:groupId>default</sys:groupId>
>>                         <sys:artifactId>EstadoAlarmaBean</sys:artifactId>
>>                         <sys:version>1.31</sys:version>
>>                         <sys:type>jar</sys:type>
>>                 </sys:moduleId>
>>         </sys:environment>
>>    <enterprise-beans>
>>         <entity>
>>                 <ejb-name>EstadoAlarmaBean</ejb-name>
>>                 <jndi-name>EstadoAlarma</jndi-name>
>>         <table-name>CRC_GSE_ALAR_ESTADO_ALARMA</table-name>
>>                 <cmp-field-mapping>
>>                         <cmp-field-name>estadoAlarma</cmp-field-name>
>>                         <table-column>ESTADO_ALARMA_TP</table-column>
>>                 </cmp-field-mapping>
>>                 <cmp-field-mapping>
>>                         <cmp-field-name>estadoAlarmaGIA</cmp-field-name>
>>                         <table-column>ESTADO_ALARMA_GIA_NU</table-column>
>>                 </cmp-field-mapping>
>>                 <resource-ref>
>>             <ref-name>jdbc/gsePool</ref-name>
>>             <resource-link>gsePool</resource-link>
>>         </resource-ref>
>>         </entity>
>>   </enterprise-beans>
>> </openejb-jar>
>>
>> EJB-JAR-XML
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
>>
>>    <enterprise-beans>
>>       <entity>
>>             <display-name></display-name>
>>             <ejb-name>EstadoAlarmaBean</ejb-name>
>>
>> <home>com.indra.gse.server.ejb.estadoalarma.EstadoAlarmaHome</home>
>>
>> <remote>com.indra.gse.server.ejb.estadoalarma.EstadoAlarma</remote>
>>
>> <local-home>com.indra.gse.server.ejb.estadoalarma.EstadoAlarmaLocalHome
>> </local-home>
>>
>> <local>com.indra.gse.server.ejb.estadoalarma.EstadoAlarmaLocal</local>
>>
>> <ejb-class>com.indra.gse.server.ejb.estadoalarma.EstadoAlarmaBean
>> </ejb-class>
>>             <persistence-type>Container</persistence-type>
>>             <prim-key-class>java.lang.String</prim-key-class>
>>             <reentrant>False</reentrant>
>>             <cmp-version>2.x</cmp-version>
>>             <abstract-schema-name>EstadoAlarmaBean</abstract-schema-name>
>>             <cmp-field>
>>                 <field-name>estadoAlarma</field-name>
>>             </cmp-field>
>>             <cmp-field>
>>                 <field-name>estadoAlarmaGIA</field-name>
>>             </cmp-field>
>>             <primkey-field>estadoAlarma</primkey-field>
>>             <query>
>>                 <query-method>
>>                     <method-name>findAll</method-name>
>>                     <method-params/>
>>                 </query-method>
>>                 <ejb-ql>SELECT OBJECT(o) FROM EstadoAlarmaBean as o ORDER
>> BY
>> o.estadoAlarma</ejb-ql>
>>             </query>
> 
> 
> Try adding this to the <entity> element in your ejb-jar.xml.
> 
>          <resource-ref>
>             <!-- JNDI name -->
>             <res-ref-name>gsePool</res-ref-name>
>             <!-- Object type expected back from JNDI lookup -->
>             <res-type>javax.sql.DataSource</res-type>
>             <res-auth>Container</res-auth>
>          </resource-ref>
> 
> I have not tested this.
> 
> HTH,
> Viet
> 
>>         </entity>
>>    </enterprise-beans>
>> </ejb-jar>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/EJB-CMP-%2B-Database-Pools-config-tf4682861s134.html#a13381206
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/EJB-CMP-%2B-Database-Pool-config-tf4682861s134.html#a13384951
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message