Yes actually that was a mistake in my post, I forgot to remove all references
to my current client :) All names are correct in my code, all of them being
jdbc/<insertClientNameHere>PromoDS.
Any other idea?
Vamsavardhana Reddy-2 wrote:
>
> One problem I can see straight away is that your lookup code is not using
> the res-ref-name from web.xml and geronimo-web.xml is not linking the
> res-ref-name in web.xml with the actual resource. To overcome this,
> change
> "jdbc/AuchanPromoDS" in web.xml to "jdbc/PromoDS" . Regarding the
> resource-link, if you have used "jdbc/PromoDS" as the pool name, change
> the
> resource-link to "jdbc/PromoDS".
>
> Vamsi
> On 10/26/06, Guillaume Bilodeau <gbilodeau@yahoo.com> wrote:
>>
>>
>> Here's the relevant web.xml part:
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>>
>> <web-app 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/web-app_2_4.xsd"
>> version="2.4">
>> ...
>> <resource-ref>
>> <res-ref-name>jdbc/AuchanPromoDS</res-ref-name>
>> <res-type>javax.sql.DataSource</res-type>
>> <res-auth>Container</res-auth>
>> <res-sharing-scope>Shareable</res-sharing-scope>
>> </resource-ref>
>> ...
>> </web-app>
>>
>> The lookup code is done by the Spring framework through the following
>> tag:
>>
>> <jee:jndi-lookup id="mainDataSource"
>> jndi-name="java:comp/env/jdbc/PromoDS"
>> proxy-interface="javax.sql.DataSource"
>> lookup-on-startup="false" />
>>
>> But it doesn't even get to the lookup part :)
>>
>> Thanks!
>> GB
>>
>>
>>
>> Vamsavardhana Reddy-2 wrote:
>> >
>> > Please post your web.xml and also the lookup code.
>> >
>> > Vamsi
>> >
>> > On 10/26/06, Guillaume Bilodeau <gbilodeau@yahoo.com> wrote:
>> >>
>> >>
>> >> Hi guys,
>> >>
>> >> This is a different problem than the one I posted back in July,
>> hopefully
>> >> this one will be easier to solve :)
>> >>
>> >> I'm back with my EAR, containing an EJB module (JAR), a web
>> application
>> >> (WAR) and their relevant dependencies in its root. The EAR contains
>> the
>> >> following application.xml file:
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <!DOCTYPE application PUBLIC
>> >> "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
>> >> "http://java.sun.com/dtd/application_1_3.dtd">
>> >> <application>
>> >> <display-name>promo-ear</display-name>
>> >> <module>
>> >> <web>
>> >> <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
>> >> <context-root>/promo</context-root>
>> >> </web>
>> >> </module>
>> >> <module>
>> >> <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
>> >> </module>
>> >> </application>
>> >>
>> >> The WAR contains a web.xml with a reference to a data source and the
>> >> following geronimo-web.xml file:
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >>
>> >> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>> >> xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
>> >> <environment>
>> >> <moduleId>
>> >> <artifactId>promo-war</artifactId>
>> >> </moduleId>
>> >> <dependencies>
>> >> <dependency>
>> >> <groupId>console.dbpool</groupId>
>> >> <artifactId>PromoDS</artifactId>
>> >> </dependency>
>> >> </dependencies>
>> >> </environment>
>> >>
>> >> <context-root>/promo</context-root>
>> >>
>> >> <naming:resource-ref>
>> >> <naming:ref-name>jdbc/PromoDS</naming:ref-name>
>> >> <naming:resource-link>PromoDS</naming:resource-link>
>> >> </naming:resource-ref>
>> >> </web-app>
>> >>
>> >> I have already configured my database pool with the same name, it's up
>> >> and
>> >> running and correctly listed in the J2EE connectors.
>> >>
>> >> When I try to deploy this EAR, I get the following error:
>> >>
>> >> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
>> >> resource
>> >> 'PromoDS'. Perhaps it has not yet been configured, or your
>> application
>> >> does
>> >> not have a dependency declared for that resource module?)
>> >> org.apache.geronimo.common.DeploymentException: Unable to resolve
>> >> resource
>> >> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'. Perhaps
>> it
>> >> has
>> >> not yet been configured, or your application does not have a
>> dependency
>> >> declared for that resource module?)
>> >>
>> >> Any idea what the problem here?
>> >>
>> >> Thanks a lot!
>> >> GB
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
>> >> Sent from the Apache Geronimo - Users mailing list archive at
>> Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008735
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7009322
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
|