Log4J error using Quartz scheduler
Hello - Wondering if anyone can help. I am using: - Tomcat 6.0.14 on Linix - Java 1.5.0_13 - Spring 2.5.1 - Quartz scheduler 1.6.0 - commons logging 1.1.1 I am seeing the following in the tomcat catalina-2008-mm-dd.log file: SEVERE: Runtime error occured in main trigger firing loop. java.lang.NullPointerException at org.apache.commons.logging.LogFactory.getCachedFactory(LogFactory.java:9 79) at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:435) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685) at org.quartz.core.JobRunShell.init(JobRunShell.java:80) at org.quartz.impl.StdJobRunShellFactory.borrowJobRunShell(StdJobRunShellFa ctory.java:86) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:357 ) 11-Aug-2008 5:44:01 PM org.quartz.core.QuartzSchedulerThread run Can anyone point me to how I might fix this? I am flummoxed. Any help is greatly appreciated. Thanks. Brian Parkinson Avanaing Inc. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie question about log config with JSF
Hello - hoping someone can help with a (dumb?) easy log config question. I am using Tomcat 6.0.16 with JSF 1.2.9 (Mojarra) - everything is working pretty cool, but I am getting one SEVERE exception being thrown from JSF, which appears in the logs: SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /secure/ecobee4.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImp [EMAIL PROTECTED] Unfortunately, I have no stack trace information in the logs for this, which I need to help track this down. So, I tried changing the log levels for the file and console loggers to FINEST: 1catalina.org.apache.juli.FileHandler.level = FINEST java.util.logging.ConsoleHandler.level = FINEST but this didn't do the trick. The stderr_20080811.log and stdout_20080811.log files are empty. If anyone can point out the changes needed to log the full stack trace, it would be heartily welcomed - I'm a little stumped. Many thanks. Brian Parkinson Avaning Inc. --- x8 snip conf: cat logging.properties # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the License); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4admin.org.a pache.juli.FileHandler, 5host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler # Handler specific properties. # Describes specific configuration info for Handlers. 1catalina.org.apache.juli.FileHandler.level = FINEST 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.FileHandler.prefix = catalina. 2localhost.org.apache.juli.FileHandler.level = FINE 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 2localhost.org.apache.juli.FileHandler.prefix = localhost. 3manager.org.apache.juli.FileHandler.level = FINE 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 3manager.org.apache.juli.FileHandler.prefix = manager. 4admin.org.apache.juli.FileHandler.level = FINE 4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 4admin.org.apache.juli.FileHandler.prefix = admin. 5host-manager.org.apache.juli.FileHandler.level = FINE 5host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 5host-manager.org.apache.juli.FileHandler.prefix = host-manager. java.util.logging.ConsoleHandler.level = FINEST java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Facility specific properties. # Provides extra control for each logger. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] .level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] .handlers = 3manager.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].l evel = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].h andlers = 4admin.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-man ager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-man ager].handlers = 5host-manager.org.apache.juli.FileHandler # For example, set the com.xyz.foo logger to only log SEVERE # messages: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE conf: - 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: serving files through SSL
I obviously did not look hard enough in the right places, sorry. That worked. Specifically: response.setHeader(Pragma, cache); response.setHeader(Cache-Control, cache); fixed it. Thanks for the help. Roger Caldarale, Charles R wrote: From: Roger Parkinson [mailto:[EMAIL PROTECTED] Subject: Re: serving files through SSL I've identified that the cache headers are being set by default on the dynamic file. I don't know that they are the issue but it is the one difference I can spot. As you've been told before, it definitely is the issue. To repeat: This is a known problem with IE. A search of the archives (http://marc.info/?l=tomcat-user) for pdf cache turns up numerous hits, including this one: http://marc.info/?l=tomcat-userm=108431336725309w=2 - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: serving files through SSL
Gabe: 1) response.setContentLength(10115); Yep, hard coded value figured by checking the length of my test pdf file manually. I believe it is correct. I don't want to add the code that would figure the length unless I have some evidence that it makes any difference and it hasn't yet. 2) I changed the ETag to add the extra quote but that made no difference. I believe that the ETag is just a semi-random string ('semi' meaning it is the same value for the same file but otherwise randomly generated). So the actual content should make no difference. I'm still looking for the difference between the response for the static file and the response for the dynamic file. I've identified that the cache headers are being set by default on the dynamic file. Is there a way to turn these off? I don't know that they are the issue but it is the one difference I can spot. Thanks Roger Gabe Wong wrote: Roger Parkinson wrote: I'm opening the PDF in a new window (as the javascript shows) so what I see for the dynamic pdf is: 1) the new window (empty) 2) the download progress dialog 3) an error dialog referring the file name with the message 'cannot write the file to the cache' On the static PDF I don't see 2 or 3 and the new window has the PDF displayed. (I' using the terms dynamic and static as referred to in my initial question, ie static is the PDF in the war file that always works and dynamic is the one fetched from outside the war file by a servlet and this is the one with the problem). I did search on that cache message and all the solutions told me to either upgrade my browser from 5.5 (I'm using 6), change the browser config, or set the cache headers that seem to be already set. It was when I realised that the static PDF was always just fine that I concluded that the problem did not need to be solved at the browser end. 1)response.setContentLength(10115); Is 10115 a hard coded number or just there as an illustration. If it is hard coded then the content length should be set to the correct value. 2) response.addHeader(ETag,W/\963288-1194247031062); Perhaps the missing \ at the end could be a problem? - 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: serving files through SSL
In both cases the URL is invoke with some javascript that looks like this: function downloadpdf(url) { var pdfWindow = window.open( url ,'pdf','top=0,left=0,width=1000,height=700,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no'); } The application invokes a mix of html and servlet requests beforehand. But the response to the static PDF always works regardless of when it is called Regards Roger Gabe Wong wrote: Roger Parkinson wrote: I am trying to deliver some PDFs to the browser using my tomcat application. It works, but not always under SSL and IE. One file is a static PDF and it lives inside my war file. That works just fine. The file is accessed using a url like /myapp/web/myfile.pdf and that always delivers the file. Other files are generated by the app and live in a configured directory. They are delivered through a servlet that looks like this: String mimeType = sc.getMimeType(filename); FileHelper helper = new FileHelper(); InputStream in = helper.fetch(filename, m_dir); response.setContentType(mimeType); response.setContentLength(10115); response.addHeader(ETag,W/\963288-1194247031062); OutputStream out = response.getOutputStream(); byte[] buf = new byte[1024]; int count = 0; while ((count = in.read(buf)) = 0) { out.write(buf, 0, count); } in.close(); out.close(); So apart from some minor fiddling with the contentType etc I don't do very much. This works fine outside of SSL and it also works fine with SSL and Firefox, but not SSL+IE. Thinking it was a problem with headers I did some research and found a lot of stuff about setting no cache etc. Tried it and it nothing made any difference (except that I managed to break it). I have taken all those out because the static file, the one I mentioned at first, is delivering okay to IE over SSL so I don't believe there is a problem at the IE end, or not one that cannot be overcome by getting my response right at the server end. I used TCPMonitor to sniff the headers using non-SSL and found that the static file has this response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 ETag: W/963288-1194247031062 Last-Modified: Mon, 05 Nov 2007 07:17:11 GMT Content-Type: application/pdf Content-Length: 963288 Date: Wed, 07 Nov 2007 04:54:39 GMT ... pdf file follows So there doesn't seem to be too much going on there. When I respond to the request for the dynamic file it looks like this: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 12:00:00 NZST ETag: W/963288-1194247031062 Content-Type: application/pdf Content-Length: 10115 Date: Wed, 07 Nov 2007 05:32:02 GMT ...pdf file follows. I am getting some cache headers added for free otherwise there is no difference in the request. Of course those headers may be making all the difference because IE's message is 'cannot write the file to cache' which is a bit odd because we've explicitly told it not to here. Searching the web on this has a number of answers that suggest adding those no-cache headers anyway. So, does anyone know what I need to do to make the two responses enough the same to stop IE complaining? I am aware that I have faked the ETag and the length of the file and that I need to do something smarter there, but I'll do that when it starts working. Version info: Tomcat 5.5, Java 1.5, WinXP SP2 Are you calling the dynamic PDF URL directly? For instance typing in the URL directly in the browser? The reason I am asking, is that for mixed responses from SSL requests, IE puts up a warning, whereas FF does not. - 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: serving files through SSL
I'm opening the PDF in a new window (as the javascript shows) so what I see for the dynamic pdf is: 1) the new window (empty) 2) the download progress dialog 3) an error dialog referring the file name with the message 'cannot write the file to the cache' On the static PDF I don't see 2 or 3 and the new window has the PDF displayed. (I' using the terms dynamic and static as referred to in my initial question, ie static is the PDF in the war file that always works and dynamic is the one fetched from outside the war file by a servlet and this is the one with the problem). I did search on that cache message and all the solutions told me to either upgrade my browser from 5.5 (I'm using 6), change the browser config, or set the cache headers that seem to be already set. It was when I realised that the static PDF was always just fine that I concluded that the problem did not need to be solved at the browser end. Thanks for your help Roger Gabe Wong wrote: Roger Parkinson wrote: In both cases the URL is invoke with some javascript that looks like this: function downloadpdf(url) { var pdfWindow = window.open( url ,'pdf','top=0,left=0,width=1000,height=700,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no'); } The application invokes a mix of html and servlet requests beforehand. But the response to the static PDF always works regardless of when it is called Regards Roger For further clarification, what exactly is the result when the dynamic PDF over SSL fails to work? blank page? Error? etc. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
serving files through SSL
I am trying to deliver some PDFs to the browser using my tomcat application. It works, but not always under SSL and IE. One file is a static PDF and it lives inside my war file. That works just fine. The file is accessed using a url like /myapp/web/myfile.pdf and that always delivers the file. Other files are generated by the app and live in a configured directory. They are delivered through a servlet that looks like this: String mimeType = sc.getMimeType(filename); FileHelper helper = new FileHelper(); InputStream in = helper.fetch(filename, m_dir); response.setContentType(mimeType); response.setContentLength(10115); response.addHeader(ETag,W/\963288-1194247031062); OutputStream out = response.getOutputStream(); byte[] buf = new byte[1024]; int count = 0; while ((count = in.read(buf)) = 0) { out.write(buf, 0, count); } in.close(); out.close(); So apart from some minor fiddling with the contentType etc I don't do very much. This works fine outside of SSL and it also works fine with SSL and Firefox, but not SSL+IE. Thinking it was a problem with headers I did some research and found a lot of stuff about setting no cache etc. Tried it and it nothing made any difference (except that I managed to break it). I have taken all those out because the static file, the one I mentioned at first, is delivering okay to IE over SSL so I don't believe there is a problem at the IE end, or not one that cannot be overcome by getting my response right at the server end. I used TCPMonitor to sniff the headers using non-SSL and found that the static file has this response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 ETag: W/963288-1194247031062 Last-Modified: Mon, 05 Nov 2007 07:17:11 GMT Content-Type: application/pdf Content-Length: 963288 Date: Wed, 07 Nov 2007 04:54:39 GMT ... pdf file follows So there doesn't seem to be too much going on there. When I respond to the request for the dynamic file it looks like this: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 12:00:00 NZST ETag: W/963288-1194247031062 Content-Type: application/pdf Content-Length: 10115 Date: Wed, 07 Nov 2007 05:32:02 GMT ...pdf file follows. I am getting some cache headers added for free otherwise there is no difference in the request. Of course those headers may be making all the difference because IE's message is 'cannot write the file to cache' which is a bit odd because we've explicitly told it not to here. Searching the web on this has a number of answers that suggest adding those no-cache headers anyway. So, does anyone know what I need to do to make the two responses enough the same to stop IE complaining? I am aware that I have faked the ETag and the length of the file and that I need to do something smarter there, but I'll do that when it starts working. Version info: Tomcat 5.5, Java 1.5, WinXP SP2 Thanks for your help. Roger - 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: [tomcat]How to decrypt the DIGEST authentication?
Think about it the other way around. User types cleartext password, tomcat's authentication digests it and then compares with what is on the database. So when they change the password you need to capture the password in cleartext, digest it yourself, then store it. You don't need to decrypt it, you actually need to ENCRYPT (ie digest) it. take a look at: http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html specifically: If you are writing an application that needs to calculate digested passwords dynamically, call the static |Digest()| method of the |org.apache.catalina.realm.RealmBase| class, passing the cleartext password and the digest algorithm name as arguments. This method will return the digested password. Roger zhongliang zhang wrote: Hi,everyone, I got a problem with the DIGEST authentication. I configured my web.xml as followed: security-constraint web-resource-collection web-resource-nameapp/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-namepoweruser/role-name /auth-constraint /security-constraint login-config auth-methodDIGEST/auth-method realm-nameapp/realm-name /login-config So,if anybody try to access my app,he needs to input his username and password,while the username and password are stored in the Oracle database,not configured in the tomcat-users.xml file which located at $tomcat_home/conf/ directory. I can not configure it in the tomcat-users.xml for the app has an function of make a new user. Is there anyway to solve this problem? P.S. I tried to solve it by coding in my program,like adding the following code to set the response's status to ask for DIGEST authentication. ((HttpServletResponse) response).setStatus(HttpServletResponse.SC_UNAUTHORIZED); But I do not get a way to decryt the DIGEST information. Any advice will be appreciated! thanks. _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx - 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: Help with Tomcat IIS
We do it because the IIS is already active on the existing server and it is running a bunch of other stuff we don't want to stop (eg MS Exchange). So we cannot have tomcat take over handling port 80 requests. It works fine, though. Roger Jacob Rhoden wrote: Propes, Barry L wrote: there's lots of people who combine the two -- I currently am, because our UNIX support group has not made the environment compatible for or with Tomcat! Sounds like you and I have the same employer (: But seriously, I am trying to work out the pro's and cons of standalone mode. I am wondering why you put IIS in front of tomcat? Does IIS provide other services apart from tomcat, or is there a specific reason? Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: tomcat hang/freeze under windows
Useful stuff, thanks. We don't use any filters in the app, but we do have a db. I'll get them to check it out for deadlocks and get a stacktrace. Still a puzzle why a little demo setup gives this and the live apps don't. It will be interesting when we know. Anyway, good general approach advice. Just what I asked for, thanks. R David Delbecq wrote: Looks like a deadlock occuring at your db. You probably have a filter that applies to each request and is deadlocking in some way. The reason you can still reach the login page is that login page is served by tomcat without getting through the filters. The best way, if you have remote access to app, is to get the jvm to issue a stacktrace. On windows, to do this, you have to hit ctrl-break on console running jvm. An alternate way could be to quickly develop a test war that have one servlet that issues Thread.getAllStackTraces() (java 5) on demand. With a stacktrace, you will know exactly where you http thread is waiting :) En l'instant précis du 28/08/07 23:44, Roger Parkinson s'exprimait en ces termes: Sorry this is question is so terse, but general approach kind of help would be very welcome. I get to the login page every time, but after that there's no response. Seems to be nothing relevant in the logs. The machine is remote from me and in a 12 hours different timezone (yawn...zzz) so getting access to local staff is a challenge. Hence the vagueness (apologies again). Restarting tomcat everything comes right for a while, works perfectly, then... freeze. What we are doing is deploying a pair of war files that are known to be running really well elsewhere (ie on my dev env plus two live sites). There are config options in the apps (there are also config options in tomcat that might be screwed too, still checking that). So I don't think it is the app itself. Actually we don't seem to be getting to the app once it freezes except for the login page. I'm using form based login (is that right term? throws up a JSP page with a user/password prompt if you're not logged in, then lets you proceed). Realm is through JDBC to SQLServer. O/s: windows 2000 Java: jdk1.5.0_11 Tomcat 5.5.7 Thanks for any help. Roger - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat hang/freeze under windows
Sorry this is question is so terse, but general approach kind of help would be very welcome. I get to the login page every time, but after that there's no response. Seems to be nothing relevant in the logs. The machine is remote from me and in a 12 hours different timezone (yawn...zzz) so getting access to local staff is a challenge. Hence the vagueness (apologies again). Restarting tomcat everything comes right for a while, works perfectly, then... freeze. What we are doing is deploying a pair of war files that are known to be running really well elsewhere (ie on my dev env plus two live sites). There are config options in the apps (there are also config options in tomcat that might be screwed too, still checking that). So I don't think it is the app itself. Actually we don't seem to be getting to the app once it freezes except for the login page. I'm using form based login (is that right term? throws up a JSP page with a user/password prompt if you're not logged in, then lets you proceed). Realm is through JDBC to SQLServer. O/s: windows 2000 Java: jdk1.5.0_11 Tomcat 5.5.7 Thanks for any help. Roger - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk Could not find a worker error
Hi All I have installed tomcat5.5 with apache2.2 on a debian box following the guide at http://www.howtoforge.com/apache2_tomcat5_mod_jk I have followed this guide relatively strictly, the only things i have changed are the jdk version used (JDK 6 update 2) and the mod_jk installation method (i used apt-get install libapache-mod-jk) However when i try to test the installation i get a 500 internal server error. There is this line in the mod_jk.log [Thu Aug 23 21:53:56 2007] [6726:42688] [info] jk_handler::mod_jk.c (1986): Could not find a worker for worker name=ajp13 And another thing i have noticed is that when i enter which java on the command line, nothing is returned (it should be my java path /usr/lib/jdk apparently. javac doesnt work either) Just wondering if anybody knows what could be wrong with the installation? Any help greatly appreciated Cheers Will
Re: Tomcat5.5 Ubuntu startup error
Thanks for all your help, i have finally got the server running on localhost:8080. I pointed the JAVA_HOME at the sun jdk instead of the default ubuntu jvm However i am now having a problem integrating it with apache2 mod_jk It wont read .jsp files, the browser genrates this error: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. And the server logs say this - [Sat Jun 09 20:06:34 2007] [17814:5824] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 17 [Sat Jun 09 20:06:34 2007] [17814:5824] [error] ajp_get_reply::jk_ajp_common.c (1531): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sat Jun 09 20:06:34 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1751): Receiving from tomcat failed, recoverable operation attempt=0 [Sat Jun 09 20:06:34 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1783): Sending request to tomcat failed, recoverable operation attempt=1 [Sat Jun 09 20:07:04 2007] [17814:5824] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 17 [Sat Jun 09 20:07:04 2007] [17814:5824] [error] ajp_get_reply::jk_ajp_common.c (1531): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sat Jun 09 20:07:04 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1751): Receiving from tomcat failed, recoverable operation attempt=1 [Sat Jun 09 20:07:04 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1783): Sending request to tomcat failed, recoverable operation attempt=2 [Sat Jun 09 20:07:04 2007] [17814:5824] [error] ajp_service::jk_ajp_common.c (1794): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=worker1 failed [Sat Jun 09 20:07:04 2007] [17814:5824] [info] jk_handler::mod_jk.c (1978): Service error=0 for worker=worker1 Does anybody know what is going wrong with this? Cheers Will On 6/8/07, Matthew Whittaker-Williams [EMAIL PROTECTED] wrote: On Friday 08 June 2007 15:16, Leonel wrote: On 6/7/07, Will Parkinson [EMAIL PROTECTED] wrote: Hi All, I am having a few problems with tomcat 5.5 on ubuntu feisty When i start the tomcat service, its outputs that its started ok, but when i view the status (/etc/init.d/tomcat5.5 status) it says the service is not running. This is in the /var/log/tomcat5.5/catalina.out logfile libgcj: unknown option: -Xmx128M 08/06/2007 14:04:55 5890 jsvc.exec error: Cannot create Java VM 08/06/2007 14:04:55 5889 jsvc.exec error: Service exit with a return value of 1 Does anybody know how to fix this problem? Or does anybody know where to find the libgcj file so i can fix it myself? Cheers Will enable multiverse and install sun-java6-jdk Where did you place these options? and did you set it in JAVA_OPTS or CATALINA_OPTS? Here is my line which works fine: /etc/default/tomcat/tomcat-5.5 JAVA_OPTS=-Xmx4g -Xms2g -XX:NewSize=1g -XX:MaxPermSize=512m -XX:SurvivorRatio=4 -XX: +UseParallelGC -XX:+AggressiveHeap -Djava.awt.headless=true Kind regards Matthew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Will Parkinson MediaArchitecs / BusinessPartner Ph: (07) 3846 2873 Mob: 0433 143 272 0424 433 816
Re: Tomcat5.5 Ubuntu startup error
Hi Zdenek I have JDK 6.0 installed (from this url http://java.sun.com/javase/downloads/index.jsp) Cheers Will On 6/8/07, Zdeněk Vráblík [EMAIL PROTECTED] wrote: Hi Will, what java JDK do you have installed? It looks you don't have installed SUN JDK 5 or higher. Regards, Zdenek On 6/8/07, Will Parkinson [EMAIL PROTECTED] wrote: Hi Rene, Thanks for the help, i removed the line i tried the -Xmx=128m alteration to the JAVA_OPTS line and nothing changes. I also tried removing the -Xmx128M option all together and what i got was this: #/etc/init.d/tomcat5.5 status * Tomcat servlet engine is not running, but pid file exists. And in the log file 08/06/2007 15:45:32 7528 jsvc.exec error: Service killed by signal 6 So im am still a bit stuck Will On 6/8/07, Rene Guenther [EMAIL PROTECTED] wrote: Probably the options setting should be -Xmx=128m. I am not sure, but you should check the enviroment variables: CATALINA_OPTS JAVA_OPTS and the startup scripts in %CATALINA_HOME%\bin René On Fri, 8 Jun 2007 14:14:05 +1000 Will Parkinson [EMAIL PROTECTED] wrote: Hi All, I am having a few problems with tomcat 5.5 on ubuntu feisty When i start the tomcat service, its outputs that its started ok, but when i view the status (/etc/init.d/tomcat5.5 status) it says the service is not running. This is in the /var/log/tomcat5.5/catalina.out logfile libgcj: unknown option: -Xmx128M 08/06/2007 14:04:55 5890 jsvc.exec error: Cannot create Java VM 08/06/2007 14:04:55 5889 jsvc.exec error: Service exit with a return value of 1 Does anybody know how to fix this problem? Or does anybody know where to find the libgcj file so i can fix it myself? Cheers Will - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Will Parkinson MediaArchitecs / BusinessPartner Ph: (07) 3846 2873 Mob: 0433 143 272 0424 433 816 -- Will Parkinson MediaArchitecs / BusinessPartner Ph: (07) 3846 2873 Mob: 0433 143 272 0424 433 816
Tomcat5.5 Ubuntu startup error
Hi All, I am having a few problems with tomcat 5.5 on ubuntu feisty When i start the tomcat service, its outputs that its started ok, but when i view the status (/etc/init.d/tomcat5.5 status) it says the service is not running. This is in the /var/log/tomcat5.5/catalina.out logfile libgcj: unknown option: -Xmx128M 08/06/2007 14:04:55 5890 jsvc.exec error: Cannot create Java VM 08/06/2007 14:04:55 5889 jsvc.exec error: Service exit with a return value of 1 Does anybody know how to fix this problem? Or does anybody know where to find the libgcj file so i can fix it myself? Cheers Will
Re: Tomcat5.5 Ubuntu startup error
Hi Rene, Thanks for the help, i removed the line i tried the -Xmx=128m alteration to the JAVA_OPTS line and nothing changes. I also tried removing the -Xmx128M option all together and what i got was this: #/etc/init.d/tomcat5.5 status * Tomcat servlet engine is not running, but pid file exists. And in the log file 08/06/2007 15:45:32 7528 jsvc.exec error: Service killed by signal 6 So im am still a bit stuck Will On 6/8/07, Rene Guenther [EMAIL PROTECTED] wrote: Probably the options setting should be -Xmx=128m. I am not sure, but you should check the enviroment variables: CATALINA_OPTS JAVA_OPTS and the startup scripts in %CATALINA_HOME%\bin René On Fri, 8 Jun 2007 14:14:05 +1000 Will Parkinson [EMAIL PROTECTED] wrote: Hi All, I am having a few problems with tomcat 5.5 on ubuntu feisty When i start the tomcat service, its outputs that its started ok, but when i view the status (/etc/init.d/tomcat5.5 status) it says the service is not running. This is in the /var/log/tomcat5.5/catalina.out logfile libgcj: unknown option: -Xmx128M 08/06/2007 14:04:55 5890 jsvc.exec error: Cannot create Java VM 08/06/2007 14:04:55 5889 jsvc.exec error: Service exit with a return value of 1 Does anybody know how to fix this problem? Or does anybody know where to find the libgcj file so i can fix it myself? Cheers Will - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Will Parkinson MediaArchitecs / BusinessPartner Ph: (07) 3846 2873 Mob: 0433 143 272 0424 433 816
I want to Redirect to a different app
I have an app running in Tomcat and it works fine. Let's say it is called Demo. I want to leave that instance of the app running just as it is. But I want to be able to do this: http://www.mydomain.com/Testapp Testapp does not exist. I want these requests to invoke Demo, not a second instance of Demo called Testapp, but actually Demo itself. I've looked around for a way to do this but I'm starting to think it cannot be done so time to ask. Configuration is IIS talking to Tomcat 5.5 Thanks Roger -- /Roger Parkinson Mob +64 21 508 792 / - 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: [Fwd: static fields suddenly started sharing]
Thanks for the suggestions, guys. This has been a tricky one to work through but I think I have the answer - kind of. A number of people responded with help for which I am grateful (think: 2am and I'm all alone and it has to be fixed by morning, it is so nice to see a helpful message come through). What I thought I was seeing was the static fields suddenly being shared between two apps. I got reports of errors from the live site (to which I have no direct access) and I reproduced a similar problem on my dev environment. When I looked deeper I found the statics were shared between the two apps so I concluded the same thing was happening on the live site. It certainly explained what they reported from the live site. But two different things were happening. On my dev system I run tomcat under eclipse, using the plugin. It has always worked fine. I recently started using ivy in my eclipse projects and that seems to do something odd to the class loader which is what I was seeing. Filip Hanlik suggested I use this code to see how the classloader was loading: ClassLoader parent = this.getClass().getClassLoader(); while ( parent != null ) { if (parent instance of URLClassLoader) { //print URLs using getURLS() method parent = parent.getParent(); } I put a variation of this into my contextlisterner classes and it showed this (edited for brevity) 10-05-2007 20:45:58 parent=org.apache.catalina.loader.WebappClassLoader 10-05-2007 20:45:58 file:/C:/projects/Hermes/HermesAdmin/WEB-INF/classes/ 10-05-2007 20:45:58 file:/C:/projects/Hermes/HermesAdmin/WEB-INF/lib/HermesServer.jar 10-05-2007 20:45:58 file:/C:/projects/Hermes/HermesAdmin/WEB-INF/lib/MaduraApplet-2.0.jar 10-05-2007 20:45:58 file:/C:/projects/Hermes/HermesAdmin/WEB-INF/lib/MaduraServer-2.0.jar This is the relevant library 10-05-2007 20:45:58 parent=org.apache.catalina.loader.StandardClassLoader 10-05-2007 20:45:58 file:C:/Program Files/Apache Group/Tomcat 4.1/shared/classes/ ... 10-05-2007 20:45:58 parent=org.apache.catalina.loader.StandardClassLoader 10-05-2007 20:45:58 file:C:/Program Files/Apache Group/Tomcat 4.1/common/classes/ ... 10-05-2007 20:45:58 parent=sun.misc.Launcher$AppClassLoader 10-05-2007 20:45:58 file:/C:/projects/Hermes/HermesServer/classes/ 10-05-2007 20:45:58 file:/C:/eclipsev32/plugins/org.junit_3.8.1/junit.jar 10-05-2007 20:45:58 file:/C:/Program%20Files/Apache%20Group/Tomcat%204.1/common/lib/servlet.jar ... 10-05-2007 20:45:58 file:/C:/projects/ivy_resources_madura/ivy_cache/senanque/Madura/jars/MaduraServer-2.0.jar and here it is again !! 10-05-2007 20:45:58 file:/C:/projects/ivy_resources_madura/ivy_cache/senanque/Madura/jars/MaduraApplet-2.0.jar ... 10-05-2007 20:45:58 file:/C:/projects/ivy_resources_madura/ivy_cache/apache/xerces/jars/xerces-2.0.2.jar 10-05-2007 20:45:58 file:/C:/Program%20Files/Apache%20Group/Tomcat%204.1/bin/bootstrap.jar 10-05-2007 20:45:58 file:/C:/j2sdk1.4.2_11/lib/tools.jar 10-05-2007 20:45:58 parent=sun.misc.Launcher$ExtClassLoader 10-05-2007 20:45:58 file:/C:/j2sdk1.4.2_11/jre/lib/ext/dnsns.jar 10-05-2007 20:45:58 file:/C:/j2sdk1.4.2_11/jre/lib/ext/ldapsec.jar 10-05-2007 20:45:58 file:/C:/j2sdk1.4.2_11/jre/lib/ext/localedata.jar 10-05-2007 20:45:58 file:/C:/j2sdk1.4.2_11/jre/lib/ext/sunjce_provider.jar So the problem is that the ivy libraries are loading too early. I don't see a way to control this from the eclipse UI but it is no problem to test the apps one at a time. This might help someone else though. I tried it running stand-alone on the tomcat 5.5 system on my dev machine and thought I reproduced the error but I cannot now so I will put that down to late night brain fade. The live site has mysteriously righted itself. The only thing I know they did there was to clear the app directories in webapps and restart the server. It is just possible that they were doing something ridiculous and not telling me, they aren't very used to tomcat. The most likely scenario was that they had managed to get two instances of it running and the phantom application was locking the real one. I'm getting too specific to my app here, which is not useful, so I'll stop. Anyway, thanks again for the help. I've mentioned Filip but the responses from Christopher Schultz and Johnny Kewl were very welcome too. Oh, and Christopher asked which library I was using. It isn't one you'd know, a home grown framework used for internal projects. Regards Roger - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: static fields suddenly started sharing]
I have two different applications and they both make use of a common jar library. The common library has several static fields. Up until last week the static fields in one application never saw the static fields in the other but I changed something and suddenly they do. All the advice I've found through searching the web suggests this cannot happen because the two apps use different class loaders. But it definitely is happening. I'm getting it on Tomcat 4.1 and 5.5 (my two live platforms). I am trying to figure out what I changed to make this happen because it is causing me problems. The changes I made were a restructure, shifting things around into different folders in my eclipse project, but the same jar files are in WEB-INF/lib as there always were. Can anyone suggest where I should be looking? I'm wondering if I am managing to call something I shouldn't too early in the application initialisation. Each of the apps has a context listener that does some stuff on startup of the app (including initialising some statics), but they haven't changed since it was working. I still have the older structure and it still works, and I can't see any relevant changes, Thanks for any help Roger - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]