Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 88760 invoked from network); 26 Nov 2009 21:09:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Nov 2009 21:09:50 -0000 Received: (qmail 36134 invoked by uid 500); 26 Nov 2009 21:09:50 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 36078 invoked by uid 500); 26 Nov 2009 21:09: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 36070 invoked by uid 99); 26 Nov 2009 21:09:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Nov 2009 21:09:49 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.56] (HELO smtp101.prem.mail.sp1.yahoo.com) (98.136.44.56) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 26 Nov 2009 21:09:47 +0000 Received: (qmail 48066 invoked from network); 26 Nov 2009 21:09:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=t3rRx2UU4Hl3rdXeW32O9xO9HuXJCkTlC4JqEc2w+siZHzNlaG3fbkKbEgRhmZufHqY51c2eL1xBO1x/5vSfd+510l/PIpIor38lMcV7q8UZyD7y8XsvDVhWxeaGIC7pHr4GghB2ylppxeMLhohkK5RENMc31j/dn1E1QlW13xw= ; Received: from 076-076-148-215.pdx.net (david_jencks@76.76.148.215 with plain) by smtp101.prem.mail.sp1.yahoo.com with SMTP; 26 Nov 2009 13:09:26 -0800 PST X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- X-YMail-OSG: 1rJzozwVM1kBY3EBZXFnLWu9Am4aqeGp2f1VQ1ih2cVpoWsUdSC2WZzJ2X35r6nUsj9Xq.5BPRDh6Ig3aXxf7R20YOU.JWvdTYc_rC4HZSP7SyxMxjfR2XRzZJal1QD3uKMn_Z3RA9QwgQrTqYMQxQ.qwIabFYxsrKVqmXqsH1NNwWjRfep1k9pJDw2Bnf4OUPGpllZSzQCvWXYZiE2qj7bMoASOR7IdAVg8sTEBwm5ajsjH9eopWzFhcxxK0Qn7iVbterslCSPpf1myJR94_bxqd97FsQydASfCQKD5yhbAl6LUTEx5YWCnaLmR_J8DNZEbQHHtKKmSjpbkPz4caJeqL3Z2OSS.o6g23VdEwCl3qSKnnvyLKQNjI7OFVOK4UBaTo0a.2QvhlrnPmOfS4Jh4DN20HRIQz.MUbu.WyI96.F2KrCbj6tK.Q3KqLkMRKVZC3DwMLLyj5sJJhH4vskA2oUhIDI_n.ERQsRxyx8MDAZqeKs41xCk_u2CHnxYWAhpssoUJga9cAo.OA4sjgTwmvwsZDqGnGAFyOFBXtJe5D8.c2HsGCXHe_n6CNdgjlkAsa_AY2EByq00ytoHucWxJRJYFVg_AoNyx68ONRiSLmvVyETv6V.nTEnVbDQUPV9.buzT1A1E_5gjQRjgPyZB6VTBZZhcb_xu7cdE1RdupjJmOIU55FPAiZlLq11ljE2zZmtA04vuugiDklTXUP6NusDbJlfvPdW4fkyYvGLnxazH3h3dJmer0DIXiQU2wuuY- X-Yahoo-Newman-Property: ymail-3 Message-Id: From: David Jencks To: user@geronimo.apache.org In-Reply-To: <26532836.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Geronimo with openjpa (and DataSource lookups) Date: Thu, 26 Nov 2009 13:09:25 -0800 References: <26532836.post@talk.nabble.com> X-Mailer: Apple Mail (2.936) The datasource module needs to be listed as a dependency of the war module if they are deployed separately. Single-valued component search in geronimo follows the directed acyclic graph of dependencies so you can deploy lots of datasources named "jdbc/db" in different modules yet still get the one you want in your app by specifying the module with the right one as a dependency. thanks david jencks On Nov 26, 2009, at 9:44 AM, cumbers wrote: > > I am looking for someone to put me out of my geronimo/openpa misery. > > I have an application that I can deploy to Geronimo (2.1.1.3) that > uses > openjpa where the properties inside the persistence.xml are explicitly > defined like so: > > > value="oracle.jdbc.driver.OracleDriver"> > value="jdbc:oracle:thin:@localhost:1521:DB"> > value="dbuser"> > value="passw0rd"> > > > However this app is going to be deployed by lots of users, and > ideally I > would like to ship a war file, and direct users to create a JNDI > object that > they define and then openjpa uses this. > > Simply defining the JNDI datasource connection within Geronimo, and > using > the reference in the jdbc/db or > jdbc/db does not appear > to work, > and I get the following error message when I try and create an > EntityManager: > > " > org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or > DataSource class name must be specified in the ConnectionDriverName > property." > > After 3 days on google, I found this page: > http://cwiki.apache.org/GMOxDOC21/datasource-connectionfactory-mdb-and-jpa.html > which suggests that: > > "Although many other servers use jndi to define the meaning of the > jta-data-source and non-jta-data-source geronimo does not. These are > not > jndi names in any way but must match the name specified in the > connector > plan." > > OK so using the jndi object name directly does not seem to be > supported. > However the name in the resourceadapter of the plan.xml IS "jdbc/db" > and so > I think this should work. Here is the relevant snippet from my > plan.xml as > created when I define a JDBC datasource using Geronimo. > > > > > > javax.sql.DataSource interface> > > jdbc/db > > I have run out of ideas on how I can make this work, and would be > massively > appreciative if anyone can shed some light on why this is not > working. If > you think you need more information please let me know! > > Cheers > > Rich > -- > View this message in context: http://old.nabble.com/Geronimo-with-openjpa-%28and-DataSource-lookups%29-tp26532836s134p26532836.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >