WebApp: Error 404 - Strange goings on!
Hi, I have recently managed to combine Apache 1.3.20, SSL and Tomcat4.0.1 together using a self compiled DEAPI web_app connector. After much pain, everything seemed to be working very well. However, I am getting the following problem: When I start Tomcat and then Apache everything works really well - the sun is shining and the birds are singing. However, when I come in the following morning (it might happen quicker than this) dark clouds have gathered and the servlet pages won't service properly. Sometimes they don't show up, sometimes they half show up, sometimes missing images, css files, and then sometimes I get the following: WebApp: Error 404 (File: wa_request.c Line: 197) Web Application not yet deployed. This appears on my browser. Sometimes it works fine - this happens for everyone using the system. Has anyone got any ideas what could be going on? On reboot it works well for another while. It runs with extra JVM memory 32Mb and 48Mb max and I print out the memory at each servlet and there's plenty (garbage collect if it gets low anyway). I use SSL with name based Virtual Hosting (I know! but it works for the one SSL site I need and that's fine) - everything works until it's left alone for a while. Has anyone any suggestions on what could be causing it please? Thanks in advance, Dave -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Someone please explain Processes
Hi, Recently my system (SUSE7.2, running Tomcat4.0b6, Oracle8.1.7) has come crashing down around it's knees a few times, completely locking out all input, even terminals (gasp horror - restart button needed) - needless to say it's a big cause of concern. As a result of the problems I've been looking at the various programmes running on the machine using top and other such packages. The line of concern is the following one: root 3105 3032018:28 pts/300:00:00 /usr/java/jdk1.3.1/bin /i386/native_threads/java -Xms12m -Xmx24m -classpath ./../bin/bootstrap.jar: /usr/local/java/lib/tools.jar:/home/spiderma/webapps/connection/WEB-INF/ classes -Dcatalina.home=./.. org.apache.catalina.startup.Bootstrap start Other system tools indicate that this is using approximately 2.7MB of system memory. This wouldn't be such a concern except there are *43* of these processes. However, when I shut down Tomcat I barely free 32MB so it doesn't seem to be a huge problem. What I'm wondering is - should there be loads of these processes? I am using a Connection pool (Karl Moss) but it shouldn't be managing anything near like 43 connections and I'm pretty confused, but this could be it? The system runs fine most of the time and maybe it's not even this but I'd love to get the processes thing explained, if only to keep out system admin happy :) Thanks in advance, Dave -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Sharing Authorization Between TC4 + Apache
I am currently working on a project where users log into a Tomcat servlet-based system, which does numerous wonderful things :) However, one additional thing I would like to implement is to allow users authorized through the servlets (using sessions etc.) to be also authorized for various apache secure pages. There are numerous reasons why those pages must remain on Apache and I haven't got TC4 and Apache linked as yet (not sure if it's widely done as yet). Is there any way of passing htpasswd authorization from a servlet to Apache or any clever way of doing it? Essentially, I would like the htpasswd dialogs to be transparent if the correct person is logged into the servlet system. Any ideas please? Dave
Tomcat 4.0 Troubles - Bad Major Version Number
Hi, Having already installed Tomcat3.1 and Tomcat3.2, linking them with Apache etc. I decided I was ready for Tomcat4.0. Unfortunately, I was wrong firstly I had tarring problems which were solved by downloading gnutar and I was over that hurdle. Before I modified anything I decided to try ./startup.sh and I'm getting this error: Error loading class org.apache.catalina.startup.Bootstrap: Bad major version number Any ideas what this means? I haven't even started breaking it with bad config files yet :) Thanks, David Molloy PS: Also, any pointers to information about Version 4.0 installs/usage would be great also as I can't see to track down much (and understandably so) Config: Solaris 7, Tomcat4.0b1 (from binaries on site), haven't linked with Apache or anything - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: reloading..
Hi, I have something similar in place but it's working pretty much. Set up one web application area with all your database classes, ConnectionPool etc. Make this area non-class reloadable and put a load-on-startup on the pool. Now assuming you make static references to the ConnectionPool then you can reference it from other web applications. All the while you can develop in these applications with class reloading enabled (as you are not directly affecting your connection pool anymore) and it should work I was very happy when I got this all working but as it happens I still need to restart Tomcat after I make changes. You'll find if you use sessions to store classes (in my case I store the User class in a session variable called theUser) there seems to be a problem with reloading. If anyone has anything to add to this I'd be grateful but I'd asked it before. Seemingly when you cause a class reload the classes reload but the sessions don't invalidate - so when you do a req.getSession(true) you'll find that it grabs the old one and when you try to grab theUser it will give a ClassCastException. As another person commented before - it seems like a feature but it's more like a bug. Dave -Original Message- From: Alistair Hopkins [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 4:58 PM To: [EMAIL PROTECTED] Subject: RE: reloading.. give up, restart tomcat. i found that to be the only sureproof way :-( -Original Message- From: Endre Stølsvik [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 4:49 PM To: [EMAIL PROTECTED] Subject: reloading.. I'm going a bit crazy soon, so any help here would be much appreciated! I have a DB pool. I instantiate this class as a "connection holder", and the pool is a static field in this class. I also have a static int that I increase each time I make a new of these connection holders, and decrease each time they get garbage collected. I Initialize this from a servlet (Startup.java) that I've defined as "load-on-startup". This goes just fine, and everything is merry. When I recompile my servlets, beans and helpers (rm all .class files, and jikes the whole thing), I apparently have "lost" this pool somewhere. I get a nullpointer exception at the point where I try to reference it. The counter I was talking about has also been reset to zero. I then tried to put a call to the initialization in the "doGet()" of the Startup.java, so that I can call it when I need it. This is when things get annyoing. I now (sometimes!) apparently get two different "contexts" of servlets. This because the call to Startup.java and this other servlet gives me _different_ values from this counter. So the Startup.java is happy, because the pool is working fine there, but my main servlet hasn't got the same class or whatever. As I've understood it, this is because I now have two different classloaders loading these classes, and in reality, two enirely different contexts. Is this really the way it's meant to be, or am I totally doing something wrong? Is there _anything_ I can do from within the servlets to just get rid of ALL classes and start all over if tomcat notices a "reload-situation"? If I have to go to the tomcat source, where should I start?! Any help would much appreciated. -- Mvh, Endre
Sessions and Class Reloading
Hi, In short: What happens to session variables when you cause class reloading in a webapp? In full: I'm currently writing a system where the user must always stay logged in. When the user logs in it checks the database, pulls that users info and creates a 'User' for that person. This User class is placed in the session: HttpSession session = req.getSession(true); session.putValue("theUser", user); Whenever a user tries to access a new servlet it checks first whether that user is logged on and secondly whether they have authorization for the servlet. This used to work on JServ for me - when you reloaded a zone the session variables get invalidated and when you do the req.getSession(true) it simply loaded a new session and the person logged in again - fine. What seems to be happening now is that the session is hanging around but is 'corrupt' - when I modify a class and don't restart tomcat a problem occurs when you try this: HttpSession session = req.getSession(true); user = (User) session.getValue("theUser"); What occurs now is that you get a ClassCastException on the second line here, even though it is correct. The only way around this is to restart the tomcat server every time I make a change to the webapp. Does anyone know if this is a bug, whether there is a way around it or exactly what goes on? Any help would be great. Dave Molloy PS: Using Tomcat 3.1 Release on Solaris 2.7 standalone.
RE: Netscape can't find css
-Original Message- From: Philipp Zuderell [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 16, 2000 9:37 AM To: [EMAIL PROTECTED] Subject: Netscape can't find css Hi all! I have written a servlet that uses a StyleSheet to produce an HTML Page. While the app works fine in IE5, NS4.75 returns the following error Message: Error: 404 Location: /examples/servlet/D:/jakarta-tomcat/webapps/examples/Web-inf/classes/spc.css I use absolute paths everywhere in the program, and they all work (with NS, too) except this one. Any help will be appreciated. Thanks Philipp
RE: Netscape can't find css
Apologies if a blank reply went before this one - bloody machine is acting bitchy. Two things I can think of, either of which might be useful or not. 1. I seem to recall there being a problem with Netscape and CSS file locations. IE and Netscape handle relative pathing to CSS files differently so this can cause a problem similar to this. However you use absolute paths so it's not likely this. 2. Try putting the css file into /examples, as opposed to the classes directly. It should be directly readable from the pages and it's not a class so it shouldn't be in there, as far as I can tell. Dave -Original Message- From: Philipp Zuderell [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 16, 2000 9:37 AM To: [EMAIL PROTECTED] Subject: Netscape can't find css Hi all! I have written a servlet that uses a StyleSheet to produce an HTML Page. While the app works fine in IE5, NS4.75 returns the following error Message: Error: 404 Location: /examples/servlet/D:/jakarta-tomcat/webapps/examples/Web-inf/classes/spc.css I use absolute paths everywhere in the program, and they all work (with NS, too) except this one. Any help will be appreciated. Thanks Philipp
Oracle and Tomcat
Hi, I've been through all this before with JServ and I'm working on Tomcat now. I'm trying to get JDBC connections going with Tomcat (I've got a connection pool) and I get the standard: java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path at java.lang.Throwable.fillInStackTrace(Native Method) etc.. This is the same as I got in JServ and it is due to the LD_LIBRARY_PATH not being set correctly. I've a little confused in Tomcat how this should be set though... At the top of the tomcat.sh file I added the lines... LD_LIBRARY_PATH=/oracle_sw/app/oracle/product/8.1.5/lib echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ORACLE_HOME=/oracle_sw/app/oracle/product/8.1.5 ORACLE_SID=OAK DISPLAY=oak.hostname.ie:0.0 Also in the tomcat.properties file I added in the lines # An environment name with value passed to the JVM # Syntax: wrapper.env=[name]=[value] (String) # Default: NONE on Unix Systems # SystemDrive and SystemRoot with appropriate values on Win32 systems wrapper.env=LD_LIBRARY_PATH=/oracle_sw/app/oracle/product/8.1.5/lib wrapper.env=ORACLE_HOME=/oracle_sw/app/oracle/product/8.1.5 wrapper.env=ORACLE_SID=OAK wrapper.env=DISPLAY=oak.hostname.ie:0.0 However none of these seem to have any effect when I kill Tomcat and start it again. Any ideas would be greatly appreciated... I presume I am just setting the environment variables wrong since I have the exact same stuff working concurrently with JServ. Thanks. David PS: System is Oracle8.1.5, Solaris7, Tomcat3.1 Release
RE: APXS mod_jserv.so
Hi, Just for reference on the solving of the problem for archives etc. Use the documented command: apxs -c *.c -o mod_jserv.so This will compile all of the files into .o files. Get rid of the file autochange.so if it occurs. Then manually do the ld using: ld -G autochange.o mod_jserv.o jserv_wrapper_win.o jserv_wrapper_unix.o jserv_wrapper.o jserv_watchdog.o jserv_utils.o jserv_status.o jserv_protocols.o jserv_mmap.o jserv_image.o jserv_balance.o jserv_ajpv12.o jserv_ajpv11.o autochange.o -o mod_jserv.so Then add the module using: apxs -i -a mod_jserv.so Do you configtest on Apache, add the Include line (for tomcat.conf) and you're sorted. Or at least I am at the minute - statics/jsps and servlets working, the examples anyway. Nice product. Thanks to Udayini Pendyal and Joseph Carew for pretty much solving this for me. Dave -Original Message- From: David Molloy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 01, 2000 4:07 PM To: [EMAIL PROTECTED] Subject: RE: APXS mod_jserv.so Hi Udayini, Thanks - you highlighted what the problem was alright. The command as displayed in the user guide is unclear. It refers to apxs -c *.c -o mod_jserv.so whereas it should really be: apxs -c mod_jserv.c -o mod_jserv.so It's fairly obvious when I look back on it but it'll probably catch a few more apxs virgins out :) Thanks again - I have the mod_jserv.so file now. Dave -Original Message- From: Udayini Pendyal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 01, 2000 3:56 PM To: [EMAIL PROTECTED] Subject: Re: APXS mod_jserv.so Hello David, I am not very familiar with make related things but it seems like your first -o flag has asked the output file to be called autochange.so. I see that this file is indeed being created. So, maybe you can rename the autochange.so to mod_jserv.so and use it. Alternative could be that the argument to the first -o can be changed from autochange.so to mod_jserv.so. Regards Udayini David Molloy wrote: Hi, I am attempting to install Tomcat together with Apache1.3.14 and I can get them working independently. My problem lies in obtaining the Jserv Module mod_jserv.so I've followed the instructions in the User Guide doing the: apxs -c *.c -o mod_jserv.so It goes off and does it's thing and the log is below which looks pretty good (apart from the warning at the end which seems minor). However it doesn't result in a mod_jserv.so file that I can put into my libexec directory in Apache. It makes all of the object files no problem and the resulting directory is listed below the log. Does anyone know what I'm doing wrong - I'm not very familiar with apxs or .so files so I'm guessing quite a bit but I'm fairly sure that from the user guide I should be getting the file as it doesn't really mention anything else. Any ideas would be greatly appreciated - thanks. Running Solaris 7, Apache 1.3.14, Tomcat3.1 Release David Molloy PS: Also tried searching for a version by download but couldn't find one. oak# apxs -c *.c -o mod_jserv.so gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c autochange.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_ajpv11.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_ajpv12.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_balance.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_image.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_mmap.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_protocols.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_status.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_utils.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_watchdog.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_wrapper.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_wrapper_unix.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c jserv_wrapper_win.c gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/usr/local/apache_1.3.14/include -c mod_jserv.c ld -G -o autochange.so mod_jserv.o jserv_wrapper_win.o jserv_wrapper_unix.o