Code Comments
Programming Forum and web based access to our favorite programming groups.Once again, I am having a very bad day (actually bad w!) trying to get an EJB deployed in a test environment. Y'all were so helpful roughly a year ago, with a similar albeit J-Boss issue, that I figured I would impose again and ask for more help. I'm sure, as before, it's my dumb mistake. I'm trying to deploy what I again thought was a simple EJB to a OpenEJB server running with Tomcat. Using the files below, I get the messages below when I copy the JAR file to the deployment directory. I am trying to configure Tomcat 5.0 and OpenEJB together on Windows 2000. I have been following the instructions at this URL: http://www.onjava.com/pub/a/onjava/...cat.html?page=1 I have the following relevant environment variables set: CLASSPATH=.;C:\j2sdk1.4.2_04\lib\tools.jar;C:\j2sdkee1.4\lib\j2ee.jar;C:\j2s dkee1.4\lib\ejbdeployment10.jar;C:\j2sdkee1.4\lib\jhall.jar;C:\Tomcat5.0\com mon\lib\servlet-api.jar;C:\Tomcat\5.0\common\lib\jsp-api.jar;C:\ProgramFiles \SQLLIB\java\db2java.zip;C: \ProgramFiles\SQLLIB\java\runtime.zip;C:\ProgramFiles\SQLLIB\java\sqlj.zip;C :\ProgramFiles\SQLLIB\bin J2EE_HOME=C:\j2sdkee1.4 JAVA_HOME=C:\j2sdk1.4.2_04 OPENEJB_HOME=c:\openejb-0.9.2 PATH=.;C:\j2sdk1.4.2_04\bin;C:\j2sdkee1.4\bin;C:\PROGRA~1\IBM\IMNNQ;C:\Progr amFiles\SQLLIB\BIN;C:\ProgramFiles\SQLLI B\FUNCTION;C:\ProgramFiles\SQLLIB\SA MPLES\REPL;C:\ProgramFiles\SQLLIB\HELP;C :\oracle\ora90\BIN;C:\Winnt;C:\Winnt \System32 Tomcat is installed in C:\Tomcat 5.0 and I have added the following entry to C:\Tomcat 5.0\conf\server.xml ------------------------------------------------------- <Context path="/jsp-examples" docBase="jsp- examples" debug="0" reloadable="true" crossContext="true"> <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</val ue> </parameter> <parameter> <name>openejb.naming.security.principal</name> <value>username</value> </parameter> <parameter> <name>openejb.naming.security.credentials</name> <value>password</value> </parameter> <parameter> <name>openejb.naming.provider.url</name> <value>localhost:4201</value> </parameter> <parameter> <name>openejb.ejb-link</name> <value>Hello</value> </parameter> </ResourceParams> </Context> ------------------------------------------------------- OpenEJB is installed in C:\openejb-0.9.2 and I have downloaded the test file 'myHelloEjb.jar' into the directory 'C:\openejb-0.9.2\beans'. I also downloaded the test JSP 'openejb.jsp' into the directory 'C:\Tomcat 5.0\webapps\jsp-examples'. 'openejb.jsp' contains the following: ------------------------------------------------------- <%@ page import="org.acme.HelloObject, org.acme.HelloHome, javax.naming.InitialContext, javax.naming.Context"%> <html> <head> <title>OpenEJB -- EJB for Tomcat</title> </head> <body> Stateless Session bean - HelloBean - says: <% Context initCtx = new InitialContext(); Object object = initCtx.lookup("java:comp/env/ejb/hello"); HelloHome helloHome = (HelloHome) javax.rmi.PortableRemoteObject.narrow(object, HelloHome.class); HelloObject bean = helloHome.create(); %> <%= bean.sayHello() %> </body> </html> ------------------------------------------------------- When I try to enter the URL 'http://localhost/jsp-examples/openejb.jsp', I get the following HTTP error: ------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.se rvice(JspServletWrapper.java:358) org.apache.jasper.servlet.JspServlet.serviceJsp File(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service (JspServlet.java:248) javax.servlet.http.HttpServlet.service (HttpServlet.java:856) root cause java.lang.reflect.UndeclaredThrowableException $Proxy13.create(Unknown Source) org.apache.jsp.openejb_jsp._jspService (openejb_jsp.java:61) org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:133) javax.servlet.http.HttpServlet.service (HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.se rvice(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJsp File(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service (JspServlet.java:248) javax.servlet.http.HttpServlet.service (HttpServlet.java:856) ------------------------------------------------------- I'm sure this is my stupid error but despite puzzling over this for three complete days now, I am no further forward. Can someone PUHLEEZE give me some advice!??!! Thanks in advance ... Jeremy
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.