Greetings,
I'm trying to use a EJB in a JSP page. But unfortunately after I create
the ejb and when I call my remote method I'm getting the exception bellow:
"
javax.ejb.CreateException: Could not create stateless EJB:
java.lang.reflect.InvocationTargetException; nested exception is:
javax.ejb.CreateException: Could not create stateless EJB:
java.lang.reflect.InvocationTargetException
...
"
The invocation in my JSP:
<%!
private SightsInfoRemoteInterface sightsinfo;
public void jspInit() {
sightsinfo=(SightsInfoRemoteInterface)getServletContext().getAttribute("sightsinfoEJB");
if (sightsinfo == null) {
try {
InitialContext ic = new InitialContext();
Object objRef = ic.lookup("java:comp/env/ejb/SightsInfoEJB");
SightsInfoHome home =
(SightsInfoHome)PortableRemoteObject.narrow(objRef, SightsInfoHome.class);
sightsinfo = home.create();
String res=sightsinfo.test("test method"); // <- EXCEPTION!!
System.out.println("res:"+res);
getServletContext().setAttribute("sightsinfoEJB", sightsinfo);
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
%>
I would appreciate any help here.
thx,
Pedro Salazar.
--
pedro salazar (pt-inovacao) <[EMAIL PROTECTED]>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".