I have an entity and stateless session bean in one JVM and client (code given
below) calling from another JVM.
import javax.naming.Context;
import javax.naming.InitialContext;
import java.io.*;
import java.util.Properties;
import java.util.*;
import javax.ejb.EJBException;
public class BankClient {
    public static void main(String[] args) {
        try {
            Properties p = new Properties();
            p.load(new FileInputStream("jndi.properties"));
            p.put("openejb.authentication.realmName","geronimo-admin");
            InitialContext ctx = new InitialContext(p);
            Account a = (Account) ctx.lookup("AccountBeanRemote");
            a.createAccount("bailey","savings","3833",2524);
            AccountNtt a34 = a.find("3833");
            System.out.println(a34.ownerName+"    "+a34.accountType+"   
"+a34.accountNumber+"    "+a34.balance);
        }
        catch(Exception ex) {
            System.err.println("Caught an unexpected exception!");
            ex.printStackTrace();
        }
    }
}
a.createAccount method is throwing exception: Caught an unexpected
exception! javax.ejb.EJBException: The bean encountered a non-application
exception.
Account.java is business interface implemented by AccountBean.java and
AccountNtt is an entity.
-- 
View this message in context: 
http://www.nabble.com/client-throwing-exception-tp21804757s134p21804757.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to