Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Open Deployment Problem (long)
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

Report this thread to moderator Post Follow-up to this message
Old Post
Jeremy Russell
03-20-04 01:46 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.