Sweet, Yaa, I was sure I had all the .jar's in the LIB path, so the error *Log4J* is no way justified.
Thanks for your input again David, otherwise I would have ran the servlet with all permutations and combinations. David, would you suggest removing the openejb.xxx.jar from systemclasspath.sh of tomcat. ? Waiting desperately when it will be a breeze, to integrate *openejb* and tomcat. My *todo wish list* is struts->openejb->tomcat. Please advise. Regards Gopal --- David Blevins <[EMAIL PROTECTED]> wrote: > Hi all, > > It looks like adding OpenEJB to the system classpath > just causes all the > required libraries to be searched for in system the > classpath as well, > which gives us more class visibility problems due to > Tomcat's > classloading architecture. This seems completely > obvious to me know, > I'm surprised I missed it. > > After some more fighting, I got OpenEJB and Tomcat > running smoothly. > But the whole process requires too much jar copying > and setup for my > taste. I'm cooking up a little import utility that > will magically pull > OpenEJB into the VM and take care of all the details > for you. > > That shouldn't take too long. So, for now, don't > sweat it. Life with > Tomcat should be a breeze very shortly. > > -David > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] > On Behalf > > Of Gopal Mukkamala > > Sent: Wednesday, October 09, 2002 3:03 AM > > To: David Blevins; 'Marcello Schmidt' > > Cc: [EMAIL PROTECTED] > > Subject: RE: [OpenEJB-user] Tomcat :EJB -- Found a > VM Bug > > > > > > > > Hi , > > Thanks a zillion for the response. > > > > Nice Research David. > > > > Noted few points there. > > > > I hacked setclasspath.sh in tomcat and it seemed > to > > work at least for the Resource. > > > > > > ===>Another Error though: > ======================================= > > java.lang.NoClassDefFoundError: > > org/apache/log4j/Priority > > at org.openejb.OpenEJB.init(OpenEJB.java:150) > > at org.openejb.OpenEJB.init(OpenEJB.java:130) > > at > > > org.openejb.core.ivm.naming.InitContextFactory.initializeOpenE > > JB(InitContextFactory.java:100) > > at > > > org.openejb.core.ivm.naming.InitContextFactory.getInitialConte > > xt(InitContextFactory.java:71) > > ======================================= > > > > This is the call to the servlet : > > > http://desistar.no-ip.org:8080/examples/servlet/CallEJB > > > > > > This is the code : > http://desistar.no-ip.org:8080/examples/callejb.txt > > > > Any thoughts. > > > > Regards > > Gopal > > > > --- David Blevins <[EMAIL PROTECTED]> wrote: > > > Hey Guys, > > > > > > I'm stepping through the whole process. I also > get > > > the > > > java.net.MalformedURLException: unknown > protocol: > > > resource > > > > > > This is extremely, *extremely*, strange as the > > > java.protocol.handler.pkgs is definitely set. > And as I write this > > > very sentence, something occurs to me... > > > > > > THIS IS A STUPID CLASSPATH PROBLEM > > > > > > Darn it. Ok, let me go check for sure.... Ok, > yep, > > > there it is. If you > > > happen to have the JDK 1.3.1 source handy, open > up > > java.net.URL and go > > > to line 923, you'll see this: > > > > > > cls = Class.forName(clsName); > > > > > > The java.net.URL class expects all protocol > handlers > > > to be in the system > > > level classpath, but Tomcat doesn't put anything > > > there it uses a "child" > > > classloader that the VM can't see. This > explains > > > another problem > > > someone was having making an OpenEJB Avalon > block, > > > Avalon also uses > > > their own classloader to load libraries. > > > > > > The question that immediately comes to my mind > is > > > "Why doesn't the same > > > problem occur when the JVM tries to create the > JNDI > > > InitialContectFactory?" Those are also > factory-type class names > > > specified as properties that must be loaded by > the > > > JVM and instantiated. > > > Let me take a look and see why it works > there.... > > > Ok, there it is. So, > > > very inconsistent! Look at this, this is how > they > > > (Sun) load JNDI > > > factories: > > > > > > ClassLoader cl = > Thread.currentThread().getContextClassLoader(); > > > return Class.forName(className, true, cl); > > > > > > This is in > com.sun.naming.internal.VersionHelper12 > > > in the JNDI source > > > code -- you have to download the J2EE 1.3 source > > > code to get that file. > > > So, here they (Sun) are not using the system > > > classpath to load the > > > factory but using whatever classloader the > > > application may be using. > > > Obviously this is much smarter. > > > > > > So to sum up: > > > -- When loading URLStreamHandler > implementations, > > > Sun looks for the > > > class in the system classpath. Tomcat doesn't > load > > > anything in the > > > system classpath, so the URLStreamHandler can't > be > > > found and you get a > > > misleading exceptions saying that the protocol > is > > > unknown. > > > > > > My second point: > > > -- IMO, this is a VM bug. Sun should be > loading > > > java.net.URLStreamHandler implementations using > the classloader > > > associated with the thread. This is exactly > what > > > they do for loading > > > JNDI InitialContextFactory implementations and > (now > > > that I think of it) > > > is also what they do in the java.io package for > > > object serialization. > > > > > > Action: > > > -- I'm definitely going to file a VM bug > report. I > > > know of an easy > > > workaround for this and will put that in right > away. > > > That will ship > > > with OpenEJB 0.8.4. Looks like that release > might > > > come out a little > > > sooner that expected. > > > > > > In the meantime, you can either: > > > 1. Hack Tomcat's setclasspath.sh or > > > setclasspath.bat to include the > > > openejb-0.8.3.jar in the classpath. This jar > holds > > > the class Sun > > > expects to be in the system classpath. > === message truncated === __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ http://OpenEJB.sf.net OpenEJB-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/openejb-user