Wow, we've fixed all sorts of things since 0.9.0. I wonder if I
could at least get you to go up to 0.9.2 and see if we cant get that
running for you.
Out of curiosity, how many webapps and ejb-jars do you plan to run
once everything is setup? You may be better off with the Collapsed
EAR technique as opposed to the global integration approach depending
on how you plan to organize your apps.
-David
On Sep 9, 2005, at 6:37 AM, Rajesh Puri wrote:
I was doing hello world per following link:
http://www.onjava.com/pub/a/onjava/2003/02/12/ejb_tomcat.html?page=2
I am running Tomcat 5.0 with OpenEjb 0.9.0. In
addition to what is given I did following:
1) Started OPENEJB after deploy of example. It seems
the beans got loaded.
2) Changed server.xml with following insert in
<GlobalNamingResources> section.
<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.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
3) Copied jar files from /dist of openejb folder to
common/lib in tomcat. Not sure if that was needed. My
guess was that tomcat should be able to see all
jars(including my bin jar for jsp to import).
4) Copied my test page to jsp-examples.
5) Copied openejb_loader-0.9.0.war to webapps.
Restarted tomcat.
I get the following errors in console. I also tried to
copy j2ee.jar in common/lib that also did not help.
I see the openejbloader page that does not show that
hello bean as being loaded or anything.
Obviously I am not missing some piece here. My
understanding was that if I have deployed bean in
OpenEjb and it is up and running, all I need to do was
change server.xml and copy my jsp and that should work
- do I need to modufy tomcat classpath etc also, i
have default settings for tomcat. I really did not
have to do steps 3 & 4. But that also did not work.
Another Question - I believe that currently I am
running as two seperate JVM's(openejb needs to be
started seperately then Tomcat - this is the default
mode?), but will like to run really needs just as a
container in Tomcat. What doi I need to change this.
I have spent 2 days figuring it out and at the point
of giving it up. Obviously, I lack the knowledge on
this. My interest is to run this as add on to
Tomcat.This seems to be a nice container to use with
Tomcat - but my bad.
------------------------------------------------------
2005-09-09 09:14:12 StandardWrapperValve[jsp]:
Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name ejb is not
bound in this Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(Unknown Source)
at
org.apache.jsp.testejb_jsp._jspService(testejb_jsp.java:58)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal
(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:462)
at
org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160)
at
org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
--- David Blevins <[EMAIL PROTECTED]> wrote:
On Sep 8, 2005, at 9:35 PM, Rajesh Puri wrote:
I am new to this EJB. I downloaded 0.9.2 of this
container. Now, reading list/web site seems this
does
not work with Tomcat 5.x. Is that right?
It works fine in Tomcat 5.0.x, but in 5.5.x they
changed their
classloader implementation which breaks OpenEJB
0.9.2.
The 1.0 beta1 will work with Tomcat 5.5.x in terms
of the global
configuration (e.g. where ejbs deployed in openejb
are available to
all webapps). Note, that the new Collapsed EAR
support (e.g. ejbs
deployed in openejb are only available to the webapp
embedding
openejb) has only been tested with 4.1.x.
Please do let us know if you have any issues
whatsoever with the 1.0
beta1 if you try it. We hammered on it in testing
quite a bit and
cleared away issues, so it should be pretty good.
-David
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/