RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread David Blevins
This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat, all automatically and dynamically.  The only
thing you have to do is tell the loader where OpenEJB lives by setting
the openejb.home init-param in the web.xml.


It didn't work!?


Sounds simple, but we see a number of common mistakes:

 - Most people simply forget to uncomment it.  Check and double check
that.
 - Some set it to OPENEJB_HOME, which won't work. An actual path is
required.
 - Some set it to point to the OpenEJB /bin directory.
 - The rest are usually typos in the path.


Hope this helps everyone out.  As an archive-searcher, I always
appreciate finding emails like this.

If anyone has any ideas on making the integration process even easier, I
am all ears.

-David

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 12:44 PM
 To: Tomcat Users List
 Subject: Re: java.lang.NoClassDefFoundError
 
 
 Looks like you've using OpenEJB ;)
 The OpenEJB distro comes with a war file,  which looks like it's been 
 expanded to a context by your tomcat install. However, the war file 
 doesn't contain the required OpenEJB jar files (which 
 probably need to 
 be put in common/lib or server/lib).
 The class file for org/openejb/OpenEJB is in the 
 openejb-0.9.1.jar. Deploy that and you should be set (well, 
 this error will go away, at 
 least) .
 
 HTH,
 
 Jon
 
 
 Jeremy Whitlock wrote:
 
 Tomcat List,
 This might not be a Tomcat problem but I 
 imagine that 
 you might be able to help anyways.  Every time I start Tomcat, I get 
 this error:
  
 StandardContext[/openejb_loader-0.9.1]: Servlet
   
 
 /openejb_loader-0.9.1 threw load() exception
 javax.servlet.ServletException: Servlet.init() for servlet loader
 
 
 threw exception
   
 
  at
 
 
 org.apache.catalina.core.StandardWrapper.loadServlet(Standard
 Wrapper.ja
 v
 a:962)
   
 
  at
 
 
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper
 .java:821)
   
 
  at
 
 
 org.apache.catalina.core.StandardContext.loadOnStartup(Standa
 rdContext.
 j
 ava:3420)
   
 
  at
 
 
 org.apache.catalina.core.StandardContext.start(StandardContex
 t.java:360
 8
 )
   
 
  at
 
 
 org.apache.catalina.core.ContainerBase.addChildInternal(Conta
 inerBase.j
 a
 va:821)
   
 
  at
 
 
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase
 .java:807)
   
 
  at
 
 
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
   
 
  at
 
 
 org.apache.catalina.core.StandardHostDeployer.install(Standar
 dHostDeplo
 y
 er.java:257)
   
 
  at
 
 
 org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
   
 
  at
 
 
 org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.
 java:502)
   
 
  at
 
 
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.
 java:410)
   
 
  at
 
 
 org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
   
 
  at
 
 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostCon
 fig.java:3
 6
 8)
   
 
  at
 
 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
 LifecycleS
 u
 pport.java:166)
   
 
  at
 
 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
   
 
  at
 
 
 org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
   
 
  at
 
 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   
 
  at
 
 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.
 java:347)
   
 
  at
 
 
 org.apache.catalina.core.StandardService.start(StandardServic
 e.java:497
 )
   
 
  at
 
 
 org.apache.catalina.core.StandardServer.start(StandardServer.
 java:2189)
   
 
  at
 
 
 org.apache.catalina.startup.Catalina.start(Catalina.java:512)
   
 
  

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Jeremy Whitlock
Filip,
I didn't register my servlet in web.xml because I didn't know I
had to.  I have this same setup on my Windows 2000 machine and I didn't
have a web.xml file for that EJB.  Also, your first statement, can you
give me an example of how you do that?  Thanks, Jeremy

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:33 PM
To: Tomcat Users List
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved

you can do it two ways,

1. If you have the invoker servlet, you can access it that way, but you
need the full classname
2. Did you register your servlet in web.xml?

Filip

-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:21 PM
To: 'Tomcat Users List'
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved


David,
I got OpenEJB working but I'm not able to run the example.  I
have created and compiled the
HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java.
Here is the directory structure:

/usr/local/share/development/openejb
|
|
|_WEB-INF
|
|_lib
|
|_classes
|
|_META-INF
|   |
|   |_ejb-jar.xml
|
|_org
|
|_acme
|
|_HelloBean.java
|_HelloBean.class
|_HelloHome.java
|_HelloHome.class
|_HelloObject.java
|_HelloObject.class
|_HelloWorld.java
|_HelloWorld.class

