>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 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)
> >  
> >
> >>             at
> >>    
> >>
> >org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> >  
> >
> >>             at
> >>    
> >>
> >org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> >  
> >
> >>             at java.lang.reflect.Method.invoke(Native Method)
> >>             at
> >>    
> >>
> >org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> >  
> >
> >>----- Root Cause -----
> >>java.lang.NoClassDefFoundError: org/openejb/OpenEJB
> >>             at
> >>    
> >>
> >org.openejb.loader.EmbeddedLoader.load(EmbeddedLoader.java:58)
> >  
> >
> >>             at
> >>    
> >>
> >org.openejb.loader.EmbeddingLoader.load(EmbeddingLoader.java:84)
> >  
> >
> >>             at
> >>    
> >>
> >org.openejb.client.LocalInitialContextFactory.getInitialConte
> xt(LocalIn
> >i
> >tialContextFactory.java:65)
> >  
> >
> >>             at
> >>    
> >>
> >javax.naming.spi.NamingManager.getInitialContext(NamingManage
> r.java:660
> >)
> >  
> >
> >>             at
> >>    
> >>
> >javax.naming.InitialContext.getDefaultInitCtx(InitialContext.
> java:241)
> >  
> >
> >>             at
> >>    
> >>
> >javax.naming.InitialContext.init(InitialContext.java:217)
> >  
> >
> >>             at
> >>    
> >>
> >javax.naming.InitialContext.<init>(InitialContext.java:193)
> >  
> >
> >>             at
> >>    
> >>
> >org.openejb.loader.LoaderServlet.init(LoaderServlet.java:82)
> >  
> >
> >>             at
> >>    
> >>
> >org.apache.catalina.core.StandardWrapper.loadServlet(Standard
> Wrapper.ja
> >v
> >a:934)
> >  
> >
> >>             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)
> >  
> >
> >>             at
> >>    
> >>
> >org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> >  
> >
> >>             at
> >>    
> >>
> >org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> >  
> >
> >>             at java.lang.reflect.Method.invoke(Native Method)
> >>             at
> >>    
> >>
> >org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> > 
> >I know that Tomcat doesn't use the CLASSPATH but it appears that the 
> >error is because a class can't be found.  Can someone help 
> me resolve 
> >this?  Thanks,
> > 
> > 
> >Jeremy Whitlock --- MCP/MCSA
> >IT Manager for Star Precision, Inc.
> >Phone:  (970) 535-4795
> >Metro:  (303) 926-0559
> >Fax:  (970) 535-0780
> >Metro Fax:  (303) 926-0559
> >http://www.starprecision.com
> > 
> >
> >  
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to