geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axiez <lesai...@gmail.com>
Subject Re: client throwing exception
Date Fri, 06 Feb 2009 04:22:05 GMT

This is no more a problem. Actual problem is something else as identified
from application server log.

axiez wrote:
> 
> 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-tp21804757s134p21866354.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message