Hi,
Can someone help. I just downloaded OpenEJB 0.9.2 today. I have managed to install it, and got it to start when tomcat starts, as I am tryin gto make it run locally.
But when I try to lookup the Hello session bean it tells me it can't find it.
org.apache.jasper.JasperException: Name Hello is not bound in this Context at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) ...
my JSP page is relatively simple...
<%@ page import="org.acme.HelloObject,
org.acme.HelloHome,
javax.naming.InitialContext,
javax.naming.Context,
java.util.Properties,
javax.rmi.PortableRemoteObject"%><html> <head> <title>OpenEJB -- EJB for Tomcat</title> </head>
<body>
Stateless Session bean - HelloBean - says:
<%
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.openejb.client.LocalInitialContextFactory");
p.put("openejb.home", "C:\\Software\\openejb\\openejb-0.9.2");
InitialContext ctx = new InitialContext( p );
Context initCtx = new InitialContext();
Object object = initCtx.lookup("Hello");
HelloHome helloHome = (HelloHome)
javax.rmi.PortableRemoteObject.narrow(object, HelloHome.class);
HelloObject bean = helloHome.create();
%>
<%= bean.sayHello() %>
</body>
</html>Am I missing a step?
I have added the following to my server.xml for tomcat as well.. but not sure if it is relavent...
<Ejb name="ejb/hello"
type="Session"
home="org.acme.HelloHome"
remote="org.acme.Hello"/>
<ResourceParams name="ejb/hello">
<parameter>
<name>factory</name>
<value>org.openejb.client.TomcatEjbFactory</value>
</parameter>
<parameter>
<name>openejb.naming.factory.initial</name>
<value>org.openejb.client.LocalInitialContextFactory</value>
</parameter>
<parameter>
<name>openejb.ejb-link</name>
<value>Hello</value>
</parameter>
</ResourceParams>I have presumed my openEJB container has started up correctly, and my Hello Bean started as well.. as I get the followign message in the log, maybe I am reading it wrong?
WARN : No ApplicationServer was specified! The container system will only be a
ccessible by same-vm clients via the IntraVm Server.
WARN : Deprecated: The propery name "org/openejb/assembler_class" is deprecated
and will be removed in a future version of OpenEJB, please use the property nam
e "openejb.assembler" instead.
DEBUG: Instantiating assembler class org.openejb.alt.assembler.classic.Assemble
r
ERROR: Testing driver failed. [jdbc:idb:conf/default.idb_database.conf] Could
not obtain a physical JDBC connection from the DriverManager. Problem: java.io
.FileNotFoundException: .\logs\trace.log (The system cannot find the path specif
ied)
DEBUG: Containers : 4
DEBUG: Type Container ID
DEBUG: ENTITY Default BMP Container
DEBUG: ENTITY Default CMP Container
DEBUG: STATEFUL Default Stateful Container
DEBUG: STATELESS Default Stateless Container
DEBUG: Deployments : 20
DEBUG: Type Deployment ID
DEBUG: CMP_ENTITY client/tests/entity/cmp/RMI-over-IIOP/EJBHome
DEBUG: STATEFUL client/tests/stateful/EncBean
DEBUG: STATELESS client/tests/stateless/BeanManagedBasicStatelessHome
DEBUG: STATEFUL client/tests/stateful/BasicStatefulHome
DEBUG: STATELESS client/tests/stateless/EncBean
DEBUG: STATELESS Hello
DEBUG: STATEFUL client/tests/stateful/BeanManagedTransactionTests/EJBHome
DEBUG: BMP_ENTITY client/tests/entity/bmp/RMI-over-IIOP/EJBHome
DEBUG: STATEFUL client/tests/stateful/RMI-over-IIOP/EJBHome
DEBUG: STATELESS client/tests/stateless/BeanManagedTransactionTests/EJBHom
e
DEBUG: BMP_ENTITY client/tests/entity/bmp/allowed_operations/EntityHome
DEBUG: CMP_ENTITY client/tests/entity/cmp/EncBean
DEBUG: STATEFUL client/tests/stateful/BeanManagedBasicStatefulHome
DEBUG: BMP_ENTITY client/tests/entity/bmp/BasicBmpHome
DEBUG: STATELESS client/tests/stateless/BasicStatelessHome
DEBUG: CMP_ENTITY client/tests/entity/cmp/BasicCmpHome
DEBUG: STATELESS client/tools/DatabaseHome
DEBUG: BMP_ENTITY client/tests/entity/bmp/EncBean
DEBUG: CMP_ENTITY client/tests/entity/cmp/allowed_operations/EntityHome
DEBUG: STATELESS client/tests/stateless/RMI-over-IIOP/EJBHome
DEBUG: SecurityService : org.openejb.ri.sp.PseudoSecurityService
DEBUG: TransactionManager: org.openejb.core.TransactionManagerWrapper
INFO : OpenEJB ready.
any help would be much appreciated...
Philip