I have setup Tomcat's server.xml to do this:

!-- OpenEJB ExampleText Bean Context --
Contect path=/openejb
docBase=/usr/local/share/development/openejb debug=0/

Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get:

HTTP Status 404-/openejb/servlet/HelloOpenEJB

type Status report
message /openejb/servlet/HelloOpenEJB
description The requested resource (/openejb/servlet/HelloOpenEJB) is
not available

Any ideas why?  I remember in the previous version of OpenEJB, I had to
place the HelloWorld.java and HelloWorld.class in the classes directory
instead of the acme directory.  Any ideas?  Thanks, Jeremy

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:09 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat, all automatically and dynamically.  The only
thing you have to do is tell the loader where OpenEJB lives by setting
the openejb.home init-param in the web.xml.


It didn't work!?


Sounds simple, but we see a number of common mistakes:

 - Most people simply forget to uncomment it.  Check and double check
that.
 - Some set it to OPENEJB_HOME, which won't work. An actual path is
required.
 - Some set it to point to the OpenEJB /bin directory.
 - The rest are usually typos in the path.


Hope this helps everyone out.  As an archive-searcher, I always
appreciate finding emails like this.

If anyone has any ideas on making the integration process even easier, I
am all ears.

-David

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 12:44 PM
 To: Tomcat Users List
 Subject: Re: java.lang.NoClassDefFoundError
 
 
 Looks like you've using OpenEJB ;)
 The OpenEJB distro comes with a war file,  which looks like it's been 
 expanded to a context by your tomcat install. However, the war file 
 doesn't contain the required OpenEJB jar files (which 
 probably need to 
 be put in common/lib or server/lib

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Filip Hanik
1. If you have the invoker servlet, you can access it that way, but you
need the full classname

look in the docs for the invoker servlet, it is a shortcut in Tomcat so you don't have 
to register your servlets in web.xml.
Or search the archives for the invoker servlet.
http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB and it also means that 
HelloOpenEJB has to have the package org.acme; statement in it.

2. Be default you have to register the servlets in web.xml to map them to a request.

Filip




-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:36 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved


Filip,
I didn't register my servlet in web.xml because I didn't know I
had to.  I have this same setup on my Windows 2000 machine and I didn't
have a web.xml file for that EJB.  Also, your first statement, can you
give me an example of how you do that?  Thanks, Jeremy

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:33 PM
To: Tomcat Users List
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved

you can do it two ways,

1. If you have the invoker servlet, you can access it that way, but you
need the full classname
2. Did you register your servlet in web.xml?

Filip

-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:21 PM
To: 'Tomcat Users List'
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved


David,
I got OpenEJB working but I'm not able to run the example.  I
have created and compiled the
HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java.
Here is the directory structure:

/usr/local/share/development/openejb
|
|
|_WEB-INF
|
|_lib
|
|_classes
|
|_META-INF
|   |
|   |_ejb-jar.xml
|
|_org
|
|_acme
|
|_HelloBean.java
|_HelloBean.class
|_HelloHome.java
|_HelloHome.class
|_HelloObject.java
|_HelloObject.class
|_HelloWorld.java
|_HelloWorld.class

I have setup Tomcat's server.xml to do this:

!-- OpenEJB ExampleText Bean Context --
Contect path=/openejb
docBase=/usr/local/share/development/openejb debug=0/

Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get:

HTTP Status 404-/openejb/servlet/HelloOpenEJB

type Status report
message /openejb/servlet/HelloOpenEJB
description The requested resource (/openejb/servlet/HelloOpenEJB) is
not available

Any ideas why?  I remember in the previous version of OpenEJB, I had to
place the HelloWorld.java and HelloWorld.class in the classes directory
instead of the acme directory.  Any ideas?  Thanks, Jeremy

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:09 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat, all automatically and dynamically.  The only
thing you have to do is tell the loader where OpenEJB lives by setting
the openejb.home init-param in the web.xml.


It didn't work!?


Sounds simple, but we see a number of common mistakes:

 - Most people simply forget to uncomment it.  Check and double check
