Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 61328 invoked from network); 26 Oct 2006 11:19:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 11:19:45 -0000 Received: (qmail 83004 invoked by uid 500); 26 Oct 2006 11:19:49 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 82964 invoked by uid 500); 26 Oct 2006 11:19:49 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 82936 invoked by uid 99); 26 Oct 2006 11:19:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2006 04:19:49 -0700 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_HAS_MIXED_NUMS,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of c1vamsi1c@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2006 04:19:36 -0700 Received: by nf-out-0910.google.com with SMTP id p77so949031nfc for ; Thu, 26 Oct 2006 04:19:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=jjcInl5mVbG0w5hOh+1pAU7u2JOnFikGtjlsO68Q7opqGoivd29iudXnuYcQo+gvcM0UwIRAOI/Qgtc/DJAvILCne+4V/qj/LLfNlcKREUb7vAj++yYTXkrcondp0dleL9Dcs5CrV4pFOaonKejPo354zFPu+Fy/FJbKABmBZT0= Received: by 10.49.21.8 with SMTP id y8mr5299807nfi; Thu, 26 Oct 2006 04:19:13 -0700 (PDT) Received: by 10.49.11.12 with HTTP; Thu, 26 Oct 2006 04:19:13 -0700 (PDT) Message-ID: <22d56c4d0610260419i77055129y7b1b78e5240c92df@mail.gmail.com> Date: Thu, 26 Oct 2006 16:49:13 +0530 From: "Vamsavardhana Reddy" To: user@geronimo.apache.org Subject: Re: Error deploying EAR because of DataSource In-Reply-To: <7008735.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6868_25636712.1161861553094" References: <7008354.post@talk.nabble.com> <22d56c4d0610260312q58cdb045xd536edd0f5734936@mail.gmail.com> <7008735.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_6868_25636712.1161861553094 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 wrote: > > > Here's the relevant web.xml part: > > > > 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"> > ... > > jdbc/AuchanPromoDS > javax.sql.DataSource > Container > Shareable > > ... > > > The lookup code is done by the Spring framework through the following tag: > > 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 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: > >> > >> > >> >> "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" > >> "http://java.sun.com/dtd/application_1_3.dtd"> > >> > >> promo-ear > >> > >> > >> promo-web-2.0.0-SNAPSHOT.war > >> /promo > >> > >> > >> > >> promo-server-2.0.0-SNAPSHOT.jar > >> > >> > >> > >> The WAR contains a web.xml with a reference to a data source and the > >> following geronimo-web.xml file: > >> > >> > >> > >> >> xmlns:naming="http://geronimo.apache.org/xml/ns/naming"> > >> > >> > >> promo-war > >> > >> > >> > >> console.dbpool > >> PromoDS > >> > >> > >> > >> > >> /promo > >> > >> > >> jdbc/PromoDS > >> PromoDS > >> > >> > >> > >> 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. > > ------=_Part_6868_25636712.1161861553094 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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.


------=_Part_6868_25636712.1161861553094--