hi frirends,
i have created a
ejb and calling it through client program
which is deployed with the ejb application. on running it on
j2ee Application Server 8
i get errors on the home interface
the details: -
the remote interface
the home interface
the EJB class
the client program
[CODE}
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.math.BigDecimal;
public class ConverterClient {
public static void main(String [] args)){
try {
Context myEnv =
(Context)initial.lookup("java:comp/env");
Object objref =myEnv.lookup("ejb/SimpleConverter");
ConverterHome home =
(ConverterHome)PortableRemoteObject.narrow(objref,
ConverterHome.class);
Converter currencyConverter =home.create();
BigDecimal param =new BigDecimal ("100.00");
BigDecimal amount =
currencyConverter.dollarToYen(param);
System.out.println(amount);
amount =currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
}catch (Exception ex){
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}
[/CODE]
in the ejb reference tab in the deploytool
Coded Name field -> ejb/SimpleConverter
EJB Type field -> Session
Interfaces field -> Remote
Home Interface field -> converter.ConverterHome
Local/Remote Interface field ->converter.Converter
JNDI Name field -> ConverterBean
on running the program
Appclient �client ConverterAppClient.jar
i get the error on the command line
any help
thanks
Pradyut