that.
 - Some set it to OPENEJB_HOME, which won't work. An actual path is
required.
 - Some set it to point to the OpenEJB /bin directory.
 - The rest

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Jeremy Whitlock
Filip,
Which web.xml?  There is one in the $CATALINA_HOME/conf
directory and I can also put one in the WEB-INF directory of the app.
I'm new to OpenEJB.  I have configured it many times but with my current
schedule, I haven't had time to play with EJBs for awhile.  Thanks for
your help, Jeremy

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:48 PM
To: Tomcat Users List
Subject: RE: java.lang.NoClassDefFoundError -- solved

1. If you have the invoker servlet, you can access it that way, but you
need the full classname

look in the docs for the invoker servlet, it is a shortcut in Tomcat so
you don't have to register your servlets in web.xml.
Or search the archives for the invoker servlet.
http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB and it also
means that HelloOpenEJB has to have the package org.acme; statement in
it.

2. Be default you have to register the servlets in web.xml to map them
to a request.

Filip




-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:36 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved


Filip,
I didn't register my servlet in web.xml because I didn't know I
had to.  I have this same setup on my Windows 2000 machine and I didn't
have a web.xml file for that EJB.  Also, your first statement, can you
give me an example of how you do that?  Thanks, Jeremy

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:33 PM
To: Tomcat Users List
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved

you can do it two ways,

1. If you have the invoker servlet, you can access it that way, but you
need the full classname
2. Did you register your servlet in web.xml?

Filip

-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:21 PM
To: 'Tomcat Users List'
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved


David,
I got OpenEJB working but I'm not able to run the example.  I
have created and compiled the
HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java.
Here is the directory structure:

/usr/local/share/development/openejb
|
|
|_WEB-INF
|
|_lib
|
|_classes
|
|_META-INF
|   |
|   |_ejb-jar.xml
|
|_org
|
|_acme
|
|_HelloBean.java
|_HelloBean.class
|_HelloHome.java
|_HelloHome.class
|_HelloObject.java
|_HelloObject.class
|_HelloWorld.java
|_HelloWorld.class

I have setup Tomcat's server.xml to do this:

!-- OpenEJB ExampleText Bean Context --
Contect path=/openejb
docBase=/usr/local/share/development/openejb debug=0/

Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get:

HTTP Status 404-/openejb/servlet/HelloOpenEJB

type Status report
message /openejb/servlet/HelloOpenEJB
description The requested resource (/openejb/servlet/HelloOpenEJB) is
not available

Any ideas why?  I remember in the previous version of OpenEJB, I had to
place the HelloWorld.java and HelloWorld.class in the classes directory
instead of the acme directory.  Any ideas?  Thanks, Jeremy

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:09 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Jeremy Whitlock
David,
I have deployed the myHelloEjb.jar and it's in the
/usr/local/openejb/openejb-0.9.1/bean directory.  I haven't copied it or
moved it.  In my Windows install, I had to do some weird things for my
EJB to work with OpenEJB.  I had to move the META-INF, org and
myHelloEjb.jar files from the classes directory into some other
directory.  If I didn't do that, it wouldn't work.  Now, when I deploy
the app:

./openejb.sh deploy -a -m
/usr/local/share/development/openejb/WEB-INF/classes/myHelloEjb.jar

everything goes as planned and the myHelloEjb.jar gets copied to the
/usr/local/openejb/openejb-0.9.1/beans directory

What do I do next?  The META-INF and org directories are still there,
should they be?  Here are my steps:

1) Create all .java files for the bean example
2) javac all .java files
3) jar META-INF and org
4) deploy myHelloEjb.jar
5) Start Tomcat

Did I leave any steps out?  I don't know what to do next.  Please help.
Thanks, Jeremy

P.S. - I tried the
http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB but it
didn't work.  Anymore ideas?

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:58 PM
To: 'Tomcat Users List'
Cc: 'OpenEJB Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

Filip is correct, follow that advice.

Also, once you deploy the EJB's into OpenEJB, just leave them in the
OpenEJB beans directory.  Don't copy the contents of you EJB jar into
the webapps dir, ejbs are not simple libraries, they must stay in the
EJB container.  Putting them in the webapps classes dir or lib dir will
just cause classloader issues.  OpenEJB will make sure all your EJBs are
visible all your Servlets and JSPs at run time.

