RE: FW: Any known issues with Tomcat 3.2.1 and class loading ?
Before answering your question, two things: - This is a user question, please use the tomcat-user list, this list is for development of Tomcat. - Don't send HTML mails to the list. Now regarding your problem, this is probably the typical classloader problem so many run into. If the code which is instantiating the class was loaded using the classpath classloader it won't be able to access jar files in the WEB-INF/lib folder. For more info on the hierarchy of class loader see Java documentation and browse through the tomcat-dev list archives. You have to make sure that none of the classes you are putting into WEB-INF/lib is also in the lib folder of Tomcat, because that classloader has higher priority resulting in the wrong class being loaded. Also make sure none of the classes is in the lib/ext folder of the virtual machine, since that one has even higher priority over the other classloaders. Also make sure that none of the classes in the Tomcat lib folder is being used to instantiate the classes you need (that is a class in the Tomcat lib folder is invoked to create an object who's class type is in the WEB-INF/lib folder; it won't find it). I hope this is clear enough. As far as I can see from the discussion on this list this will be mostly fixed in the 3.3 version of Tomcat by having a special isolated classloader for the servlet engine, and this problem should also be non-existent in Catalina (4.0) for the same reason. Gummi Haf -Original Message- From: Hawkins, Keith (Keith) [mailto:[EMAIL PROTECTED]] Sent: 9. maĆ 2001 19:10 To: [EMAIL PROTECTED] Subject: RE: FW: Any known issues with Tomcat 3.2.1 and class loading ? No, they are not .zip files. They are .jar files. Specifically jndi.jar, ldap.jar and providerutil.jar, which are provided by Sun for accessing LDAP databases via JNDI.I was able to get the Tomcat to load these classes but only by editing the wrapper.class_path property in the wrapper.properties config file. But I was under the impression that simply putting the Sun jar files in the WEB-INF/lib directory along with my servlet.jar file would be sufficient and eliminate the need to edit wrapper.properties. Am I off base here? Is there some limitation to having more than one jar file in WEB-INF/lib? -Keith -Original Message- From: Kellie Miller [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 2:15 PM To: [EMAIL PROTECTED] Subject: Re: FW: Any known issues with Tomcat 3.2.1 and class loading ? I have had some success with renaming .zip files .jar (your mileage may vary). cheers, Kellie -Original Message- From: Wildeboer, Tonnis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 12:05 PM To: '[EMAIL PROTECTED]' Subject: RE: Any known issues with Tomcat 3.2.1 and class loading ? If they are .zip files you'll have to add them to the CLASSPATH yourself. --Tonnis -Original Message- From: Hawkins, Keith (Keith) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 8:24 AM To: [EMAIL PROTECTED] Subject: Any known issues with Tomcat 3.2.1 and class loading ? Dear Developers: Are there any known issues with class loading under Tomcat 3.2.1? My situation is that classes in jar files that reside in the WEB-INF/lib directory for my servlet fail to load when accessed under Tomcat. Yet the classes load fine when accessed via test programs that use the very same jar files and call the same servlet methods. Seems like Tomcat is not working as advertised with respect to automatically adding jar files from servletdir/WEB-INF/lib to the classpath. Can anyone confirm whether this is a known issue? Thanks, Keith Kellie Miller, Advanced Computing Technologist Boeing PhantomWorks, Math Computing Technology, Huntsville Center Email: [EMAIL PROTECTED] Phone: 256-461-2604 Fax: 256-461-3239 Post: PO Box 240002, MC JW-75, Huntsville, AL 35824-6402 winmail.dat
RE: Servlet ClassLoader
| You're right about the normal delegation model for Java2. However, the Servlet | 2.3 Spec (Proposed Final Draft) gives a servlet container the option to "look | before delegating" -- see Section 9.6.2. Tomcat 4.0 does this. I've been wondering quite some time: how can this be a "option"? I find that very disturbing! Wouldn't that make tons of portability problems? The classloading isn't exactly something that's the easies thing with Java to grasp, and when things change from container to container, thing start to get really frustrating.. | The intention of this language is that you can have version X of a library | installed as a shared resource, and version Y of the library available in | WEB-INF/lib. In the 2.3 model, Y will override X. In the standard delegation | model (i.e. Tomcat 3.2) you'd get the classes from X no matter what you did. Yes, and this sounds much more sensible. Why not take away the "option" part of that section?! I know that you don't personally have the sole responsibility for that spec, but I just wondered why it is like this! I agree! This is a very intuitive approach for loading classes in webapps, and should be specified without options. I don't know the community process that well, and I don't know the exact status of 2.3, but is it too late to remove that option and make it mandatory? Reg, Gummi Haf
RE: Servlet ClassLoader
Am I just screwed or is there some cool trick that I am missing? As far as I know, this is not possible. I have another question, which has been nagging me for a while: Why does the class loader for a web-app "see" the classes in the lib folder of the servlet engine (or the classpath of the java engine). For example if a servlet engine is using an XML parser (say Xerces, some old version like 1.0.x) and includes the SAX and DOM interfaces, but only version/level 1. Now my cool web-app wants to use Xerces 1.3.0 and take advantage of the new version/level 2 of the interfaces, I have to fiddle with the lib folder of the servlet engine (something I don't want to do), and even in this example I'm doomed, because interface changes in Xerces between these two versions make them incompatible! (I know Tomcat does not use Xerces, this was just a fictious example) Now I pose the same question as Arthur Ash: Am I just screwed or is there some cool trick that I am missing? If I'm right about the problem I suggest separating the classloaders for the servlet engine on one hand, and the web-apps on the other hand, using a common classloader for the servlet interface and other common servlet stuff. Is this possible? Regards, Gummi Haf
RE: Servlet ClassLoader
I hope you don't mind me answering your e-mail to the list, I think this deserves some discussion. This is exactly what we've been doing, but it requires fiddling with the libs of the servlet engine, something I don't want to do! I want to be able to separate the libs of the servlet engine from the libs of my web-app, is it possible? The whole idea behind web-apps collapses if the deployer needs to do some exercises with the jars of the servlet engine! Gummi Haf From: Jim Rudnicki [mailto:[EMAIL PROTECTED]] You can do it, but it requires great care. The answer is to separate out the XML jars. Notably, open tomcats jar's and remove the old org.w3c interfaces. Place the newer org.w3c stuff in a separate jar in the tomcat lib folder. The above will do what you asked because the new interfaces are backwards compatible (almost beware Xerces 1.3.2). Similar problems exist and are solved the same way. For example, the Xerces distribution from Enhydra contains their copy of the sun.jaxp classes. I had to open their jar, strip out sun.jaxp, and org.w3c and rejar the seperate parts. Now with three jars: EnXerces.jar, EnW3c.jar, and EnJaxp.jar you can mix and match. good luck, you'll need it Jim
RE: [OT] AB on Windows?
I've tried these, but they don't offer the simplicity of AB. Does anyone know why AB is only shipped with Apache on UNIX? (Again, sorry for the off-topic question) -Original Message- From: Scott Sanders [mailto:[EMAIL PROTECTED]] Why not use JMeter at java.apache.org? Or, Microsoft has one that I have been able to use in a limited fashion. But since theire DNS is down, Google says the URL is http://webtool.rte.microsoft.com/download.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[OT] AB on Windows?
Hi all! I'm sorry to bring this off-topic matter up here. Does anyone know about a tool similar to ab for Windows or better yet, ab for Windows? I need the simplicity and the clear results ab gives me, but don't have access to a Linux box in the test center. Regards, Gummi Haf -- Gudmundur Hafsteinsson - [EMAIL PROTECTED] Dimon Software - www.dimonsoftware.com "... 'cause that's what tiggers do the best!" - Tigger -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Forming an opinion
How about splitting this list into two lists: tomcat-dev for those interested in seeing the development of Tomcat advance and tomcat-flames for those arguing all the time about nothing relevant ;-) Regards, Gummi Haf -- Gudmundur Hafsteinsson - [EMAIL PROTECTED] Dimon Software - www.dimonsoftware.com "... 'cause that's what tiggers do the best!" - Tigger -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Saving sessions across tomcat instances
This would be a great addition for Tomcat. (AFAIK distributed sessions are not supported in Tomcat) When you talk about session replicating, have you thought about the method to use for it? Regards, Gummi Haf -- Gudmundur Hafsteinsson - [EMAIL PROTECTED] Dimon Software - www.dimonsoftware.com "... 'cause that's what tiggers do the best!" - Tigger -- [EMAIL PROTECTED] 16.12.2000 23:41 Please respond to tomcat-dev To: [EMAIL PROTECTED] cc: Subject:Saving sessions across tomcat instances Hi all, I'm wondering whether tomcat can store session information in different tomcat instance? IMHO the answer is NO. Therefore I would like to share my thought on: Saving sessions across tomcat instances. A month ago I have posted patch to allow tomcat load balancing when working with no cookies. This patch is the basic block to my thoughts on creating infrastructure to allow moving the session object between tomcat instances. The patch I posted added the tomcat 'name' (jvmRoute) to the sessionID, so if you are working with load balancing configuration you should see the tomcat name appear at the end of the seesionID. Mod_jk (and jserv) use this trail to forward the request to the right tomcat instance. Allowing tomcat to replicate its session to another tomcat will allow real Tomcat redundancy and high-availability. My thoughts are to build the system in the following steps: 1. SessionManager to support dump and restore. a. SessionManager will dump its session into file while taking tomcat down. (Finalize ?? or SessionSerializer) b. Arrange SessionManager to restore its sessions while coming up. (Constructor ?? or SessionSerializer) 2. SessionManager to support merge. a. Allow SessionManager to merge its sessions store with another store got from outside. This will allow one SessionManager to send its sessions to another SessionManager periodically. This will be done by extending the cleanup process to send all sessions to the other Tomcat. Periodic run intervals will come from configuration file. 3. Sending only new session to other tomcat a. The periodic process will send to other tomcat only session created/touched from last run. b. This will be done for session that access time is newer than the last cleanup run, and older than request processing period, lets say 3 seconds (to make sure the servlet is not changing the object now). Time variables will come from configuration file. 4. Read replication configuration from configuration file. a. Allow to define which tomcat sends session information to which tomcat. b. Configure mod_jk to send requests to second tomcat if first one is not responding. I'm going to implement this against tomcat 3.3 (checking out Jakarta-tomcat, not tomcat_32 from CVS. Am I right? Or there is tag for 33?) I would like to get you thoughts whether this is required or not, any implementation hints, or any other requests before I'm getting into implementing this. Please let me know what you think. Shai Fultheim Chief Technology Officer BRM Seed E-Mail: [EMAIL PROTECTED] Mobile: 972-53-866-459 Office: 972-2-5891-459