Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 51135 invoked from network); 2 Feb 2009 08:48:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2009 08:48:54 -0000 Received: (qmail 35876 invoked by uid 500); 2 Feb 2009 08:48:52 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 35860 invoked by uid 500); 2 Feb 2009 08:48:52 -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 35851 invoked by uid 99); 2 Feb 2009 08:48:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Feb 2009 00:48:52 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.54] (HELO smtp109.prem.mail.sp1.yahoo.com) (98.136.44.54) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Feb 2009 08:48:42 +0000 Received: (qmail 53649 invoked from network); 2 Feb 2009 08:48:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received: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=5sM8sXh9WV4+FfkqnXaMo5BNfLKn7BynEI7gtIfm30Mlepb7FDb1sPbi3ItlsXqGqjaQ8QdkzO/liybmdAZBO0rSNIaDH1ei0mLv1xtzSyRjuDgFPWEsaNi/hmKk65LJpcCsxZNEuZTP1pCc67bGVp1hferjzBdamuFMv5KiG6E= ; Received: from unknown (HELO ?10.11.55.10?) (david_jencks@76.76.148.215 with plain) by smtp109.prem.mail.sp1.yahoo.com with SMTP; 2 Feb 2009 08:48:18 -0000 X-YMail-OSG: 7wvooQUVM1kAZGiiySDFdfm.8fiMssbZsGnEgzzwS5Gu0J2fQbHJzjrB5eNGOEQCf36wBwCUuBq5tP2AyEPhfHdBiapKj3w2CoWfBPCFU29W3UrknJp4e6mJoG1I29um4M0S9vSH3UmU5STWcJP2g034dWN24RE0E9ja4h_MOBGxcffepua0sMHUt_ev0YQOD89j2MppCrPV8NJZ4J7NMiCHQJ64KA-- X-Yahoo-Newman-Property: ymail-3 Message-Id: From: David Jencks To: user@geronimo.apache.org In-Reply-To: <21784636.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 v930.3) Subject: Re: Unable to resolve reference "JtaDataSourceWrapper" in gbean default/a1/1233553508187 Date: Mon, 2 Feb 2009 00:48:17 -0800 References: <21784636.post@talk.nabble.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org You need to have a geronimo plan with the datasource listed as a dependency. hope this hint helps david jencks On Feb 1, 2009, at 10:08 PM, axiez wrote: > > I have a business interface, remotely accessible stateless session > bean, > entity, and a client that will access from a different JVM. I tried to > deploy a1.jar but got error message specified in the subject. > META-INF/persistence.xml has the following entries > > > > jdbc/h > AccountNtt > > > where h is the data source created by me using console, AccountNtt > is the > entity class, and manager is the EntityManager reference in stateless > session bean. > Stateless session bean code is: > import java.util.List; > import javax.ejb.Stateless; > import javax.ejb.Remote; > import javax.persistence.PersistenceContext; > import javax.persistence.EntityManager; > import javax.persistence.Query; > @Stateless > @Remote(Account.class) > public class AccountBean implements Account { > @PersistenceContext > private EntityManager manager; > public AccountNtt find(String accountNum) { > AccountNtt ac = > (AccountNtt)manager.find(AccountNtt.class,accountNum); > return ac; > } > public AccountNtt createAccount(String name, String accountType, > String > accountNum) { > AccountNtt acNtt = new AccountNtt(name, accountType, > accountNum); > manager.persist(acNtt); > return acNtt; > } > public int displayBalance(String accountNum) { > AccountNtt ac = (AccountNtt) manager.find(AccountNtt.class, > accountNum); > return ac.balance; > } > public List balanceGt5000() { > String ejbql = "SELECT a FROM AccountNtt a WHERE > a.balance>5000"; > Query query = manager.createQuery(ejbql); > List result = query.getResultList(); > return result; > } > public AccountNtt first0() { > String ejbql = "SELECT a FROM AccountNtt a WHERE a.balance=0"; > Query query = manager.createQuery(ejbql); > AccountNtt a = (AccountNtt) query.getSingleResult(); > return a; > } > public void clearAllAccounts() { > String ejbql = "DELETE FROM AccountNtt a"; > Query q = manager.createQuery(ejbql); > manager.getTransaction().begin(); > q.executeUpdate(); > manager.getTransaction().commit(); > } > } > The error message is: > Error: Unable to distribute a1.jar: Unable to resolve reference > "JtaDataSourceWrapper" in gbean > default/a1/1233553508187/jar?EJBModule=default/a1/1233553508187/ > jar > ,J2EEApplication > = > null > ,PersistenceUnitModule=ejb.jar,j2eeType=PersistenceUnit,name=manager > to a gbean matching the pattern > [?name=jdbc/h#org.apache.geronimo.naming.ResourceSource] due to: No > matches > for referencePatterns: > [?name=jdbc/h#org.apache.geronimo.naming.ResourceSource] > How can I make the data source work? > -- > View this message in context: http://www.nabble.com/Unable-to-resolve-reference-%22JtaDataSourceWrapper%22-in-gbean-default-a1-1233553508187-tp21784636s134p21784636.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >