Thank you,
I read the FAQ. But I still have the problem.
My ejb-jar and my war file are running in the same Glassfish AS.
First I build my ejb jar and deploy it. The I build my war and the deploy it.
My code now:
Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
try {
Context context = new InitialContext(props);
userDelegate = (IUserDelegate) context.lookup("com.xxxx.business.IUserDelegate");
} catch (NamingException e) {
e.printStackTrace();
}
com.xxxx.business.IUserDelegate is the assigned JNDI name for the Bean. I do not specify
another name for the Bean.
But the error is:
javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.xxxx.business.IUserDelegate [Root exception is java.lang.ClassNotFoundException: com.xxxxx.business.IUserDelegate]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:425)
...
So now the war cannot find the Interface?
Thanks.
[Message sent by forum member 'marsias' (marsias)]
http://forums.java.net/jive/thread.jspa?messageID=271652