For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > March 2004 > Open Deployment Problem (long)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Open Deployment Problem (long)
Jeremy Russell

2004-03-19, 8:46 pm

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:\j2sdkee1.4\lib\ejbdeployment10.jar;C:\j2sdkee1.4\lib\jhall.jar;C:\Tomcat5.0\common\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:\ProgramFi
les\SQLLIB\BIN;C:\ProgramFiles\SQLLIB\FU
NCTION;C:\ProgramFiles\SQLLIB\SAMPLES\RE
PL;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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com