Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 1527 invoked from network); 30 Oct 2006 09:57:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2006 09:57:37 -0000 Received: (qmail 60836 invoked by uid 500); 30 Oct 2006 09:57:44 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 60810 invoked by uid 500); 30 Oct 2006 09:57:44 -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 60799 invoked by uid 99); 30 Oct 2006 09:57:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Oct 2006 01:57:44 -0800 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Oct 2006 01:57:29 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GeTrB-0002xJ-Ro for user@geronimo.apache.org; Mon, 30 Oct 2006 01:55:01 -0800 Message-ID: <7071620.post@talk.nabble.com> Date: Mon, 30 Oct 2006 01:55:01 -0800 (PST) From: Guillaume Bilodeau To: user@geronimo.apache.org Subject: Re: Error deploying EAR because of DataSource In-Reply-To: <467F8E9E-22BE-459F-AEAF-EE1DEAB667C9@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: gbilodeau@yahoo.com References: <7008354.post@talk.nabble.com> <22d56c4d0610260312q58cdb045xd536edd0f5734936@mail.gmail.com> <7008735.post@talk.nabble.com> <22d56c4d0610260419i77055129y7b1b78e5240c92df@mail.gmail.com> <7009322.post@talk.nabble.com> <74e15baa0610260743v56797ccdo91745935ef2affde@mail.gmail.com> <7024975.post@talk.nabble.com> <74e15baa0610270703i678d560eybfa989a50f8168b5@mail.gmail.com> <7070273.post@talk.nabble.com> <467F8E9E-22BE-459F-AEAF-EE1DEAB667C9@yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org That's probably because I've taken the header from Aaron's book (section 12.2) and the body from this page (http://cwiki.apache.org/confluence/display/OPENEJB/Details+on+openejb-jar) since I couldn't find anything related in the book. Following your suggestion, I've also tried the following openejb-jar.xml: promo-server console.dbpool AuchanPromoDS RemoteTask RemoteTask jdbc/AuchanPromoDS AuchanPromoDS CloseStagesTask CloseStagesTask jdbc/AuchanPromoDS AuchanPromoDS CreatePitpTask CreatePitpTask jdbc/AuchanPromoDS AuchanPromoDS CreateNotificationsTask CreateNotificationsTask jdbc/AuchanPromoDS AuchanPromoDS But still no success. I'm sorry to take up your time like this guys, but it looks like the material I'm finding in the sample apps and the book aren't working. Any pointer would be greatly appreciated! Thanks a lot once more, GB David Jencks wrote: > > that doesn't look like any openejb-jar.xml I've ever seen. The > schema for it ought to be in "schema" in your geronimo server and the > version should be 2.1 but I think it may have got left out of the > geronimo-1.1.1 distributions. You can see a copy here: > http://fisheye.codehaus.org/browse/~raw,r=2675/openejb/branches/v2_1/ > openejb2/modules/openejb-builder/src/schema/openejb-jar-2.1.xsd > > I think Aaron's book has some examples of openejb-jar.xml. > > You'll need a dependency element inside an environment element like > you have in the war plan. When you get the dependency in the openejb- > jar.xml you can remove it from the war. > > hope this helps > david jencks > > > > On Oct 29, 2006, at 11:47 PM, Guillaume Bilodeau wrote: > >> >> Back from a Java-free weekend :) >> >> You might be on to something with the EJB module dependency to the >> data >> source. I did forget to mention that my EJBs have a dependency on >> the data >> source of the same name, declared in my ejb-jar.xml. From reading >> some >> documentation it seems that I need to declare this in an openejb- >> jar.xml >> file. I've tried various combinations but still to no avail. >> Here's the >> latest version: >> >> >> > xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0" >> xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1" >> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0" >> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0" >> inverseClassloading="false" configId="promo-server"> >> >> > container-id="Default Stateless Container"> >> > res-id="AuchanPromoDS" /> >> >> > deployment-id="CloseStagesTask" >> container-id="Default Stateless Container"> >> > res-id="AuchanPromoDS" /> >> >> > deployment-id="CreatePitpTask" >> container-id="Default Stateless Container"> >> > res-id="AuchanPromoDS" /> >> >> > deployment-id="CreateNotificationsTask" >> container-id="Default Stateless Container"> >> > res-id="AuchanPromoDS" /> >> >> >> >> >> I now get the following message: >> >> Deployment failed: >> Currently a Geronimo deployment plan is required for an EJB module. >> Please >> provide a plan as a deployer argument or packaged in the EJB JAR at >> META-INF/openejb-jar.xml >> >> I did package this file in my EAR, more precisely in the META-INF >> directory >> of the EJB JAR itself located at the root of the EAR. What's wrong >> with >> this packaging? >> >> Thanks again, >> GB >> >> >> Aaron Mulder wrote: >>> >>> Just in case you haven't already, you might try stopping and >>> restarting the database pool from the "Installed J2EE connectors" >>> screen, or restarting Geronimo. I don't expect this to help but... >>> >>> Also, I think it's possible you might get this message if there are >>> *two* matching connectors (both named AuchanPromoDS) -- that's not >>> the >>> case, right? >>> >>> Also, are you sure the error is coming from the web module and not >>> the >>> EJB module? Is there a chance the ejb-jar.xml has a resource >>> reference problem, or the EJB JAR has a problem locating the data >>> source for CMP entity beans or something like that? The EJB JAR may >>> also need the same data source dependency depending on how it's >>> configured (or you could just add the dependency to >>> geronimo-application.xml at the EAR level to cover both modules). If >>> nothing else, you can deploy with the command line deploy tool like >>> "java -jar deployer.jar --verbose deploy ..." and it should give >>> you a >>> stack trace which you could post and we could make sure we understand >>> where in the deploy process this problem is coming up. >>> >>> Thanks, >>> Aaron >>> >>> On 10/27/06, Guillaume Bilodeau wrote: >>>> >>>> Ok let's try this again, without altering any names :) I'm using >>>> Geronimo+Tomcat 1.1.1 on Java 5. >>>> >>>> Error: >>>> >>>> Deployment failed: >>>> Unable to resolve resource reference 'jdbc/AuchanPromoDS' (Could >>>> not find >>>> resource 'AuchanPromoDS'. Perhaps it has not yet been configured, >>>> or your >>>> application does not have a dependency declared for that resource >>>> module?) >>>> >>>> "Installed J2EE connectors" screen: >>>> console.dbpool/AuchanPromoDS/1.0/rar running Stop >>>> Restart >>>> Uninstall >>>> >>>> web.xml: >>>> >>>> >>>> >>>> >>> 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 >>>> >>>> ... >>>> >>>> >>>> geronimo-web.xml: >>>> >>>> >>>> >>>> >>>> >>>> >>>> promo-war >>>> >>>> >>>> >>>> console.dbpool >>>> AuchanPromoDS>>> artifactId> >>>> >>>> >>>> >>>> >>>> /auchan-promo >>>> >>>> >>>> jdbc/AuchanPromoDS >>>> AuchanPromoDS >>>> >>>> >>>> >>>> applicationContext.xml: >>>> >>>> >>> jndi-name="java:comp/env/jdbc/AuchanPromoDS" >>>> proxy-interface="javax.sql.DataSource" >>>> lookup-on-startup="false" /> >>>> >>>> application.xml: >>>> >>>> >>>> >>> "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" >>>> "http://java.sun.com/dtd/application_1_3.dtd"> >>>> >>>> promo-ear >>>> Promo Action Management System EAR >>>> >>>> >>>> promo-web-2.0.0-SNAPSHOT.war >>>> /auchan-promo >>>> >>>> >>>> >>>> promo-server-2.0.0-SNAPSHOT.jar >>>> >>>> >>>> >>>> It seems to me that I followed what the usage screen suggests. >>>> Is this a >>>> problem with dealing with EARs? >>>> >>>> Thanks, >>>> GB >>>> >>>> >>>> On 10/26/06, Guillaume Bilodeau wrote: >>>>> 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/PromoDS. >>>>> >>>>> Any other idea? >>>> >>>> Can you look in the database pool screen in the console, and select >>>> the usage link next to your database pool, and make sure that all >>>> the >>>> names in the example there match the ones in your geronimo-web.xml >>>> file? It's hard to troubleshoot from the config files if you're >>>> changing the important entries as you post them. :) >>>> >>>> Also, are you using Geronimo 1.0 or Geronimo 1.1? The XML >>>> namespaces >>>> in the geronimo-web.xml file aren't really correct for Geronimo 1.1, >>>> though it may auto-convert them. I'd try putting in the proper >>>> values >>>> (which you can get from here http://geronimo.apache.org/ >>>> schemas.html). >>>> >>>> Thanks, >>>> Aaron >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource- >>>> tf2513035.html#a7024975 >>>> 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#a7070273 >> 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#a7071620 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.