geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axiez <>
Subject Unable to resolve reference "JtaDataSourceWrapper" in gbean default/a1/1233553508187
Date Mon, 02 Feb 2009 06:08:23 GMT

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
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="">
    <persistence-unit name="manager">
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;
public class AccountBean implements Account {
    private EntityManager manager;
    public AccountNtt find(String accountNum) {
        AccountNtt ac =
        return ac;
    public AccountNtt createAccount(String name, String accountType, String
accountNum) {
        AccountNtt acNtt = new AccountNtt(name, accountType, accountNum);
        return acNtt;
    public int displayBalance(String accountNum) {
        AccountNtt ac = (AccountNtt) manager.find(AccountNtt.class,
        return ac.balance;
    public List<AccountNtt> balanceGt5000() {
        String ejbql = "SELECT a FROM AccountNtt a WHERE a.balance>5000";
        Query query = manager.createQuery(ejbql);
        List<AccountNtt> 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);
The error message is:
Error: Unable to distribute a1.jar: Unable to resolve reference
"JtaDataSourceWrapper" in gbean
to a gbean matching the pattern
[?name=jdbc/h#org.apache.geronimo.naming.ResourceSource] due to: No matches
for referencePatterns:
How can I make the data source work?
View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message