You can easily tell OpenEJB where to look for ejbs on your file system,
but again, this shouldn't be the classes or lib directories of your
webapp.

You could create a directory under your WEB-INF dir called ejbs, then
add that dir to your openejb.conf as such:

Deployments dir=/usr/local/share/development/openejb/WEB-INF/ejbs /

When you deploy, just leave of the -m or -c options as those will move
or copy the ejb jar into the OpenEJB/beans directory.  You want them to
stay where they are, which is your new WEB-INF/ejbs directory.

-David

 -Original Message-
 From: Filip Hanik [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 2:33 PM
 To: Tomcat Users List
 Cc: OpenEJB
 Subject: RE: java.lang.NoClassDefFoundError -- solved
 
 
 you can do it two ways,
 
 1. If you have the invoker servlet, you can access it that 
 way, but you need the full classname 2. Did you register your 
 servlet in web.xml?
 
 Filip
 
 -Original Message-
 From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 12:21 PM
 To: 'Tomcat Users List'
 Cc: OpenEJB
 Subject: RE: java.lang.NoClassDefFoundError -- solved
 
 
 David,
   I got OpenEJB working but I'm not able to run the 
 example.  I have created and compiled the 
 HelloBean.java,HelloHome.java,HelloObject.java and 
 HelloWorld.java. Here is the directory structure:
 
 /usr/local/share/development/openejb
   |
   |
   |_WEB-INF
   |
   |_lib
   |
   |_classes
   |
   |_META-INF
   |   |
   |   |_ejb-jar.xml
   |
   |_org
   |
   |_acme
   |
   |_HelloBean.java
   |_HelloBean.class
   |_HelloHome.java
   |_HelloHome.class
   |_HelloObject.java
   |_HelloObject.class
   |_HelloWorld.java
   |_HelloWorld.class
 
 I have setup Tomcat's server.xml to do this:
 
 !-- OpenEJB ExampleText Bean Context --
   Contect path=/openejb 
 docBase=/usr/local/share/development/openejb debug=0/
 
 Now, when I do 
 http://localhost:8080/openejb/servlet/HelloOpenEJB I get:
 
 HTTP Status 404-/openejb/servlet/HelloOpenEJB
 
 type Status report
 message /openejb/servlet/HelloOpenEJB
 description The requested resource 
 (/openejb/servlet/HelloOpenEJB) is not available
 
 Any ideas why?  I remember in the previous version of 
 OpenEJB, I had to place the HelloWorld.java and 
 HelloWorld.class in the classes directory instead of the acme 
 directory.  Any ideas?  Thanks, Jeremy
 
 -Original Message-
 From: David Blevins [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 1:09 PM
 To: 'Tomcat Users List'
 Subject: RE: java.lang.NoClassDefFoundError -- solved
 
 This reply is for the archives.  Jeremy did finally get it 
 running -- he simply forgot to uncomment

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Jeremy Whitlock
Filip,
I'm sorry man but I'm lost on your advice.  Please give me the
dummy terms to explain this.  I am new to this.  Thanks, Jeremy

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:48 PM
To: Tomcat Users List
Subject: RE: java.lang.NoClassDefFoundError -- solved

1. If you have the invoker servlet, you can access it that way, but you
need the full classname

look in the docs for the invoker servlet, it is a shortcut in Tomcat so
you don't have to register your servlets in web.xml.
Or search the archives for the invoker servlet.
http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB and it also
means that HelloOpenEJB has to have the package org.acme; statement in
it.

2. Be default you have to register the servlets in web.xml to map them
to a request.

Filip




-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:36 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved


Filip,
I didn't register my servlet in web.xml because I didn't know I
had to.  I have this same setup on my Windows 2000 machine and I didn't
have a web.xml file for that EJB.  Also, your first statement, can you
give me an example of how you do that?  Thanks, Jeremy

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:33 PM
To: Tomcat Users List
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved

you can do it two ways,

1. If you have the invoker servlet, you can access it that way, but you
need the full classname
2. Did you register your servlet in web.xml?

Filip

-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:21 PM
To: 'Tomcat Users List'
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved


David,
I got OpenEJB working but I'm not able to run the example.  I
have created and compiled the
HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java.
Here is the directory structure:

/usr/local/share/development/openejb
|
|
|_WEB-INF
|
|_lib
|
|_classes
|
|_META-INF
|   |
|   |_ejb-jar.xml
|
|_org
|
|_acme
|
|_HelloBean.java
|_HelloBean.class
|_HelloHome.java
|_HelloHome.class
|_HelloObject.java
|_HelloObject.class
|_HelloWorld.java
|_HelloWorld.class

I have setup Tomcat's server.xml to do this:

!-- OpenEJB ExampleText Bean Context --
Contect path=/openejb
docBase=/usr/local/share/development/openejb debug=0/

Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get:

HTTP Status 404-/openejb/servlet/HelloOpenEJB

type Status report
message /openejb/servlet/HelloOpenEJB
description The requested resource (/openejb/servlet/HelloOpenEJB) is
not available

Any ideas why?  I remember in the previous version of OpenEJB, I had to
place the HelloWorld.java and HelloWorld.class in the classes directory
instead of the acme directory.  Any ideas?  Thanks, Jeremy

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:09 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat, all automatically and dynamically.  The only
thing you have to do is tell the loader where OpenEJB lives by setting
the openejb.home init-param in the web.xml

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Jeremy Whitlock
David,
I got OpenEJB working but I'm not able to run the example.  I
have created and compiled the
HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java.
Here is the directory structure:

/usr/local/share/development/openejb
|
|
|_WEB-INF
|
|_lib
|
|_classes
|
|_META-INF
|   |
|   |_ejb-jar.xml
|
|_org
|
|_acme
|
|_HelloBean.java
|_HelloBean.class
|_HelloHome.java
|_HelloHome.class
|_HelloObject.java
|_HelloObject.class
|_HelloWorld.java
|_HelloWorld.class

I have setup Tomcat's server.xml to do this:

!-- OpenEJB ExampleText Bean Context --
Contect path=/openejb
docBase=/usr/local/share/development/openejb debug=0/

Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get:

HTTP Status 404-/openejb/servlet/HelloOpenEJB

type Status report
message /openejb/servlet/HelloOpenEJB
description The requested resource (/openejb/servlet/HelloOpenEJB) is
not available

Any ideas why?  I remember in the previous version of OpenEJB, I had to
place the HelloWorld.java and HelloWorld.class in the classes directory
instead of the acme directory.  Any ideas?  Thanks, Jeremy

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:09 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat, all automatically and dynamically.  The only
thing you have to do is tell the loader where OpenEJB lives by setting
the openejb.home init-param in the web.xml.


It didn't work!?


Sounds simple, but we see a number of common mistakes:

 - Most people simply forget to uncomment it.  Check and double check
that.
 - Some set it to OPENEJB_HOME, which won't work. An actual path is
required.
 - Some set it to point to the OpenEJB /bin directory.
 - The rest are usually typos in the path.


Hope this helps everyone out.  As an archive-searcher, I always
appreciate finding emails like this.

If anyone has any ideas on making the integration process even easier, I
am all ears.

-David

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 12:44 PM
 To: Tomcat Users List
 Subject: Re: java.lang.NoClassDefFoundError
 
 
 Looks like you've using OpenEJB ;)
 The OpenEJB distro comes with a war file,  which looks like it's been 
 expanded to a context by your tomcat install. However, the war file 
 doesn't contain the required OpenEJB jar files (which 
 probably need to 
 be put in common/lib or server/lib).
 The class file for org/openejb/OpenEJB is in the 
 openejb-0.9.1.jar. Deploy that and you should be set (well, 
 this error will go away, at 
 least) .
 
 HTH,
 
 Jon
 
 
 Jeremy Whitlock wrote:
 
 Tomcat List,
 This might not be a Tomcat problem but I 
 imagine that 
 you might be able to help anyways.  Every time I start Tomcat, I get 
 this error:
  
 StandardContext[/openejb_loader-0.9.1]: Servlet
   
 
 /openejb_loader-0.9.1 threw load() exception
 javax.servlet.ServletException: Servlet.init() for servlet loader
 
 
 threw exception
   
 
  at
 
 
 org.apache.catalina.core.StandardWrapper.loadServlet(Standard
 Wrapper.ja
 v
 a:962)
   
 
  at
 
 
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper
 .java:821

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread Filip Hanik
you can do it two ways,

1. If you have the invoker servlet, you can access it that way, but you need the full 
classname
2. Did you register your servlet in web.xml?

Filip

-Original Message-
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:21 PM
To: 'Tomcat Users List'
Cc: OpenEJB
Subject: RE: java.lang.NoClassDefFoundError -- solved


David,
I got OpenEJB working but I'm not able to run the example.  I
have created and compiled the
HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java.
Here is the directory structure:

/usr/local/share/development/openejb
|
|
|_WEB-INF
|
|_lib
|
|_classes
|
|_META-INF
|   |
|   |_ejb-jar.xml
|
|_org
|
|_acme
|
|_HelloBean.java
|_HelloBean.class
|_HelloHome.java
|_HelloHome.class
|_HelloObject.java
|_HelloObject.class
|_HelloWorld.java
|_HelloWorld.class

I have setup Tomcat's server.xml to do this:

!-- OpenEJB ExampleText Bean Context --
Contect path=/openejb
docBase=/usr/local/share/development/openejb debug=0/

Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get:

HTTP Status 404-/openejb/servlet/HelloOpenEJB

type Status report
message /openejb/servlet/HelloOpenEJB
description The requested resource (/openejb/servlet/HelloOpenEJB) is
not available

Any ideas why?  I remember in the previous version of OpenEJB, I had to
place the HelloWorld.java and HelloWorld.class in the classes directory
instead of the acme directory.  Any ideas?  Thanks, Jeremy

-Original Message-
From: David Blevins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:09 PM
To: 'Tomcat Users List'
Subject: RE: java.lang.NoClassDefFoundError -- solved

This reply is for the archives.  Jeremy did finally get it running -- he
simply forgot to uncomment the openejb.home init-param after setting it.

The full install process


In Linux, it is literally just three steps:
 1. Copy the openejb_loader-0.9.1.war into the webapps dir
 2. Uncomment and set the openejb.home init-param in the web.xml
 3. Restart Tomcat

If anything goes wrong, it *has* to be step 2, in which case see above.

In Windows, it's the same process, but people constantly have problems
with the NT Service version of Tomcat not actually restarting.  Usually
you have to re-run the Tomcat NT Service install program to get it to
truly restart.  Don't know why, wish I knew an easier way.


How does this work?


The openejb_loader will do all the busy work for you.  It will add all
the required libraries from the OpenEJB directories into the appropriate
classloaders in Tomcat, all automatically and dynamically.  The only
thing you have to do is tell the loader where OpenEJB lives by setting
the openejb.home init-param in the web.xml.


It didn't work!?


Sounds simple, but we see a number of common mistakes:

 - Most people simply forget to uncomment it.  Check and double check
that.
 - Some set it to OPENEJB_HOME, which won't work. An actual path is
required.
 - Some set it to point to the OpenEJB /bin directory.
 - The rest are usually typos in the path.


Hope this helps everyone out.  As an archive-searcher, I always
appreciate finding emails like this.

If anyone has any ideas on making the integration process even easier, I
am all ears.

-David

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 12:44 PM
 To: Tomcat Users List
 Subject: Re: java.lang.NoClassDefFoundError
 
 
 Looks like you've using OpenEJB ;)
 The OpenEJB distro comes with a war file,  which looks like it's been 
 expanded to a context by your tomcat install. However, the war file 
 doesn't contain the required OpenEJB jar files (which 
 probably need to 
 be put in common/lib or server/lib).
 The class file for org/openejb/OpenEJB is in the 
 openejb-0.9.1.jar. Deploy that and you should be set (well, 
 this error will go away, at 
 least) .
 
 HTH,
 
 Jon
 
 
 Jeremy Whitlock wrote:
 
 Tomcat List,
 This might not be a Tomcat problem but I 
 imagine that 
 you might be able to help anyways.  Every time I start Tomcat, I get 
 this error:
  
 StandardContext[/openejb_loader-0.9.1]: Servlet
   
 
 /openejb_loader-0.9.1 threw load() exception

