On Mon, Jun 06, 2005 at 11:37:27AM +0200, Jacek Laskowski wrote: > Jimmy Ray wrote: > >I was trying to follow the hello bean example. I have > >openejb 0.9.2 deployed with Tomcat 5.0.28 On Win2k > >with Sun JDK 1.4.2. I have tested the openejb config > >Ok and the bean is deployed OK with the "Hello" JNDI > >name. This is running on my local desktop machine, so > >I am using the 127.0.0.1 IP. > > > >When I try to invoke it from a app executing in my > >Eclipse debugger, I get the error: > > > >javax.naming.NoInitialContextException: Cannot > >instantiate class: > >org.openejb.client.RemoteInitialContextFactory [Root > >exception is java.lang.ClassNotFoundException: > >org.openejb.client.RemoteInitialContextFactory] > > Hi, > > It happens when Tomcat (classloaders) can't access the class and load > it. Since you're using the version that has some issues with > classloading I'd recommend building OpenEJB from sources. See > http://www.openejb.org/cvs.html for up-to-date information on how to > check out the sources and build OpenEJB. >
The 0.9.2 code should work fine with 5.0.28 as they didn't change the classloading structure in Tomcat till 5.5.x. I think the 5.0.x branch is still the same as 4.x as far as classloading goes. Try using the little openejb webapp to figure out what could be going wrong. Go to this url and click the link to test the setup: http://localhost:8080/openejb-loader-0.9.2/ That will try setup by setup to varify that everything is setup correctly. I swear we used to have this in the docs on the website, but I don't see it anymore. We totally should cut a 1.0 and it's way past pathetic that we haven't, but at least give that a try for now. The OpenEJB 0.9.2/Tomcat 4.x combo worked really well for a lot of people and still should till 5.5.x where they threw away their own class loader code and opted to go back to using Sun's URLClassLoader. Anyway, give that a shot for now and we'll try to get a 1.0 out like in a couple days. Jacek as volunteered to put one together. I'll help out on that as well. We'll need some people to pound on it too before we can call it good. -David
