Tomcat Upgrade & Migration Questions
I am currently in the middle of an upgrade from Apache (2.2)/Tomcat (5.5.16) to Apache (2.2)/Tomcat (6.0.24). The JVM is being upgraded from 1.5.0_09-b01 to 1.6.0_22-b22. The new host servers will be RedHat 6.2. I would like to use the default application installation paths used by the RPMs. However, I would like the user code base(s) to exist in a separate partition. These servers will be hosting multiple separate java applications. Currently Apache and Tomcat use mod_jk as the connector. I am hoping for some advice that will help me with the server/Tomcat/Apache configuration. I am specifically interested in Tomcat configuration advice, or direction. I would like to get some clarification on the following questions: How can I configure Tomcat to allow each individual application (JVM) to be restarted independently? - We currently do this with separate CATALINA_BASE directories, and separate startup/shutdown scripts. I’m not sure if that is the cleanest way. What method would best allow Apache to serve static content, and Tomcat to server java based dynamic content? - I’m assuming this will depend on the connector used. Which connector (mod_jk, mod_proxy_ajp, mod_cluster) should be used? - I have heard conflicting reports about mod_jk being deprecated or not. - I have seen benchmarks with mod_proxy_ajp outperforming mod_jk significantly. - I don’t think we currently need the clustering functionality of mod_cluster, but may with future JBoss installations. Thanks in advance for your suggestions.
RE: how to setup Tomcat 6.x fixes
Thank you Mark. I appreciate it. Kirk -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, June 04, 2009 4:24 AM To: Tomcat Users List Subject: Re: how to setup Tomcat 6.x fixes Meline, Kirk Alan. (ARC)[PEROT SYSTEMS] wrote: > Hi > > Where can I get instructions on setting up our Tomcat server with the new > fixes? I have downloaded the new fixes but cannot see any instructions on > the web site. If you mean "How do apply the fixes for the security issues fixed in 6.0.20 to my current Tomcat instalation?" then the answer is you need to do a clean 6.0.20 installation and transfer you webapps and configuration files across to this new installation. There is no official mechanism provided to "patch" a previous version. There are ways you can try and do this but they are reasonably risky and not recommended. Mark > > > > Thanks > > Kirk > > > Kirk Meline > Systems Administrator > NASA Ames Research Center > Mail Stop 213-7 > Moffett Field, CA 94035-1000 > 1-(650) 604-6868 Office > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how to setup Tomcat 6.x fixes
Thank you Chuck for the advise. I was told to put the project on hold for now but can use your instructions if needed. Thanks Kirk -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, June 03, 2009 8:27 PM To: Tomcat Users List Subject: RE: how to setup Tomcat 6.x fixes > From: Meline, Kirk Alan. (ARC)[PEROT SYSTEMS] > [mailto:kirk.mel...@nasa.gov] > Subject: RE: how to setup Tomcat 6.x fixes > > I have download all the files from the windows section of > http://tomcat.apache.org/download-60.cgi#6.0.20 O.k., you went a bit overboard, but there's no damage; I'd recommend just the Core .zip file for now. The Windows Service Installer will also work, but is a bit more difficult to use for people just getting started or wanting to run multiple Tomcats on the same box. Unlike the .exe download, the .zip lets you install Tomcat wherever you want to, and includes .bat scripts for running Tomcat from a command prompt. You can also install it as a Windows service with the .zip's service.bat script if and when you're ready to do that. Just unzip the download to whatever directory is convenient for you, and keep reading. > I just would like to know how to install them while making > sure I do not cause problems on apache. Not sure what you mean by "cause problems on apache". Do you already have some other version of Tomcat installed? Do you already have httpd running on the system of interest? If there are potential conflicts with existing installations, you will want to edit the conf/server.xml file to change the port numbers to insure the version under test won't bother the current ones. The port numbers of interest are given in the and elements. Find out what ports are in use (netstat will show you), and make sure your test copy of Tomcat doesn't try to use the same ones. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how to setup Tomcat 6.x fixes
Chuck I have download all the files from the windows section of http://tomcat.apache.org/download-60.cgi#6.0.20 I just would like to know how to install them while making sure I do not cause problems on apache. Thanks Kirk Meline Systems Administrator NASA Ames Research Center Mail Stop 213-7 Moffett Field, CA 94035-1000 1-(650) 604-6868 Office -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, June 03, 2009 3:24 PM To: Tomcat Users List Subject: RE: how to setup Tomcat 6.x fixes > From: Meline, Kirk Alan. (ARC)[PEROT SYSTEMS] > [mailto:kirk.mel...@nasa.gov] > Subject: how to setup Tomcat 6.x fixes > > Where can I get instructions on setting up our Tomcat > server with the new fixes? Download, unzip (or untar), run: http://tomcat.apache.org/tomcat-6.0-doc/setup.html > I have downloaded the new fixes but cannot see any > instructions on the web site. What exactly did you download, and from where? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how to setup Tomcat 6.x fixes
Hi Where can I get instructions on setting up our Tomcat server with the new fixes? I have downloaded the new fixes but cannot see any instructions on the web site. Thanks Kirk Kirk Meline Systems Administrator NASA Ames Research Center Mail Stop 213-7 Moffett Field, CA 94035-1000 1-(650) 604-6868 Office
Re: Location of properties file for web app in Tomcat
Hi all, Caldarale, Charles R wrote: From: Flavius [mailto:flav...@silverlion.com] Subject: Location of properties file for web app in Tomcat 1. Where is the best place to put the properties file if I want it located outside the war itself? I don't think there's a "best place" that would be applicable to all environments. One mechanism that is known to work is to have the admin specify a system property at Tomcat startup indicating where the property file is located; the webapp looks at the system property during initialization and reads its properties from the specified location. The name of the system property can be whatever you choose, and could even include the context path of the webapp to allow multiple instances to be deployed in one container. +1 I had the same issue as the OP and the best I could come up with was to change catalina.sh to include a system property that was then read by the web app. But we did fall into the same problem of multiple instances and we just made the system property that pointed to the file more qualified. Kirk
Re: failed ActiveMQ hangs tomcat
Hi Adam, AD wrote: actually i think i did notice failover() with only 1 address in non-prod. I think the reason that was there was some config templating issue. Are you saying if you remove the failover and just go straight in this might resolve it? Will give it a shot Failover is great if you have another server to which to fail over ;) But if there's only the one, it'll hang. However, there are some backoff settings that can be adjusted so it shouldn't hang /forever/, but possibly for many minutes. So, removing failover will change it to 'fail fast' behavior. Of course it won't fix the core issue of the JMS server being down :\ Kirk
Re: failed ActiveMQ hangs tomcat
Hi Adam, AD wrote: hello, i am running into a situation where if our JMS server is down (activemq) the tomcat application does not respond at all. Not sure why tomcat is relying so heavily on this connection , any ideas as to why this would be ? Does your ActiveMQ connection URL include the failover:// prefix? I've seen applications hang near-indefinitely trying to fail over to the same (downed) ActiveMQ server over and over again. One way to see where the actual hang is would be to get a thread dump. The standard 'kill -3 ' of the Tomcat process (on Linux/UNIX) would do the trick. This sounds more like a web application issue than an issue with Tomcat. Also, if you have integration tests that connect to a live JMS server you could experiment with 'pulling the cord' and see where it hangs. This would then remove Tomcat from the equation. Kirk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Programmatically Force JSP Reload
Hi Eric, If you call touch on the JSP does it update? This used to work on versions of JRun back in the 90's. Just a shot in the dark... Kirk Eric Grunzke wrote: Hello, I am developing an app framework that has a very costly startup cycle. Consequently, I try to avoid restarting apps because it takes a long time for the core to get spooled up. In this vein I have a custom classloader that reloads the WEB-INF/classes directory without doing a full restart of the app. I've run into a problem, however, in JSPs. It's possible for JSPs to contain a reference to a .class file that becomes stale when I reload behind the scenes, which results in a ClassCastException. The bottom line here is that I am searching for a way to programmatically force tomcat to drop all loaded JSPs from memory. I do not need to recompile them, just reload the classes. However, if compilation and reloading are inextricably linked, that's a cost I'm willing to accept. I've tried looking around the documentation and searching the mailing list, but I've been unsuccessful so far. Any insight is greatly appreciated. Thanks! -Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: unwar and unjar an application
Hi Mihamina, Mihamina Rakotomandimby (R12y) wrote: Hi, A developer gave me just a .war file to deploy on a tomcat. I read [w|j]ar files are just zipped. The .war contains some .jar... I would like to "explode" all the .war (and the contained jars) and have the full code source. I could do it manually. Are you sure that the WAR and its contained JARs actually have source code? They don't by default (and I've never seen one that does)... But then there are two questions: - How to jar and war the exploded code back (to get it all archived it it was)? - if I unarchive some .jar, they dont unarchive in a subdir but directly in the current dir. How to manage that (when unarchiving _and_ re-archiving)? Well, the developper used some environment, I want to - put the code under SVN - edit it with Emacs/JDE These aren't really Tomcat-specific questions at all :( I'd advise taking each question and finding its answer via your favorite search engine. Kirk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 6.0.18 Not Starting
Hi Michael, Michael CC wrote: I just installed this version on Vista. When I run startup.bat, Tomcat is not finishing loading. It just hangs there. Here is a copy of my log. Any suggestions? Dec 9, 2008 4:46:07 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: c:\Program Files (x86)\Java\jdk1.6.0_11\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\PHP\;C:\ColdFusion8SearchService\k2\_nti40\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CyberLink\Power2Go\;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\QuickTime\QTSystem\ Dec 9, 2008 4:46:07 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8088 Dec 9, 2008 4:46:07 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1464 ms Dec 9, 2008 4:46:07 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Dec 9, 2008 4:46:07 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Dec 9, 2008 4:46:08 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8088 Isn't the default port 8080, not 8088? Was this intentional? Kirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat thread pool question
Hi Peter, ped wrote: The problem occurs if I set max threads to N and execute the above loop N+1 or more times (where N is a small number like 3 or 4). I see Tomcat threads sitting in c3p0 code waiting for a connection. There is no thread handling the incoming commit calls (step 3 above). The initial N iterations thru the loop all complete their DB transaction, they just hang while trying to commit the transaction. When you issue N+1 requests you say "there is no thread handling the incoming . . . calls". Is Tomcat returning any errors to your client for the N+1th request? Is the connection being closed or anything? Is it possible to reproduce the error by making a Servlet that simulates blocking on a database connection by sleeping for N seconds? Kirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Particularly problematic Oracle connection problem (Oracle 10g, Tomcat 6, Blojsom 3.2)
Summary: I am an idiot and posted to the mailing list far too early. Was a problem with my JDBC connection string (a typo basically). I think I got hung up too much on the classloading differences between Tomcat 5.x and Tomcat 6 and didn't look carefully enough at my own settings. Apologies for wasting people's time, Kirk Wylie -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 15 February 2008 12:49 To: Tomcat Users List Subject: Re: Particularly problematic Oracle connection problem (Oracle 10g, Tomcat 6, Blojsom 3.2) Wylie, Kirk wrote: > - Putting the .jar files ANYwhere (in order of attempts, webapp's > WEB-INF/lib, CATALINA_BASE/lib, CATALINA_HOME/lib) >- Results in the following statement occurring in the logs: > Cannot create JDBC driver of class 'oracle.jdbc.OracleDriver' for > connect URL 'jdbc:oracle:thin@//fodevdbsx1.london:1521/fodev3.london' Do you have a stack trace for this. Can you turn up the logging level and get one? > This indicates to me that the Oracle driver is being loaded, but it's > being stopped from actually creating the instance for some reason. Agreed. > The complication here is that Blojsom DOES NOT use, by default, JNDI > resources. Rather, it sets up its own DBCP DataSource in its > Spring+Hibernate configuration, which is what's failing here. This is > NOT a problem. Just to make sure, when I removed the DBCP > implementation in blojsom, it failed, because it couldn't find the > catalina copies. If you are not using JNDI then you should be able to put the Oracle JARs in WEB-INF/lib. I'd also restore catalina.properties to the original to limit the changes. > Has anybody experienced anything like this in the past either with > Blojsom or some other application which isn't using JNDI resources for > database connections using Tomcat 6? I have used DBCP directly in web-apps without a problem with 4, 5 and 6. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Particularly problematic Oracle connection problem (Oracle 10g, Tomcat 6, Blojsom 3.2)
I'm attempting to get Blojsom 3.2 talking to my Oracle database (this is completely setup fine, the problem appears to be a classloader issue of some sort) in Tomcat 6 (6.0.16 to be precise). I'm using a split CATALINA_BASE and CATALINA_HOME installation (CATALINA_HOME isn't writable by the user that I'm running as), and have put ojdbc14.jar and orai18n.jar in my $CATALINA_BASE/lib directory. Furthermore, following suggestions about RUNNING.txt not being correct, I've put the following line in my $CATALINA_BASE/conf/catalina.properties file: common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina .base}/lib,${catalina.base}/lib/*.jar This is replacing the existing definition of common.loader. Here's what I've tried: - Putting the .jar files nowhere (not in CATALINA_HOME, CATALINA_BASE, or my webapp itself) - Results in a ClassNotFoundException loading oracle.jdbc.OracleDriver - Putting the .jar files ANYwhere (in order of attempts, webapp's WEB-INF/lib, CATALINA_BASE/lib, CATALINA_HOME/lib) - Results in the following statement occurring in the logs: Cannot create JDBC driver of class 'oracle.jdbc.OracleDriver' for connect URL 'jdbc:oracle:thin@//fodevdbsx1.london:1521/fodev3.london' This indicates to me that the Oracle driver is being loaded, but it's being stopped from actually creating the instance for some reason. The complication here is that Blojsom DOES NOT use, by default, JNDI resources. Rather, it sets up its own DBCP DataSource in its Spring+Hibernate configuration, which is what's failing here. This is NOT a problem. Just to make sure, when I removed the DBCP implementation in blojsom, it failed, because it couldn't find the catalina copies. I can try to figure out a workaround for this, but I've spent about 6 hours on it thus far, and no matter what combination of property changes, I can't figure out what precisely is stopping it from loading. Has anybody experienced anything like this in the past either with Blojsom or some other application which isn't using JNDI resources for database connections using Tomcat 6? I'm a relative newbie to Tomcat 6, but I've used Tomcat 4-5.5 extensively in the past. Thanks a lot, Kirk Wylie -- This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quality check mod_jk 1.2.21-dev
I will take a look at it. I did not see that this option, so I never knew to use it. If I were to try and document the process I am going through to compile, would that be of help to put as a solaris sunone build doc? finding information on the web is few and far between. Most people probably run mod_jk under apache from what I have noticed and all of the docs are geared towards that. The ones I can find for sunone are geared towards windows. I am sure between the emails you and I have traded in the past few weeks on my trials and tribulations, if I can get everything to work, I can write up some docs to contribute. Kirk On 2/26/07, Rainer Jung <[EMAIL PROTECTED]> wrote: Hi Kirk, I never built for Sun Web Server, but I just saw the configure flag: --enable-netscape Did you ever try running configure with that one before doing the make? Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quality check mod_jk 1.2.21-dev
So I tried out this new version from your site. The first problem happened in the previous version, but still is troubling. #2 is a new error I have never seen. Any ideas on that one? I am going to download SunStudio compiler like you recommended. One of my problems is that I am a newbie to compiling on UNIX. Hopefully my comments are not too basic. 1) jk_types.h is still not available in the common directory. I have to run configure to get it, but configure is supposed to be for apache loads I thought and I normally do not have apache installed on my servers. Is there a .h file you can include in the netscape directory that one can then copy to the common directory so I do not have to run configure? Is there any other file like this that needs to be unique to compiling this on solaris for sunone? 2) gcc -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX -DMCC_HTTPD -DSPAPI20 -fPIC -I../common -I/wamu/hr/sunone/include -I/wamu/hr/sunone/include/base -I/wamu/hr/sunone/include/frame -I/wamu/hr/java/include -I/wamu/hr/java/include/solaris -c ../common/jk_connect.c ../common/jk_connect.c: In function `jk_is_socket_connected': ../common/jk_connect.c:663: error: `FIONREAD' undeclared (first use in this function) ../common/jk_connect.c:663: error: (Each undeclared identifier is reported only once ../common/jk_connect.c:663: error: for each function it appears in.) make: *** [jk_connect.o] Error 1 Thanks, Kirk On 2/26/07, Rainer Jung <[EMAIL PROTECTED]> wrote: Hi all, the next version of mod_jk is approaching its release. A code snapshot is available at http://people.apache.org/~rjung/mod_jk-dev/ It is in the same format as a release download, so easy to build. Under the same URL you can find the updated documentation. It would be nice, if we could get some testing feedback from the community. Feel free to post any observations. Depending on your feedback we plan to tag the release at the end of the week. The most important changes are: Configuration parsing: - Check worker attributes for unknown names during startup - Add warning if duplicate map keys are read and are not allowed, e.g. when parsing uriworkermap.properties. - Don't concat worker names, if uriworkermap.properties has a duplicate pattern, instead overwrite the worker. - Fix uriworkermap.properties: Fix off-by-one problem when deleting URL mapping during reloading of uriworkermap.properties. Features - Optional session id stripping for URLs, that are *not* being forwarded (Apache, IIS) Apache - Changed semantics of empty defaults for JkEnvVar variables. - BZ 41610: Fix incorrect detection of missing Content-Length header leading to duplicate headers. IIS Plugin - Refactoring isapi_plugin configuration reading. Sun Web Server - Better build support for SunONE (Netscape/iPlanet) webservers. Status Worker - JkStatus: Allow lb sub workers in error state to be marked for recovery administratively from the status worker. - Add configuration to make status worker user name checks case insensitive. - JkStatus: Show estimated time until next global maintenance. - Change displayed time until next recovery to a min/max pair. - JkStatus: Allow a user of a read/write status worker to switch it to and from read_only mode temporarily. - JkStatus: Do not show read/write commands in a read_only status worker. - JkStatus: Improved logging by adding status worker name to messages. Added messages to the recover worker action. - Load Balancer: Do not try to recover multiple times in parallel. Use additional runtime states "PROBE" and "FORCED". - JkStatus: Improve data synchronization between different processes. - JkStatus: Refactoring searching for workers and sub workers. Stability - 41381: Fix segfault in feature fail_on_status. Miscellaneous - Use correct windows line endings for log file on WIN32 platform. - Add some more errno logging and unify the format. The full change log is available under http://people.apache.org/~rjung/mod_jk-dev/docs/miscellaneous/changelog.html Thanks for your valuable time! Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk malfunction?
Sounds like the mod_jk configs got blown away in the web server configs. On 2/23/07, Gamefaqs Philippines <[EMAIL PROTECTED]> wrote: Hi guys! I was just wondering... I setup a tomcat server and an apache server for my previous company before. I used mod_jk for that and it worked for several months. However, my previous company contacted me and told me that they could not access the domain anymore. When I tried, it seems that the url www.myurl.com does not load the application, anymore, as I instructed it before I left the company. The application is still accessible though through www.myurl.com:8080. But who wants to see that extra number at the end of the URL!? Nobody! This symptom occured only after their host suspended their account for a month since they were not able to pay it. But after it was brought back, the URL www.myurl.com no longer loads the app and just directs the user to the public_html/domain root. What could be the problem here? Thanks! - Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
Re: Compiling mod-jk plugin for SunOne on Solaris
I tried the -statis-libgcc in the Makefile and it compiled and ldd produces no output, which I am assuming means no dependencies. So when i fire up the sunone server now I get a different error. failure: CORE3170: Configuration initialization failed: Error running init function load-modules: dlopen of /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so failed ( ld.so.1: webservd: fatal: relocation error: file /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so: symbol __umoddi3: referenced symbol not found) Any ideas on that one? Thanks, Kirk On 2/21/07, Rainer Jung <[EMAIL PROTECTED]> wrote: Option 1) (Quick and dirty): Deploy libgcc_s.so. It's *not* the compiler. The lib contains some machine specific runtime routines, for which appropriate machine statements are not available. Option 2): Compiling statically. If you've got good control over the compilation process you can add "-static-libgcc" to gcc as flags. If you don't want to find out, where all the gcc compile flags are coming from (configure, environment variables etc.) you can decide to make all compiles using static libgcc by hacking a specs file. a) dump a specs file by calling "gcc -dumpspecs". b) Edit the results and throw everything away except the block beginneing with "*libgcc". The exact structure depends on the gcc version. Here is an example: *libgcc: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s -lgcc}}%{shared:-lgcc_s}}} Caution: this is only two lines, the second one is pretty long. Now edit to make gcc link against libgcc (this is the static version) instead of libgcc_s (the shared one) even if it has been called to produce a shared object. In our example the result would be: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc -lgcc_eh}}%{shared:-lgcc -lgcc_eh}}} Save this file, e.g. as /my/gcc.specs. Then set the environment variable CC to "gcc -specs=/my/gcc.specs" and start building. You can check the library dependencies of the resulting "*.so" file by using "ldd". Good luck. Regards, Rainer Kirk schrieb: > There was a thread from February 1st on this same issue. I am having the > same problem that person did, but I tried everything in the thread and > still > no luck. > > After I get mod_jk compiled I get this on server startup: > > failure: CORE3170: Configuration initialization failed: Error running > init function load-modules: > dlopen of /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so failed > (ld.so.1: webservd: fatal: > relocation error: file > /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so: symbol __lshrdi3: > referenced symbol not found) > > > The one thing that I think is making a difference as compared to the person > in the earlier thread is that gcc is not installed on the server I am > trying > to deploy on and I am not allowed to have it on there. it is not an > option, > don't ask. I tried static linking, but I have a feeling I am doing it > wrong. > > So, my question is, what exactly do I need to do to compile the mod_jk > plugin for SunOne on Solaris where it is to be deployed on a server that > does not have gcc installed at all? > > Thanks, > Kirk > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compiling mod-jk plugin for SunOne on Solaris
There was a thread from February 1st on this same issue. I am having the same problem that person did, but I tried everything in the thread and still no luck. After I get mod_jk compiled I get this on server startup: failure: CORE3170: Configuration initialization failed: Error running init function load-modules: dlopen of /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so failed (ld.so.1: webservd: fatal: relocation error: file /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so: symbol __lshrdi3: referenced symbol not found) The one thing that I think is making a difference as compared to the person in the earlier thread is that gcc is not installed on the server I am trying to deploy on and I am not allowed to have it on there. it is not an option, don't ask. I tried static linking, but I have a feeling I am doing it wrong. So, my question is, what exactly do I need to do to compile the mod_jk plugin for SunOne on Solaris where it is to be deployed on a server that does not have gcc installed at all? Thanks, Kirk
Multiple thread pools in Tomcat 5.5
Can anyone tell me if Tomcat 5.5 supports custom thread pools like WebLogic, and if not, whether there are plans for future support of this feature? This e-mail is intended only for the personal and confidential use of the recipient(s) named above. It may include Blackboard confidential and proprietary information, and is not for redistribution.
RE: DBCP connection leak after undeploy
I was thinking that you could write your own ServletContextListener code to create/close the pool, so that you do not have to rely on TC to manage DBCP via JNDI. I am planning to do this myself sometime soon, for other reasons (you've just given me another one). I'm thinking that by not using JNDI, I would not encounter of the problem you mention below, because the problem is related to the TC-JNDI interface. Does that sound right to you? > -Original Message- > From: Bogdan Calmac [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 16:50 > To: Tomcat Users List > Subject: Re: DBCP connection leak after undeploy > > > In our company we share several Tomcat servers for all developers, so > that's why we use deploy/undeploy instead of start/stop. > > As a workaround for this problem, you can create a > ServletContextListener and close the datasource yourself in > contextDestroyed(). I used refection here to avoid compile time > dependency on Tomcat DBCP. > > try > { > Context initCtx = new InitialContext(); > ds = (DataSource) > initCtx.lookup("java:comp/env/jdbc/YourDSName"); > if ("org.apache.tomcat.dbcp.dbcp.BasicDataSource".equals( > ds.getClass().getName())) > { > Method closeMethod = ds.getClass().getMethod("close"); > closeMethod.invoke(ds); > } > catch (Exception e) > { > yourLog.error("Failed to close DBCP DataSource.", e); > } > > The above code would actually not work because JNDI is destroyed by > the time contextDestroyed() is called (see > http://issues.apache.org/bugzilla/show_bug.cgi?id=37264) so you could > do the lookup and cache the datasource object in contextInitialized(). > > On 10/28/05, Steve Kirk <[EMAIL PROTECTED]> wrote: > > Yes, confirmed, I get the same problem. (I used the > undeploy command from > > within the NetBeans runtime window, and also checked using > the undeploy link > > in the browser from /manager/html/). Conns are cleaned up OK if you > > start/stop TC, but not if you undeploy the app with TC > still running, as you > > said. > > > > Having said that, does anyone undeploy apps like this on > production servers? > > I wouldn't think so, but then again I suppose it might > affect ISP type > > users. > > > > PS I have these config values: > > maxActive="10" > > maxIdle="5" > > > > > -Original Message- > > > From: Bogdan Calmac [mailto:[EMAIL PROTECTED] > > > Sent: Thursday 27 October 2005 19:27 > > > To: Tomcat Users List > > > Subject: Re: DBCP connection leak after undeploy > > > > > > > > > > PS I don't think that I have see the problem that you have > > > reported. I run > > > > TC 5.5.9 on WinXP with Mysql 4.1.11 and Connector/J 3.1.8, > > > have never > > > > noticed that problem, my pools always seem to clean up fine. > > > > > > You might not have the same setup. I would suggest to try the > > > following: > > > > > > 1. make sure you define the datasource in > META-INF/context.xml and you > > > access the DB using that JNDI datasource. > > > 2. package your webapp as a war > > > 3. Do a "netstat" and note how many DB connections are open > > > 4. deploy your webapp using the ant task or the manager webapp > > > 5. Access your webapp to use the DB > > > 6. Do another "netstat" to confirm that there is one more DB > > > connection (which is now pooled) > > > 7. undeploy your webapp using the ant task or the manager > webapp (do > > > not stop tomcat) > > > 8. Do one more "netstat" and I would be very surprised if > the extra > > > connection was closed :-) > > > > > > Another explanation for your finding could be setting > maxIdle="0" in > > > the resource definition, but that practically disables pooling. > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat logging - Persistence of Logs
in case it helps but you haven't already seen it, the verbosity of can be tweaked, see same page as in last reply. Can I just check what you are saying: are you saying that the standard output to the file which captures stdout is different on the 2 platforms, even with out-of-the-box TC config? This would be a surprise, I was under the impression that TC was functionally identical on whatever platform (the only difference really being the exact pathnames to files). So I just had a quick look at catalina.bat vs catalina.sh on 5.5.9 (my installed version) and it appears that there could be a difference: catalina.sh starts the bootstrap class with the redirection '>> "$CATALINA_BASE"/logs/catalina.out 2>&1' appended, whereas the windows bat file does nothing like this; there is no redirection at all that I can see, or even a mention of the logfile name. Maybe this explains what you're seeing - the gubbins that is output to the DOS window when you start in DOS is perhaps included in the log file instead when you run under linux? This is only a guess, I have not had time to check it out. > -Original Message- > From: Tom Burke [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 16:21 > To: Tomcat Users List > Subject: Re: Tomcat logging - Persistence of Logs > > > Indeed, I have a daily log already but it doesn't seem to be > as verbose > as the stdout.log. > > I was just wondering if the default log - stdout.log in Windows, > catalina.out in linux - could be made to behave the same way > on the two > platforms. But it looks as if this is an OS-specific difference, as I > can't see any difference in the configuration files between the two > servers. > > Tom Burke > > > - Original Message - > From: "Steve Kirk" <[EMAIL PROTECTED]> > To: "'Tomcat Users List'" > Sent: Monday, October 31, 2005 12:52 PM > Subject: RE: Tomcat logging - Persistence of Logs > > > > > > The under 5.0.x uses -MM-DD format in the filename, so > > this > > would change each day, would that give you what you need? See > > "FileLogger" > > under "Standard Implementation" at: > > http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html > > > > PS note that is deprecated in 5.5.x > > > >> -Original Message- > >> From: Tom Burke [mailto:[EMAIL PROTECTED] > >> Sent: Monday 31 October 2005 11:59 > >> To: Tomcat Users List > >> Subject: Tomcat logging - Persistence of Logs > >> > >> > >> I have a problem with log files. I have a customer who has > >> Tomcat 5.0.28 > >> running on Windows 2003 Server. The main output is being logged to > >> stdout.log in the tomcat/logs directory - this is the Windows > >> equivalent > >> of catalina.out on a linux/unix system. > >> > >> The problem is that for good reasons the customer is stopping & > >> restarting Tomcat every night (at our recommendation). This > >> is a new app > >> and it's not entirely bug-free yet, so giving thjem a clean > >> start every > >> day is useful. The trouble is that this also recreates > >> stdout.log, which > >> is a pity as sometime we aren't being alerted to problems > >> until the day > >> after, by which time the relevant log has disappeared. > >> > >> Does anyone know how to make the Windows stdout.log file > persistent? > >> > >> Tom Burke > > > > > > > > > - > > 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]
RE:
windows or linux? if on windows and runing as a service, have you run the "service install" command after copying across the contents of the TC root directory? also check: have you set the env variables JAVA_HOME and CATALINA_HOME? are file permissions on the jar file OK? > -Original Message- > From: Lothar Krenzien [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 11:40 > To: users@tomcat.apache.org > Subject: > > > > Hi there, > > I'm using Tomcat 5.5 and want to copy a working installation > from server A to server B, so that on both servers I have a > running Tomcat service. The installation on server A is > running without any problems, but on server B I get always > the erros message 'the file > "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogMan > ager" could not found'. I know that I can rename/delete the > file tomcat-juli.jar in the bin directory. But I would like > to know the reason for this error. > > Thanks for any answer. > Lothar > > __ > ___ > Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle > Freunde gleichzeitig schicken: > http://freemail.web.de/features/?mc=021179 > > > > > - > 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]
RE: Tomcat logging - Persistence of Logs
The under 5.0.x uses -MM-DD format in the filename, so this would change each day, would that give you what you need? See "FileLogger" under "Standard Implementation" at: http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html PS note that is deprecated in 5.5.x > -Original Message- > From: Tom Burke [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 11:59 > To: Tomcat Users List > Subject: Tomcat logging - Persistence of Logs > > > I have a problem with log files. I have a customer who has > Tomcat 5.0.28 > running on Windows 2003 Server. The main output is being logged to > stdout.log in the tomcat/logs directory - this is the Windows > equivalent > of catalina.out on a linux/unix system. > > The problem is that for good reasons the customer is stopping & > restarting Tomcat every night (at our recommendation). This > is a new app > and it's not entirely bug-free yet, so giving thjem a clean > start every > day is useful. The trouble is that this also recreates > stdout.log, which > is a pity as sometime we aren't being alerted to problems > until the day > after, by which time the relevant log has disappeared. > > Does anyone know how to make the Windows stdout.log file persistent? > > Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat not starting
from your stacktrace it appears that this error occurs when XML is being parsed, because TC can't find a class: java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef in my installation (5.5.9) this class is in %catalina_home%\common\lib\naming-factory.jar so might be worth checking that you have that > -Original Message- > From: Nehal Sangoi [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 06:03 > To: 'Tomcat Users List (E-mail)' > Subject: Tomcat not starting > > > Infact, i am unable to start all tomcat instances and result > is follwoing > error > Pls help!! > > > Hi, > > I am unable to start one of my tomcat instances. But its > getting crashed > before it starts. Follwoing are the errors found. > > > Oct 31, 2005 12:09:47 AM org.apache.tomcat.util.digester.Digester > startElement > SEVERE: Begin event threw error > java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef > at > org.apache.catalina.core.StandardServer.(StandardServer.java:94) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo > nstructorAcces > sorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele > gatingConstruc > torAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > at java.lang.Class.newInstance0(Class.java:350) > at java.lang.Class.newInstance(Class.java:303) > at > org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectC > reateRule.java > :205) > at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152) > at > org.apache.tomcat.util.digester.Digester.startElement(Digester > .java:1275) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s > tartElement(Ab > stractSAXParser.java:533) > at > com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.st > artElement(XML > DTDValidator.java:798) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl.scanS > tartElement(XMLDocumentFragmentScanner > Impl.java:878) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl > $ContentDispat > cher.scanRootElementHook(XMLDocumentSc > annerImpl.java:1157) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl$Fragm > entContentDispatcher.dispatch(XMLDocum > entFragmentScannerImpl.java:1794) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl.scanD > ocument(XMLDocumentFragmentScannerImpl > .java:368) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration. > parse(XML11Con > figuration.java:834) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration. > parse(XML11Con > figuration.java:764) > at > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XML > Parser.java:14 > 8) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.p > arse(AbstractS > AXParser.java:1242) > at > org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561) > at > org.apache.catalina.startup.Catalina.load(Catalina.java:473) > at > org.apache.catalina.startup.Catalina.load(Catalina.java:509) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > orImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243) > at > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408) > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > orImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243) > at > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408) > Caused by: java.lang.NoClassDefFoundError: > org/apache/naming/TransactionRef > at > org.apache.catalina.core.StandardServer.(StandardServer.java:94) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EM
RE: DBCP connection leak after undeploy
Yes, confirmed, I get the same problem. (I used the undeploy command from within the NetBeans runtime window, and also checked using the undeploy link in the browser from /manager/html/). Conns are cleaned up OK if you start/stop TC, but not if you undeploy the app with TC still running, as you said. Having said that, does anyone undeploy apps like this on production servers? I wouldn't think so, but then again I suppose it might affect ISP type users. PS I have these config values: maxActive="10" maxIdle="5" > -Original Message- > From: Bogdan Calmac [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 19:27 > To: Tomcat Users List > Subject: Re: DBCP connection leak after undeploy > > > > PS I don't think that I have see the problem that you have > reported. I run > > TC 5.5.9 on WinXP with Mysql 4.1.11 and Connector/J 3.1.8, > have never > > noticed that problem, my pools always seem to clean up fine. > > You might not have the same setup. I would suggest to try the > following: > > 1. make sure you define the datasource in META-INF/context.xml and you > access the DB using that JNDI datasource. > 2. package your webapp as a war > 3. Do a "netstat" and note how many DB connections are open > 4. deploy your webapp using the ant task or the manager webapp > 5. Access your webapp to use the DB > 6. Do another "netstat" to confirm that there is one more DB > connection (which is now pooled) > 7. undeploy your webapp using the ant task or the manager webapp (do > not stop tomcat) > 8. Do one more "netstat" and I would be very surprised if the extra > connection was closed :-) > > Another explanation for your finding could be setting maxIdle="0" in > the resource definition, but that practically disables pooling. > > - > 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]
RE: Tomcat is dying unpredictably
Sorry, doesn't suggest anything specific to me. > -Original Message- > From: Mark Shifman [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 20:13 > To: Tomcat Users List > Subject: Re: Tomcat is dying unpredictably > > > Thanks for your reply. After adding the export, tomcat > doesn't die but I am > getting an ERROR that ThreadDeath happened. see trace below. > > Any ideas where to go next? > > Oct 27, 2005 10:31:55 AM org.apache.catalina.loader.WebappClassLoader > loadClass > INFO: Illegal access: this web application instance has been stopped > already (the eventual following stack trace is caused by an > error thrown > for debugging purposes as well as to attempt to terminate the thread > which caused the illegal access, and has no functional impact) > Oct 27, 2005 10:31:55 AM org.apache.catalina.loader.WebappClassLoader > loadClass > INFO: Illegal access: this web application instance has been stopped > already (the eventual following stack trace is caused by an > error thrown > for debugging purposes as well as to attempt to terminate the thread > which caused the illegal access, and has no functional impact) > ERROR 2005-10-27 10:31:55,101 org.apache.coyote.tomcat5.CoyoteAdapter > service > An exception or error occurred in the container during the request > processing > java.lang.ThreadDeath > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC > lassLoader.java:1270) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC > lassLoader.java:1230) > at java.beans.Introspector.instantiate(Introspector.java:1322) > at > java.beans.Introspector.findExplicitBeanInfo(Introspector.java:393) > at java.beans.Introspector.(Introspector.java:342) > at java.beans.Introspector.getBeanInfo(Introspector.java:144) > at > org.apache.commons.beanutils.PropertyUtils.getPropertyDescript > ors(PropertyUtils.java:949) > at > org.apache.commons.beanutils.PropertyUtils.getPropertyDescript > ors(PropertyUtils.java:979) > at > org.apache.commons.beanutils.PropertyUtils.getPropertyDescript > or(PropertyUtils.java:887) > at > org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(P > ropertyUtils.java:1172) > at > org.apache.commons.beanutils.PropertyUtils.getNestedProperty(P > ropertyUtils.java:772) > at > org.apache.commons.beanutils.PropertyUtils.getProperty(Propert > yUtils.java:801) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW > rapperValve.java:298) > at > org.apache.catalina.core.StandardValveContext.invokeNext(Stand > ardValveContext.java:151) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:567) > at > org.apache.catalina.core.StandardContextValve.invokeInternal(S > tandardContextValve.java:245) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardC > ontextValve.java:199) > at > org.apache.catalina.core.StandardValveContext.invokeNext(Stand > ardValveContext.java:151) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut > henticatorBase.java:587) > at > org.apache.catalina.core.StandardValveContext.invokeNext(Stand > ardValveContext.java:149) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:567) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHost > Valve.java:184) > at > org.apache.catalina.core.StandardValveContext.invokeNext(Stand > ardValveContext.java:151) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport > Valve.java:164) > at > org.apache.catalina.core.StandardValveContext.invokeNext(Stand > ardValveContext.java:149) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:567) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn > gineValve.java:156) > at > org.apache.catalina.core.StandardValveContext.invokeNext(Stand > ardValveContext.java:151) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:567) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) > at > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter. > java:206) > at > org.apache.coyote.http11.Http11Processor.process(Http11Process > or.java:833) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle > r.processConnection(Http11Protocol.
RE: Asking Again: What's the "xmlValidation" Attribute for?
Bob, I replied to your original post - if you did not get that, check the archive here http://mail-archives.apache.org/mod_mbox/tomcat-users/200510.mbox/%3c00fc01c [EMAIL PROTECTED] Re what xml the host tag is referring to, I assume that the xml settings in host relate to loading all the config files, incl web.xml, tomcat-users, server.xml, etc. Can't think of any other reason that the TC engine would use XML...? 'xmlNamespaceAware' : I think this relates to the DTD, hence if you have validation true you need > -Original Message- > From: Bob Bronson [mailto:[EMAIL PROTECTED] > Sent: Friday 28 October 2005 02:27 > To: tomcat-user@jakarta.apache.org > Subject: Asking Again: What's the "xmlValidation" Attribute for? > > > I'm using TC 5.5.12. > > Please look at this snippet from the server.xml that is distributed > with TC: > > > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > > Can anyone tell me what the 'xmlValidation' attribute on > is for? > I realize it has something to do with "XML validation", but > what XML is > it referring to? Is it the corresponding web.xml? And how does the > 'xmlNamespaceAware' attribute fit in? > > And what's the comment about the Xerces 2.2 parser? I'm using > Sun's JDK > 1.5.0. Does it use Xerces internally? > > When I set the 'xmlValidation' attribute to 'true' I get a big stack > trace. One would think it might be appropriate to offer a nice error > message describing the problem. > > I've looked at the latest TC documentation for and it makes no > mention of the 'xmlValidation' attribute: > http://tomcat.apache.org/tomcat-5.5-doc/config/host.html > > Can someone please explain these two attributes? My web.xml is getting > unwieldy and I'd like to start validating it. > > Thanks very much. > > -- > Bob Bronson > > > > - > 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]
RE: Tomcat Startup
This... > Can't load server.xml ...suggests that you need to check your %Catalina_Home%\conf\server.xml file check its permissions as well, against the user that TC is running as > -Original Message- > From: feilong [mailto:[EMAIL PROTECTED] > Sent: Friday 28 October 2005 10:51 > To: users@tomcat.apache.org > Subject: Tomcat Startup > > > Hi, > My Catalina_Home: C:\Programme\jakarta-tomcat-5.0.30\ > JAVA_HOME: C:\Programme\JBuilderX\jdk1.4 > > > C:\Programme\jakarta-tomcat-5.0.30\bin>catalina run > Using CATALINA_BASE: C:\Programme\jakarta-tomcat-5.0.30\ > Using CATALINA_HOME: C:\Programme\jakarta-tomcat-5.0.30\ > Using CATALINA_TMPDIR: C:\Programme\jakarta-tomcat-5.0.30\\temp > Using JAVA_HOME: C:\Programme\JBuilderX\jdk1.4\ > Can't load server.xml > Can't load server.xml > Oct 28, 2005 10:43:18 AM org.apache.catalina.startup.Catalina start > INFO: Server startup in 0 ms > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) > at > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) > Caused by: java.lang.NullPointerException > at > org.apache.catalina.startup.Catalina.await(Catalina.java:619) > at > org.apache.catalina.startup.Catalina.start(Catalina.java:579) > ... 6 more > > Best > Feilong > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: static server implementation?
Have you considered that you can remove much of the dynamic config from conf\web.xml so that there is no default servlet or other dynamic behaviour in any webapp unless you explictly configure it so in the webapp's own web.xml? In fact this is what I prefer to do myself (except on dev box because I use the manager webapp). My conf/web.xml is almost empty. that way, you can have a webapp which has none of the dynamic capabilities. > -Original Message- > From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 19:21 > To: Tomcat Users List > Subject: RE: static server implementation? > > > > From: Robert Koberg [mailto:[EMAIL PROTECTED] > > Subject: Re: static server implementation? > > > > If you have a need for many virtual hosts, but do not need > > or want any ability for dynamic activity it would make sense > > to have a limited version of a tomcat host/context. I mean, > > I have a need to create VHosts from java, but those VHosts > > should not be able to affect anything (Read Only). > > I'm still not understanding why a standard Tomcat isn't > sufficient. If > you don't configure any dynamic content capabilities, none will > magically appear to thwart your goals. Are you concerned about > performance? Have you tested a static-only Tomcat to see if it's > adequate for your needs? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete > the e-mail > and its attachments from all computers. > > - > 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]
RE: DBCP connection leak after undeploy
Interesting, thanks for mailing to the list. Have you considered whether managing the DBCP resource yourself might help? In other words you don't have to use the TC container-managed method of declaring DBCP resources if you don't want to. If you wrote a ServletContextListener to create and close the pool and make it available to your webapp, you would have more control over these issues (or to put it another way, you could choose to write the "glueing integration code" yourself). I have this on my "to do" list, because of other issues around using container managed resources. Have not done it yet but I have some quick and dirty code that does it, which I need to combine/adapt. PS I don't think that I have see the problem that you have reported. I run TC 5.5.9 on WinXP with Mysql 4.1.11 and Connector/J 3.1.8, have never noticed that problem, my pools always seem to clean up fine. > -Original Message- > From: Bogdan Calmac [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 16:49 > To: Tomcat Users List > Subject: Re: DBCP connection leak after undeploy > > > This problem is caused by Tomcat not cleaning up the JDBC resources > defined in context.xml. When a context is stopped the DBCP resource is > not notified and the pooled connections are leaked. I've submitted a > bug along with a fix > (http://issues.apache.org/bugzilla/show_bug.cgi?id=37262) but it was > rejected on the grounds that DBCP is an some external library and > tomcat should not contain any glueing integration code. > > I'm not verry happy about it, because connection leaks seem like a > pretty serious issue to me. But hey, why do I complain, I din not pay > a dime for Tomcat, right? > > On 10/26/05, Bogdan Calmac <[EMAIL PROTECTED]> wrote: > > When tomcat is stopped the connection is closed. I'll > probably submit > > the example to bugzilla. Can somebody familiar with the code suggest > > which catalina object keeps a reference of the datasource (beside > > being registered in JNDI)? > > > > On 10/26/05, Steve Kirk <[EMAIL PROTECTED]> wrote: > > > > > > Your code and config below look fine to me, conns seem to > be returned OK to > > > pool as you say. Sounds to me like the pool itself > leaves the database with > > > hanging conns in the pool when it goes down. > > > > > > When you say "If I deploy/undeploy several times" do you > stop and restart TC > > > between undeploy and redeploy? If so, might be worth > trying to see whether > > > the problem still happens if you stop and restart TC > cleanly rather than > > > redeploying the webapp while TC is running? Might help > narrow down the > > > cause slightly. Might be worth reporting to bugzilla? > > > > > > > -Original Message- > > > > From: Bogdan Calmac [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday 26 October 2005 02:18 > > > > To: users@tomcat.apache.org > > > > Subject: DBCP connection leak after undeploy > > > > > > > > > > > > I've written a simple web application consisting of a > servlet which > > > > does a select from a table and displays the result. It is then > > > > packaged as a war and deployed using the tomcat ant task. After > > > > executing the servlet, it is undeployed using the ant > task again. > > > > stdout confirms that the webapp is deployed and > undeployed without > > > > errors. The problem is that the connection to the DB is > left open even > > > > after undeploy. > > > > > > > > Software used: > > > > - tomcat 5.5.9 on Windows > > > > - DBCP connection pool > > > > - MSSQL server > > > > > > > > The datasource is defined in META-INF/context.xml with: > > > > > > > >> > > type="javax.sql.DataSource" > > > >maxActive="5" maxIdle="2" maxWait="1" > > > >username="sa" password="sa" > > > > > driverClassName="net.sourceforge.jtds.jdbc.Driver" > > > >url="jdbc:jtds:sqlserver://localhost/pubs"/> > > > > > > > > and then referenced in WEB-INF/web.xml with: > > > > > > > > > > > > DB Connection > > > > jdbc/default > > > > javax.sql.DataSource > > > > Container > > > > > > >
RE: Error: Cannot get a connection, pool exhausted
yes. in the same place you have set maxActive etc. > -Original Message- > From: KUMAR, NANDA [AG-Contractor/1000] > [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 15:46 > To: 'Tomcat Users List' > Subject: RE: Error: Cannot get a connection, pool exhausted > > > Thanks Jan, Let me try this. I need to add these parameters > in context.xml? > Am I right? > > Thanks > Nanda > > -Original Message- > From: Jan Pernica [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 27, 2005 1:49 AM > To: Tomcat Users List > Subject: Re: Error: Cannot get a connection, pool exhausted > > > And try to use > > removeAbandoned="true" logAbandoned="true" > removeAbandonedTimeout="120" > > to track which connections were not properly closed (see > http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-exampl > es-howto.html) > > Regards > > > Jan > > > > Steve Kirk wrote: > > >how many concurrent requests are you handling? you have configured > > > > > >>maxActive > >>100 > >> > >> > >so as soon as 100 concurrent conns are reached, you will > exhaust the pool. > > > >If you do not have as many as 100 concurrent conns, then it > is likely that > >your servlet calls are not returning conns to the pool after > they have > >finished using them. Make sure that your servlets' doPost() > and doGet() > >methods include a call to the Connection#close() method > before they return, > >whether or not an error occurred. This returns connections > to the pool, > for > >use by other threads using the pool. The best place to call > the close() > >method is in a finally() block. > > > > > > > >>-Original Message- > >>From: KUMAR, NANDA [AG-Contractor/1000] > >>[mailto:[EMAIL PROTECTED] > >>Sent: Wednesday 26 October 2005 16:13 > >>To: users@tomcat.apache.org > >>Subject: Error: Cannot get a connection, pool exhausted > >> > >> > >>Frequently we were getting "Cannot get a connection, pool > >>exhausted" error > >>on production. I know in our application, we are closing the > >>connection > >>after each connection. Here is our context.xml parameters and > >>values. We set > >>maxActive connection to 100. Please let me know what we are > >>doing wrong or > >>if you need more information. > >> > >> > >> >>workDir="work\Catalina\localhost\test"> > >> > >> > >> > >>url > >>jdbc:oracle:thin:@test.com:1521:test > >> > >> > >>password > >>test123 > >> > >> > >>maxActive > >>100 > >> > >> > >>maxWait > >>1 > >> > >> > >>driverClassName > >>oracle.jdbc.driver.OracleDriver > >> > >> > >>username > >>test > >> > >> > >>maxIdle > >>30 > >> > >> > >> > >> > >>Thanks > >>Kumar > >> > >> > >> > >>-- > >>--- > >>This e-mail message may contain privileged and/or > >>confidential information, and is intended to be received only > >>by persons entitled to receive such information. If you have > >>received this e-mail in error, please notify the sender > >>immediately. Please delete it and all attachments from any > >>servers, hard drives or any other media. Other use of this > >>e-mail by you is strictly prohibited. > >> > >> > >>All e-mails and attachments sent and received are subject to > >>monitoring, reading and archival by Monsanto. The recipient > >>of this e-mail is solely responsible for checking for the > >>presence of "Viruses" or other "Malware". Monsanto accepts no > >>liability for any damage caused by any such code transmitted > >>by or accompanying this e-mail or any attachment. > >>-- > >>--- > >> >
RE: org.apache.jasper.JasperException: setAttribute: Non-serializable attribute
Not sure, but this could be it: TC saves Session objects to files when the webapp is started/stopped. (This is a configurable feature in context.xml). To do this, any attribute that you add to a Session object must be serializable. Therefore I would guess that if you call Session#setAttribute() with a non-serializable object as an arg, it might be complaining. I'd be interested to know if this is the problem, because I had trouble in a related area a while back, which arose because TC did *not* complain about the attribute at the time, only when the webapp was stopped and it tried to write it to sessions.ser > -Original Message- > From: Graf László [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 17:04 > To: users@tomcat.apache.org > Subject: org.apache.jasper.JasperException: setAttribute: > Non-serializable attribute > > > Hi, > > I am using JBoss-4.0.3 which runs an embeded Tomcat 5.5.9. > Before sending the code segment I would like to ask you, > when throws the server the following exception: > > --- > java.lang.IllegalArgumentException: setAttribute: > Non-serializable attribute > --- > > Below you can see the whole output of the server. > > > > "HTTP Status 500 - > type Exception report > message > description The server encountered an internal error () that > prevented > it from fulfilling this request. > > exception > > org.apache.jasper.JasperException: setAttribute: > Non-serializable attribute > > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:370) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:314) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyH eaderFilter.java:81) > > root cause > > java.lang.IllegalArgumentException: setAttribute: > Non-serializable attribute > > org.apache.catalina.session.StandardSession.setAttribute(Stand ardSession.java:1233) > > org.apache.catalina.session.StandardSessionFacade.setAttribute > (StandardSessionFacade.java:129) > > org.apache.jasper.runtime.PageContextImpl.doSetAttribute(PageC > ontextImpl.java:341) > > org.apache.jasper.runtime.PageContextImpl.setAttribute(PageCon > textImpl.java:320) > > org.apache.jsp.alt_005ffejlec_jsp._jspService(org.apache.jsp.a > lt_005ffejlec_jsp:94) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:322) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:314) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyH eaderFilter.java:81) > > note The full stack trace of the root cause is available in > the Apache > Tomcat/5.5.9 logs." > > -- > Graf László > > > - > 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]
RE: How to share resources across two applications
Why not just include tags in your w1 webapp's pages whose href attributes point direct to URIs that begin "/w2app/" and vice-versa? I don't think you need to use dispatchers. The docs for ServletContext#getContext (your line 1) say: "...The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container. In a security conscious environment, the servlet container may return null for a given URL.". The spec says ServletContext#getContext "Returns: the ServletContext object that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access." So: 1. Are you sure that your url begins with a "/" ? 2. If you are, the null indicates that there is a security constraint preventing access to the URL (or the url does not exist). This could be a standard TC rule preventing access between webapps. I don't know for sure, perhaps someone that knows more will chip in. > -Original Message- > From: Nihita Goel [mailto:[EMAIL PROTECTED] > Sent: Thursday 27 October 2005 13:33 > To: users@tomcat.apache.org > Subject: How to share resources across two applications > > > Hi, > I have two applications running on the tomcat application server. > w1 - with context path "/w1app" > and w2 with context path "/w2app" > I wish to provide links in w1 displaying pages of w2. > > I have used this code in my HttpServlet class of w1 > > if /// some condition > > Servlet Context othercontext = > getServletContext().getContext("/w2app"); > (1) > RequestDispatcher rd = othercontext.getRequestDispatcher(url); (2) > rd.forward (request,response) (3) > > However - the it gives a NullPointerException at 1. > > I have been trying hard but without success.. > > Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tracking
Charles, see also my reply to Nanda Kumar's thread "Cannot get a connection, pool exhausted" for a coding example. HTH :) > -Original Message----- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 14:01 > To: 'Tomcat Users List' > Subject: RE: Tracking > > > > Charles, I don't know of a way to have TC clear up conns for > you, but you > really should clear up connections explicitly. To some > extent DBCP will > clear up "abandoned" connections (to which you had a variable > reference, > which goes out of scope when you have finished processing the > request), but > this is bad style rally and you should not rely on it. > > The "standard" way to clear up connections is to use a > try/catch/finally > structure in your code. > > eg > (I'm assuming that you are using DBCP) > > Connection c = MyClass.getConnection(); // or however > you get a conn from > the pool > try > { > // use the connection to do whatever > } > catch(Exception e) > { > // handle exceptions > } > finally > { > c.close(); > } > > > -Original Message- > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > Sent: Tuesday 25 October 2005 21:05 > > To: Tomcat Users List > > Subject: Tracking > > > > My bigger problem is that I am using Connection pooling. And > > if I don't > > close every connection when I am down with it, the server stops > > responding. Restart Tomcat and everything is back to normal. > > Is there > > a setting to have Tomcat close all connections for me when a request > > finishes? > > > > - > 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]
RE: Repeated logging problem on 5.5
This is a repost of a message I first posted in June that I got no replies to. I have a double-logging problem, by which I mean that some of my log messages get logged to two logfiles. I have only one logfile configured using java.util.logging, but in some cases, the same log message gets logged to the TC stdout log as well, which I don't want. It's not the end of the world, but I'd like to understand what's happening in case I've misunderstood something. This double logging problem only happens when there is a java.util.logging call from either: - the init() method of my own servlet - a class created during that init() method, that persists in the VM after the init() method has returned, through a static field reference. More detail, incl my versions and config setup, are in my original post here: http://article.gmane.org/gmane.comp.jakarta.tomcat.user/113877 Does anyone have any ideas what the cause might be, please? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat is dying unpredictably
A long shot, but if you are running RHL9 you might try this, as mentioned in the TC 5.5 release notes at http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt : Tomcat on Linux: GLIBC 2.2 / Linux 2.4 users should define an environment variable: export LD_ASSUME_KERNEL=2.2.5 Redhat Linux 9.0 users should use the following setting to avoid stability problems: export LD_ASSUME_KERNEL=2.4.1 Apparently the problem is that RHL introduced the "Native Posix thread library", see here (find "NPTL" in the page to jump to the explanation): http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/release-notes/x86/ I've noticed it handing a JVM that does a lot of socket access from the command line. The VM just stops dead without reporting anything. That was on the last released build of RHL9 (2.4.20) > -Original Message- > From: Mark Shifman [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 17:40 > To: Tomcat Users List > Subject: Tomcat is dying unpredictably > > > Recently tomcat has started dying in an unpredictable manner. > I am running > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > > jakarta-tomcat-5.0.19 on a Linux box with kernel > 2.4.21-37.ELsmp #1 SMP > Wed Sep 7 13:28:55 EDT 2005 > (recently upgraded) and struts 1.2.6. > > the output from catalina.out is shown. > any help would be appreciated > > > > Another exception has been detected while we were handling last error. > Dumping information about last error: > ERROR REPORT FILE = (N/A) > An unexpected exception has been detected in native code > outside the VM. > PC= 0x0029cded > Unexpected Signal : 11 occurred at PC=0x29CDED > SIGNAL= 11 > Function=FUNCTION NAME = (null)+0x29CDED > (N/A) > Library=/lib/tls/libc.so.6 > OFFSET= 0x29CDED > > LIBRARY NAME = NOTE: We are unable to locate the function name > symbol for the error > /lib/tls/libc.so.6 > just occurred. Please refer to release documentation > for possible > Please check ERROR REPORT FILE for further information, if > there is any. > Good bye. > reason and solutions. > > > Current Java thread: > at java.net.Inet4AddressImpl.getHostByAddr(Native Method) > at java.net.InetAddress$1.getHostByAddr(InetAddress.java:774) > at > java.net.InetAddress.getHostFromNameService(InetAddress.java:464) > at java.net.InetAddress.getHostName(InetAddress.java:407) > at java.net.InetAddress.getHostName(InetAddress.java:379) > at > org.apache.coyote.http11.Http11Processor.parseHost(Http11Proce > ssor.java:1308) > at > org.apache.coyote.http11.Http11Processor.prepareRequest(Http11 > Processor.java:1276) > at > org.apache.coyote.http11.Http11Processor.process(Http11Process > or.java:817) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle > r.processConnection(Http11Protocol.java:732) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi > nt.java:619) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( > ThreadPool.java:688) > at java.lang.Thread.run(Thread.java:534) > > Dynamic libraries: > Can not get information for pid = 5855 > > Heap at VM Abort: > Heap > def new generation total 3520K, used 2449K [0x08e6, > 0x0923, > 0x0934) > eden space 3136K, 75% used [0x08e6, 0x090ae558, 0x0917) > from space 384K, 22% used [0x091d, 0x091e60b8, 0x0923) > to space 384K, 0% used [0x0917, 0x0917, 0x091d) > tenured generation total 46504K, used 38229K [0x0934, > 0x0c0aa000, > 0x0ce6) >the space 46504K, 82% used [0x0934, 0x0b895408, 0x0b895600, > 0x0c0aa000) > compacting perm gen total 20224K, used 19970K [0x0ce6, > 0x0e22, > 0x10e6) >the space 20224K, 98% used [0x0ce6, 0x0e1e0808, 0x0e1e0a00, > 0x0e22) > > Local Time = Fri Oct 21 22:05:03 2005 > Elapsed Time = 33731 > # > # The exception above was detected in native code outside the VM > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode) > # > # An error report file has been saved as /tmp/hs_err_pid5855.log. > # Please refer to the file for further information. > # > jsvc.exec error: Service did not exit cleanly > > > > > > > -- > Mark Shifman MD. Ph.D. > Yale Center for Medical Informatics > Phone (203)737-5219 > [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]
RE: Error: Cannot get a connection, pool exhausted
java.sql.PreparedStatement pstmt = null; > > try > { > // vector to hold result data set > java.util.Vector yearList = new java.util.Vector(); > > // get connection > conn = getConnection(); > > pstmt = conn.prepareStatement(yearQueryCommand()); > pstmt.setString(1, teamId); > > // execute query > rs = pstmt.executeQuery(); > > // There can be multiple records. > while (rs.next()) > { > yearList.addElement(rs.getString(1)); > > } > > rs.close(); > > pstmt.close(); > > // can relese connection now > releaseConnection(); > > return yearList; > } > catch(Exception e) > { > finally > { > try > { > if(rs != null) >rs.close(); > if (pstmt != null) > pstmt.close(); > if (conn != null) > conn.close(); > } > catch(SQLException se) > { > /** Ignore */ > } > } > > throw new DAOException("getYears(): Failed to > access report > year ! Error: " + e.getMessage()); > } > > } > > > Thanks > Kumar > > > -Original Message- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 26, 2005 10:35 AM > To: 'Tomcat Users List' > Subject: RE: Error: Cannot get a connection, pool exhausted > > > > how many concurrent requests are you handling? you have configured > > maxActive > > 100 > so as soon as 100 concurrent conns are reached, you will > exhaust the pool. > > If you do not have as many as 100 concurrent conns, then it > is likely that > your servlet calls are not returning conns to the pool after they have > finished using them. Make sure that your servlets' doPost() > and doGet() > methods include a call to the Connection#close() method > before they return, > whether or not an error occurred. This returns connections > to the pool, for > use by other threads using the pool. The best place to call > the close() > method is in a finally() block. > > > -Original Message- > > From: KUMAR, NANDA [AG-Contractor/1000] > > [mailto:[EMAIL PROTECTED] > > Sent: Wednesday 26 October 2005 16:13 > > To: users@tomcat.apache.org > > Subject: Error: Cannot get a connection, pool exhausted > > > > > > Frequently we were getting "Cannot get a connection, pool > > exhausted" error > > on production. I know in our application, we are closing the > > connection > > after each connection. Here is our context.xml parameters and > > values. We set > > maxActive connection to 100. Please let me know what we are > > doing wrong or > > if you need more information. > > > > > > > workDir="work\Catalina\localhost\test"> > > > > > > > > url > > jdbc:oracle:thin:@test.com:1521:test > > > > > > password > > test123 > > > > > > maxActive > > 100 > > > > > > maxWait > > 1 > > > > > > driverClassName > > oracle.jdbc.driver.OracleDriver > > > > > > username > > test > > > > > > maxIdle > > 30 > > > > > > > > > > Thanks > > Kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Should a missing jsp:include target cause TC to throw an exception or HTTP error code?
I got no reply to my first post (below), maybe I was too wordy, so here's a short version of the Q: If I include a JSP fragment within another JSP page like this: but the file "test.jsp" does not exist, should TC throw an Exception? Or maybe an HTTP 404? I have a case like this where TC ignores the include altogether, wondering why no error reported by TC. > -Original Message----- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Friday 21 October 2005 18:57 > To: 'users@tomcat.apache.org' > Subject: Should a missing jsp:include target cause TC to > throw an exception or HTTP error code? > > > > TC 5.5.9 > WinXP SP2 > JDK 1.5.0_02-b09 > > My webapp framework is based around my own Invoker servlet, > which response to every request via a generic JSP build page. > This build page itself includes other files, as shown in > this snippet: > >"_begin.jsp" %>" /> > >"_end.jsp" %>" /> > > Each request to the webapp is received by a servlet, which > forwards to the JSP snippetted above to render the response, > and the JSP decides which JSPFs to assemble to customise the > response layout according to the request. > > This all worked fine. Then I accidentally omitted 2 JSP > fragment files from the war file when reorganising my code - > the files referred to in lines 1 and 3 above. I would expect > that to cause a runtime exception of some sort if the target > files don't exist. (Right?) However, no exception is thrown. > The build page (that calls the jsp:includes) just carries on > and assembles the rest of the page, omitting the files that > it can't find. Hm. Sort of nice that it doesn't > complain, but also sort of worrying. > > Having had a brief look at the TC source, I focused on the > source code of org.apache.jasper.servlet.JspServlet:279, > which appears to show that if the jsp:include file cannot be > found at the specified URI, then TC will return an HTTP 404 > status code in this situation, if I am understanding it correctly: > > // snippet from JspServlet#serviceJspFile > > if (null == context.getResource(jspUri)) > { > > response.sendError(HttpServletResponse.SC_NOT_FOUND, jspUri); > // this is the line in the stacktrace > return; // to calling JspServlet#service() method > } > > But, the weird thing is, my current TC server does not appear > to do that. Each page is returned with a SC of 200. No > exceptions logged at all. The only defect is that the > response pages don't include the two JSPF files. > > I'm concerned that I have done something to the config of my > webapp that is suppressing the error somehow. But I also > realise that I might have misinterpreted what I have read of > the TC source files. > > So I have two questions please: > > Q1: have I understood correctly, that TC should throw an > exception or HTTP SC if it can't find a jsp:include file when > processing a JSP? > > Q2: what might I have done that could suppress this sort of error? > > There is more to this problem, but I won't post the next > chapter because the answers to Q1 and Q2 might change what is > relevant for me to post. > > Thanks. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ? xmlValidation Attribute -- What's it Mean ?
I believe (although am not 100% sure because I haven't tried it myself) that xmlValidation="true" means that TC's XML parser should check all XML against the DTD defined in each XML source. With xmlValidation="false", it will check that the xml is "well-formed" but not that it is "valid". See these refs: http://www.w3.org/TR/REC-xml/#dt-valid http://www.w3.org/TR/REC-xml/#dt-wellformed So I think (?) that if you set xmlValidation="true", you must include a DTD link in each XML source. If you do not have one, this might be why you are getting a stacktrace. The reason for the long stacktrace is that the parsing is done by a generic parser bundled into TC, so the TC authors cannot control the call stack, or when exceptions are thrown or the exception messages - they simply wrap them with a higher level exception as appropriate. If it helps, I have reported a similar issue where I thought that TC's wrapping exception message could be made clearer to users. Not sure about Xerces 2.2 but ISTR that there is some issue with a change to the XML parser that ships with TC, this issue is mentioned in 5.5.x release notes so that might be worth a look up http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt . See also "XML Parsers and J2SE 1.4" at bottom of http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html - this might be relevant? > -Original Message- > From: Bob Bronson [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 04:24 > To: tomcat-user@jakarta.apache.org > Subject: ? xmlValidation Attribute -- What's it Mean ? > > > Hi all, > > I'm using TC 5.5.12. > > Please look at this snippet from the server.xml that is distributed > with TC: > > > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > > Can anyone tell me what the 'xmlValidation' attribute on > is for? > Obviously it has something to do with "XML validation" but > what XML? Is > it the corresponding web.xml? And how does the 'xmlNamespaceAware' > attribute fit in? Every web.xml I've ever seen uses the default > namespace? > > And what's the comment about the Xerces 2.2 parser? I'm using > Sun's JDK > 1.5.0. Does that use Xerces internally? > > When I set the 'xmlValidation' attribute to 'true' I get a big stack > trace. One would think it might be appropriate to offer a nice error > message describing the problem. > > I've looked at the latest TC documentation for and it makes no > mention of the 'xmlValidation' attribute: > http://tomcat.apache.org/tomcat-5.5-doc/config/host.html > > Can someone please explain these two attributes? My web.xml > is getting > unwieldy and I'd like to start validating it. > > Thanks very much. > > -- > Bob Bronson > > > > - > 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]
RE: getPageContext returns null
not sure about use of PageContext, never used it. ... or about the "correct" way to pass info from servlet to jsp (if there even is one), but if it helps, I use this approach and it works well: // in the servlet's doPost() request.setAttribute(MyConstants.MY_OBJECT_CONSTANT_NAME, myObject); request.getRequestDispatcher("blah.jsp").forward(request, response); // in the JSP Object myObject = request.getAttribute(MyConstants.MY_OBJECT_CONSTANT_NAME); > -Original Message- > From: Michael Neel [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 16:12 > To: users@tomcat.apache.org > Subject: getPageContext returns null > > > Hi, > > Quick overview, I'm setting some variables in the session from my > servlet to be used in my JSP/JSTL page. Everything is fine if a JSP > page is called before the servlet, but a call to the servlet first > results in JspFactory.getPageContext to return null. > > To reproduce, I restart the Tomcat server, clear the session cookies > from the client, and go to the servlet URL directly. > > I found this bug report which is the problem exactly: > http://issues.apache.org/bugzilla/show_bug.cgi?id=3752 > > If i go to a jsp page after starting the server, any JSP page, then go > to the servlet url directly everything works as expected. Like the > bug poster, if this is a no-no I'm curious why the factory and the > call to create the context throw no exceptions. I'm more curious > though as to what the correct way is for passing information from > servlet to jsp. > > Mike > > A stripped down version of the code in question: > > RequestDispatcher dispat = null; > > JspFactory factory = JspFactory.getDefaultFactory(); > PageContext pageContext = this.factory.getPageContext( > this, request, response, > null, false, JspWriter.DEFAULT_BUFFER, true); > > // expected URL is something like /AppName/SevrletName/45 > // path_info is '/45' > String id = request.getPathInfo().substring(1); > > // *snipping* sql-setup to look up 'id' > ResultSet rs = sql.executeQuery(); > if(rs != null) { > rs.next(); > String title = rs.getString("title"); > String preamble = rs.getString("preamble"); > > pc.setAttribute("title", title, > PageContext.REQUEST_SCOPE); > pc.setAttribute("preamble", preamble, > PageContext.REQUEST_SCOPE); > > dispat = > getServletContext().getRequestDispatcher('page1.jsp'); > } > else { > pc.setAttribute("errorMessage", "ID was not found", > PageContext.REQUEST_SCOPE); > dispat = > getServletContext().getRequestDispatcher('error.jsp'); > } > > factory.releasePageContext(ps); > > dispat.forward(request, response); > > - > 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]
RE: Error: Cannot get a connection, pool exhausted
how many concurrent requests are you handling? you have configured > maxActive > 100 so as soon as 100 concurrent conns are reached, you will exhaust the pool. If you do not have as many as 100 concurrent conns, then it is likely that your servlet calls are not returning conns to the pool after they have finished using them. Make sure that your servlets' doPost() and doGet() methods include a call to the Connection#close() method before they return, whether or not an error occurred. This returns connections to the pool, for use by other threads using the pool. The best place to call the close() method is in a finally() block. > -Original Message- > From: KUMAR, NANDA [AG-Contractor/1000] > [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 16:13 > To: users@tomcat.apache.org > Subject: Error: Cannot get a connection, pool exhausted > > > Frequently we were getting "Cannot get a connection, pool > exhausted" error > on production. I know in our application, we are closing the > connection > after each connection. Here is our context.xml parameters and > values. We set > maxActive connection to 100. Please let me know what we are > doing wrong or > if you need more information. > > > workDir="work\Catalina\localhost\test"> > > > > url > jdbc:oracle:thin:@test.com:1521:test > > > password > test123 > > > maxActive > 100 > > > maxWait > 1 > > > driverClassName > oracle.jdbc.driver.OracleDriver > > > username > test > > > maxIdle > 30 > > > > > Thanks > Kumar > > > > -- > --- > This e-mail message may contain privileged and/or > confidential information, and is intended to be received only > by persons entitled to receive such information. If you have > received this e-mail in error, please notify the sender > immediately. Please delete it and all attachments from any > servers, hard drives or any other media. Other use of this > e-mail by you is strictly prohibited. > > > All e-mails and attachments sent and received are subject to > monitoring, reading and archival by Monsanto. The recipient > of this e-mail is solely responsible for checking for the > presence of "Viruses" or other "Malware". Monsanto accepts no > liability for any damage caused by any such code transmitted > by or accompanying this e-mail or any attachment. > -- > --- > > > - > 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]
RE: DBCP connection leak after undeploy
Your code and config below look fine to me, conns seem to be returned OK to pool as you say. Sounds to me like the pool itself leaves the database with hanging conns in the pool when it goes down. When you say "If I deploy/undeploy several times" do you stop and restart TC between undeploy and redeploy? If so, might be worth trying to see whether the problem still happens if you stop and restart TC cleanly rather than redeploying the webapp while TC is running? Might help narrow down the cause slightly. Might be worth reporting to bugzilla? > -Original Message- > From: Bogdan Calmac [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 02:18 > To: users@tomcat.apache.org > Subject: DBCP connection leak after undeploy > > > I've written a simple web application consisting of a servlet which > does a select from a table and displays the result. It is then > packaged as a war and deployed using the tomcat ant task. After > executing the servlet, it is undeployed using the ant task again. > stdout confirms that the webapp is deployed and undeployed without > errors. The problem is that the connection to the DB is left open even > after undeploy. > > Software used: > - tomcat 5.5.9 on Windows > - DBCP connection pool > - MSSQL server > > The datasource is defined in META-INF/context.xml with: > >type="javax.sql.DataSource" >maxActive="5" maxIdle="2" maxWait="1" >username="sa" password="sa" >driverClassName="net.sourceforge.jtds.jdbc.Driver" >url="jdbc:jtds:sqlserver://localhost/pubs"/> > > and then referenced in WEB-INF/web.xml with: > > > DB Connection > jdbc/default > javax.sql.DataSource > Container > > > The code accessing the database is: > > private long getTitlesCount() { > Connection conn = null; > Statement stmt = null; > ResultSet rs = null; > try { > InitialContext cxt = new InitialContext(); > DataSource ds = (DataSource) cxt.lookup( > "java:/comp/env/jdbc/default" ); > conn = ds.getConnection(); > stmt = conn.createStatement(); > rs = stmt.executeQuery("select count(*) from titles"); > if (rs.next()) > return rs.getLong(1); > > } > catch(Exception e) { > System.out.println("Failed to retrive title count > from the DB."); > e.printStackTrace(); > } > finally { > if (rs != null) try { rs.close(); } catch (Exception e) {} > if (stmt != null) try { stmt.close(); } catch (Exception e) {} > if (conn != null) try { conn.close(); } catch (Exception e) {} > } > return -1; > } > > > If I deploy/undeploy several times, the number of leaked connections > is incremented with 1 each time. > > If I execute the servlet several times, the number of connections > remains constant, which confirms that the servlet releases the > connection properly. > > My guess is that the datasource is not tied to the webapp and it is > not notified/released when the webapp is undeployed. > > - > 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]
RE: How to create a website in apache-tomcat-5.5.12
Two things: 1. you need to deploy your webapp as the ROOT webapp on the server. there is a standard ROOT webapp that ships with TC, you can just replace that if you want to, examine that to see how to configure it, look especially at the %catalina_home%/webapps/ROOT/WEB-INF/web.xml config file. 2. you need to edit %catalina_home%/conf/server.xml so that TC listens on port 80 rather than 8080, to do that you need to edit this line (from the standard file on TC 5.5.9): your webapp is then at the URI of "/" rather than "/myDomain" so it's URL will be whatever the server name is, e,g, www.myservername.com . Configuring the domain name is outside the scope of TC config - you need to get your ISP to config nameserver entries for that. > -Original Message- > From: A.Mohan [mailto:[EMAIL PROTECTED] > Sent: Monday 24 October 2005 05:08 > To: users@tomcat.apache.org > Subject: How to create a website in apache-tomcat-5.5.12 > > > Hi All > Im new to this group . > i had some doubts regarding my subject(mail) > > i had developed a web application named myDomain under webapps dir > So far my development i used to call the application in tomcat > like http://localhost:8080/myDomain > Now i want it to be deployed in www server so that i can call > it simply > www.myDomain.com that is also tomcat server. > > What could i do for it , simply i want to create a domain in tomcat > how can i create , i struggled to found out the soln > help me out -- please > > Thanks > Mohan > > > > > > - > Yahoo! FareChase - Search multiple travel sites in one click. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tracking
Charles, I don't know of a way to have TC clear up conns for you, but you really should clear up connections explicitly. To some extent DBCP will clear up "abandoned" connections (to which you had a variable reference, which goes out of scope when you have finished processing the request), but this is bad style rally and you should not rely on it. The "standard" way to clear up connections is to use a try/catch/finally structure in your code. eg (I'm assuming that you are using DBCP) Connection c = MyClass.getConnection(); // or however you get a conn from the pool try { // use the connection to do whatever } catch(Exception e) { // handle exceptions } finally { c.close(); } > -Original Message- > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > Sent: Tuesday 25 October 2005 21:05 > To: Tomcat Users List > Subject: Tracking > > My bigger problem is that I am using Connection pooling. And > if I don't > close every connection when I am down with it, the server stops > responding. Restart Tomcat and everything is back to normal. > Is there > a setting to have Tomcat close all connections for me when a request > finishes? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Remote deployments in Tomcat 5.5.9
I am using TC 5.5.9 on WinXP Pro here, but AFAIK the config is the same on Solaris. Your remote server needs to have the manager webapp installed and enabled. It is installed in TC as standard (at least it is in 5.5.9, which I am using). However it ships disabled for security reasons so before the manager webapp works, you need to create a user in conf\tomcat-users.xml which has the manager role. You also need to make sure that there is a realm configured in server.xml to read tomcat-user.xml - again this is configured in the standard install. without this, the manager webapp will not run. //example content of conf/tomcat-users.xml Once you have done that, you can access the webapp through the URI "/manager/html/", and remote client PCs with the joebloggs/secret credentials should be able to deploy webapps on the server. > -Original Message- > From: Nehal Sangoi [mailto:[EMAIL PROTECTED] > Sent: Saturday 22 October 2005 10:18 > To: 'Tomcat Users List' > Subject: Remote deployments in Tomcat 5.5.9 > > > > Hi, > > I am currently implementing Tomcat 5.5.9 on solaris10. I need > to know the > configuration details of manager deployer, that can be used to deploy > webapps on remote tomcat hosts. I have written an ant build > script. But that > is doing only a deployment and onto local machine itself. > > Please guide me doing this. Also, i am a newbie to Tomcat > technology :)) > > > Thanks, > Nehal > > > - > 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]
RE: problem in getting database connection from remote machine using JNDI
at the risk af asking the obvious, does the database "myDB" exist on the remote server at the same port number, and with the same username and pw as on the local server, and if so, does it have any IP address filters that forbid remote mysql client connections? > -Original Message- > From: rahul [mailto:[EMAIL PROTECTED] > Sent: Monday 24 October 2005 15:26 > To: Tomcat Users List > Subject: problem in getting database connection from remote > machine using JNDI > > > Hi all, > > I am using tomcat JNDI for getting databse connection in my > application > > For this I have created a context.xml file in myAPP/META-INF > which looks like this: > > > privileged="true" crossContext="true"> > type="javax.sql.DataSource" maxActive="30" maxIdle="10" > maxWait="6000" > username="user" password="password" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true" > autoReconnect="true" > validationQuery="select now()" > factory="org.apache.commons.dbcp.BasicDataSourceFactory"/> > > > > This works absolutely fine. But when I try to connect to a > remote database > by changing url in above > file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails > It creates following exception while retrieving a connection: > org.apache.tomcat.dbcp.dbcp.SQLNestedException: > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > > > code I have written for fetching connection is: > > >Context ctx = (Context) new InitialContext() > .lookup("java:comp/env"); >if (ctx == null) >{ > throw new Exception("No context available"); >} else >{ > dataSource = (DataSource) ctx.lookup("jdbc/icontact"); > Connection connection = dataSource.getConnection(); >} > > > can anybody help? > > > thanks in advance > --RahulJoshi > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP 500 Error.
the key lines to look at more closely at these: java.lang.ClassCastException org.apache.jsp.errorpage_jsp._jspService(errorpage_jsp.java:103) ... org.apache.jsp.preview_jsp._jspService(preview_jsp.java:135) (esp the latter), and: "note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs" I would take a look at the logs for more info then look at the lines in the _jsp.java files mentioned in the stacktrace above. These "_jsp.java" files are the java source files defining the servlets that TC automatically converts your JSPs into. You should be able to recognise from there where the error is in your JSP source. You will find the files in this folder: %catalina_home%/work/[engine-name]/[host-name]/[webapp-name]/org/apache/jsp/ where [engine-name] and [host-name] are usually "catalina" and "localhost" unless you have changed them in %catalina_home%/conf/server.xml > -Original Message- > From: cory ng [mailto:[EMAIL PROTECTED] > Sent: Monday 24 October 2005 18:47 > To: users@tomcat.apache.org > Subject: HTTP 500 Error. > > > Hello! I know this is a general error and I tried > numerous scenarios of registering and unregistering > componenets and dlls and restarts of the tomcat apache > service. I tried changing some code in some jsp files. > The error is referring to a jasper exception and a > class cast exception. Attached is the error I receive > int he web site word for word. I googled for answers > but I'n not seeing anything related. If anyone has > encountered or seen this before. Can you please point > me in the right direction. This error is generated > when I click on a print preview button to display a > report. I will investigate more. Any information will > be appreciated. Thank you. > > > > __ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Should a missing jsp:include target cause TC to throw an exception or HTTP error code?
TC 5.5.9 WinXP SP2 JDK 1.5.0_02-b09 My webapp framework is based around my own Invoker servlet, which response to every request via a generic JSP build page. This build page itself includes other files, as shown in this snippet: " /> " /> Each request to the webapp is received by a servlet, which forwards to the JSP snippetted above to render the response, and the JSP decides which JSPFs to assemble to customise the response layout according to the request. This all worked fine. Then I accidentally omitted 2 JSP fragment files from the war file when reorganising my code - the files referred to in lines 1 and 3 above. I would expect that to cause a runtime exception of some sort if the target files don't exist. (Right?) However, no exception is thrown. The build page (that calls the jsp:includes) just carries on and assembles the rest of the page, omitting the files that it can't find. Hm. Sort of nice that it doesn't complain, but also sort of worrying. Having had a brief look at the TC source, I focused on the source code of org.apache.jasper.servlet.JspServlet:279, which appears to show that if the jsp:include file cannot be found at the specified URI, then TC will return an HTTP 404 status code in this situation, if I am understanding it correctly: // snippet from JspServlet#serviceJspFile if (null == context.getResource(jspUri)) { response.sendError(HttpServletResponse.SC_NOT_FOUND, jspUri); // this is the line in the stacktrace return; // to calling JspServlet#service() method } But, the weird thing is, my current TC server does not appear to do that. Each page is returned with a SC of 200. No exceptions logged at all. The only defect is that the response pages don't include the two JSPF files. I'm concerned that I have done something to the config of my webapp that is suppressing the error somehow. But I also realise that I might have misinterpreted what I have read of the TC source files. So I have two questions please: Q1: have I understood correctly, that TC should throw an exception or HTTP SC if it can't find a jsp:include file when processing a JSP? Q2: what might I have done that could suppress this sort of error? There is more to this problem, but I won't post the next chapter because the answers to Q1 and Q2 might change what is relevant for me to post. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]