RE: java.lang.NoClassDefFoundError -- solved

2003-03-05 Thread David Blevins
Filip is correct, follow that advice.

Also, once you deploy the EJB's into OpenEJB, just leave them in the
OpenEJB beans directory.  Don't copy the contents of you EJB jar into
the webapps dir, ejbs are not simple libraries, they must stay in the
EJB container.  Putting them in the webapps classes dir or lib dir will
just cause classloader issues.  OpenEJB will make sure all your EJBs are
visible all your Servlets and JSPs at run time.

You can easily tell OpenEJB where to look for ejbs on your file system,
but again, this shouldn't be the classes or lib directories of your
webapp.

You could create a directory under your WEB-INF dir called ejbs, then
add that dir to your openejb.conf as such:

Deployments dir=/usr/local/share/development/openejb/WEB-INF/ejbs /

When you deploy, just leave of the -m or -c options as those will move
or copy the ejb jar into the OpenEJB/beans directory.  You want them to
stay where they are, which is your new WEB-INF/ejbs directory.

-David

 -Original Message-
 From: Filip Hanik [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 2:33 PM
 To: Tomcat Users List
 Cc: OpenEJB
 Subject: RE: java.lang.NoClassDefFoundError -- solved
 
 
 you can do it two ways,
 
 1. If you have the invoker servlet, you can access it that 
 way, but you need the full classname 2. Did you register your 
 servlet in web.xml?
 
 Filip
 
 -Original Message-
 From: Jeremy Whitlock [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 12:21 PM
 To: 'Tomcat Users List'
 Cc: OpenEJB
 Subject: RE: java.lang.NoClassDefFoundError -- solved
 
 
 David,
   I got OpenEJB working but I'm not able to run the 
 example.  I have created and compiled the 
 HelloBean.java,HelloHome.java,HelloObject.java and 
 HelloWorld.java. Here is the directory structure:
 
 /usr/local/share/development/openejb
   |
   |
   |_WEB-INF
   |
   |_lib
   |
   |_classes
   |
   |_META-INF
   |   |
   |   |_ejb-jar.xml
   |
   |_org
   |
   |_acme
   |
   |_HelloBean.java
   |_HelloBean.class
   |_HelloHome.java
   |_HelloHome.class
   |_HelloObject.java
   |_HelloObject.class
   |_HelloWorld.java
   |_HelloWorld.class
 
 I have setup Tomcat's server.xml to do this:
 
 !-- OpenEJB ExampleText Bean Context --
   Contect path=/openejb 
 docBase=/usr/local/share/development/openejb debug=0/
 
 Now, when I do 
 http://localhost:8080/openejb/servlet/HelloOpenEJB I get:
 
 HTTP Status 404-/openejb/servlet/HelloOpenEJB
 
 type Status report
 message /openejb/servlet/HelloOpenEJB
 description The requested resource 
 (/openejb/servlet/HelloOpenEJB) is not available
 
 Any ideas why?  I remember in the previous version of 
 OpenEJB, I had to place the HelloWorld.java and 
 HelloWorld.class in the classes directory instead of the acme 
 directory.  Any ideas?  Thanks, Jeremy
 
 -Original Message-
 From: David Blevins [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 1:09 PM
 To: 'Tomcat Users List'
 Subject: RE: java.lang.NoClassDefFoundError -- solved
 
 This reply is for the archives.  Jeremy did finally get it 
 running -- he simply forgot to uncomment the openejb.home 
 init-param after setting it.
 
 The full install process
 
 
 In Linux, it is literally just three steps:
  1. Copy the openejb_loader-0.9.1.war into the webapps dir
  2. Uncomment and set the openejb.home init-param in the 
 web.xml  3. Restart Tomcat
 
 If anything goes wrong, it *has* to be step 2, in which case 
 see above.
 
 In Windows, it's the same process, but people constantly have 
 problems with the NT Service version of Tomcat not actually 
 restarting.  Usually you have to re-run the Tomcat NT Service 
 install program to get it to truly restart.  Don't know why, 
 wish I knew an easier way.
 
 
 How does this work?
 
 
 The openejb_loader will do all the busy work for you.  It 
 will add all the required libraries from the OpenEJB 
 directories into the appropriate classloaders in Tomcat, all 
 automatically and dynamically.  The only thing you have to do 
 is tell the loader where OpenEJB lives by setting the 
 openejb.home init-param in the web.xml.
 
 
 It didn't work!?
 
 
 Sounds simple, but we see a number of common mistakes:
 
  - Most people simply forget to uncomment it.  Check and 
 double check that.
  - Some set it to OPENEJB_HOME, which won't work