Probably a newbie question, but I am trying to access a session beean
from within a web page.  I want to be able to use this from any server,
so I am trying to avoid using the custom EJB tag library.  I have this
in the top of the JSP:
------------------------------------------------------------------------
<%@ page import="com.es.ejb.Operator.OperatorHome" %>
<%@ page import="javax.ejb.*" %>
<%@ page import="javax.naming.*" %>
<%@ page import="javax.rmi.*" %>
<%@ page import="javax.sql.DataSource" %>
<jsp:useBean id="search" scope="page" class="Search" />
<jsp:setProperty name="search" property="*" />
 
<html>
<head>
<title>Search Results</title>
</head>
<%
    Context context = new InitialContext();
System.out.println("Created context...");
    OperatorHome ohome =
(OperatorHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/Operator"),
OperatorHome.class);
%>              
------------------------------------------------------------------------

I get this error:
------------------------------------------------------------------------
javax.naming.NamingException: Error instantiating web-app JDNI-context:
Unknown resource type: java.sql.Datasource
        at
com.evermind.server.http.HttpApplication.getEnvironmentContext(JAX,
Compiled Code)
        at com.evermind.server.fu.lookup(JAX, Compiled Code)
        at javax.naming.InitialContext.lookup(InitialContext.java,
Compiled Code)
        at __jspPage21._jspService(__jspPage21.java:56)
        at com.evermind.server.http.EvermindHttpJspPage.service(JAX,
Compiled Code)
        at com.evermind.server.http.HttpApplication.pk(JAX, Compiled
Code)
        at com.evermind.server.http.JSPServlet.service(JAX, Compiled
Code)
        at com.evermind.server.http.c1.l_(JAX)
        at com.evermind.server.http.c1.forward(JAX)
        at com.evermind.server.http.dc.ca(JAX)
        at com.evermind.util.b.run(JAX, Compiled Code)
------------------------------------------------------------------------

Any ideas anyone?  The news-app works fine for me.

Jim

Reply via email to