Tomcat IO exception on startup
Hi, I am using tomcat version 5.5.23 and I have noticed that tomcat is now giving the following exception on startup: - IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputSt .java:2228) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectIn tream.java:2694) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java ) at java.io.ObjectInputStream.init(ObjectInputStream.java:277) at org.apache.catalina.util.CustomObjectInputStream.init(CustomObj nputStream.java:58) at org.apache.catalina.session.StandardManager.doLoad(StandardManage va:362) at org.apache.catalina.session.StandardManager.load(StandardManager. :321) at org.apache.catalina.session.StandardManager.start(StandardManager a:637) at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.j 432) at org.apache.catalina.core.StandardContext.start(StandardContext.ja 160) at org.apache.catalina.core.ContainerBase.addChildInternal(Container .java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.jav 0) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig a:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConf ava:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig. :311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Life eSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java ) at org.apache.catalina.core.StandardService.start(StandardService.ja 48) at org.apache.catalina.core.StandardServer.start(StandardServer.java ) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) - Exception loading sessions from persistent storage java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputSt .java:2228) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectIn tream.java:2694) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java ) at java.io.ObjectInputStream.init(ObjectInputStream.java:277) at org.apache.catalina.util.CustomObjectInputStream.init(CustomObj nputStream.java:58) at org.apache.catalina.session.StandardManager.doLoad(StandardManage va:362) at org.apache.catalina.session.StandardManager.load(StandardManager. :321) at org.apache.catalina.session.StandardManager.start(StandardManager a:637) at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.j 432) at org.apache.catalina.core.StandardContext.start(StandardContext.ja 160) at org.apache.catalina.core.ContainerBase.addChildInternal(Container .java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.jav 0) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig a:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConf ava:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig. :311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Life eSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java ) at org.apache.catalina.core.StandardService.start(StandardService.ja 48) at org.apache.catalina.core.StandardServer.start(StandardServer.java ) at
RE: Dara P Maginnis/IR/AIB is out of the office.
Yes, I have had about 15 now! -Original Message- From: Pid [mailto:p...@pidster.com] Sent: 16 January 2009 14:26 To: Tomcat Users List Subject: Re: Dara P Maginnis/IR/AIB is out of the office. that was annoying after 3 copies... someone unsubscribe him please? p dara.p.magin...@aib.ie wrote: I will be out of the office starting 16/01/2009 and will not return until 18/01/2009. I will out of the office and will action my mails on my return Dara.P.Maginnis AIB IFS IT AIB International Centre, IFSC 6417986 This e-mail (and any files transmitted with it) is intended solely for the use of the individual(s) to whom it is addressed and is intended to provide general information on a particular subject(s) and is not an exhaustive treatment of such subject(s). Accordingly, the information in this e-mail is not intended to constitute accounting, tax, legal, investment or other professional advice. Before making any decision or taking any action that might affect your business, you should consult a professional adviser. AIB International Financial Services Limited is regulated by the Irish Financial Regulator. Allied Irish Banks http://www.aibifs.com AIB and AIB Group are registered business names of Allied Irish Banks p.l.c. Allied Irish Banks, p.l.c. is regulated by the Financial Regulator. Registered Office: Bankcentre, Ballsbridge, Dublin 4. Tel: + 353 1 6600311; Registered in Ireland: Registered No. 24173. ~~~Please consider the environment before printing this Email This Disclaimer has been generated by CMDis - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Web.xml entries
Hi, I have a basic question about the tomcat server start-up. If there are classes missing that are referenced as servlet entries in the web.xml should this render the server unuseable? I did a little test today with a web app, and when tomcat started it reported class not found exceptions for the missing classes, and I could no longer get to the login page for the web app which is a jsp. When I fixed those errors the login page displayed fine. The error I got was resource not available (tomcat error page), I am using tomcat 5.5. Thanks *** This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Web.xml entries
Ok thanks for the quick response! -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: 12 December 2008 11:50 To: Tomcat Users List Subject: Re: Web.xml entries paul.ocklef...@nhs.net wrote: Hi, I have a basic question about the tomcat server start-up. If there are classes missing that are referenced as servlet entries in the web.xml should this render the server unuseable? No. But it should, and I believe it does, render that web application unusable. Mark I did a little test today with a web app, and when tomcat started it reported class not found exceptions for the missing classes, and I could no longer get to the login page for the web app which is a jsp. When I fixed those errors the login page displayed fine. The error I got was resource not available (tomcat error page), I am using tomcat 5.5. Thanks ** * This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail ** * - 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 *** This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: common jars for all applications in tomcat
I use tomcat/shared/lib for this, but I don't know how appropriate that is. -Original Message- From: Raghu [mailto:[EMAIL PROTECTED] Sent: 16 October 2008 15:38 To: 'Tomcat Users List' Subject: common jars for all applications in tomcat I have different applications using spajco.jar I have this jars in web-inf/lib folder of all the applications used like struts, log4j,servlet,sapjco.jar.etc... But I get this error sometimes. SO to have one JCO instance for one JVM instance I need to moved them to $CATALINA_BASE/common/lib Exception: Exception in thread main java.lang.ExceptionInInitializerError: Could not load middleware layer com.sap.mw.jco.rfc.MiddlewareRFC Native library /usr/local/sapjco/libsapjcorfc.so already loaded in another classloder. My questions is where is the correct folder to have the common jar files which are shared across multiple applications $CATALINA_BASE/shared/libor $CATALINA_BASE/common/lib. *** This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - 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: how to avoid multiple requests from the same client
Could you just use javascript? -Original Message- From: colin_ [mailto:[EMAIL PROTECTED] Sent: 06 October 2008 15:07 To: users@tomcat.apache.org Subject: Re: how to avoid multiple requests from the same client any idea how i would do that, or where to find an example? Mark Thomas-18 wrote: It is something you need to handle within your application. This has been discussed before in the archives. Try searching http://tomcat.markmail.org/ for multiple requests 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] -- View this message in context: http://www.nabble.com/how-to-avoid-multiple-requests-from-the-same-client-tp 19836189p19838654.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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 and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - 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: [NEWBIE] Apache Tomcat 5.5.17
Its hard to see but arent the extra processes your greps? -Original Message- From: Jon [mailto:[EMAIL PROTECTED] Sent: 11 September 2008 15:11 To: Tomcat Subject: [NEWBIE] Apache Tomcat 5.5.17 I'm using grep to monitor apache process (tomcat apache 5.5.17). It seems to create a new PID every time for each time I query the apache process. *OS: Solaris 5.10* NAME=jcami SSH_CONNECTION=10.159.20.18 4805 10.158.48.20 22 _=/usr/ucb/ps jcami*28775* 0.1 0.1 1280 904 pts/12 S 15:39:46 0:00 tail -f /projects/autotopup/logs/autopay.log SHELL=/bin/bash TERM=vt100 SSH_CLIENT= 10.159.20.18 1167 22 OLDPWD=/projects/tomcat/apache-tomcat-5.5.17-externalwebservices SSH_TTY=/dev/pts/12 USER=jcami SSH_AUTH_SOCK=/tmp/ssh-utE26750/agent.26750 PATH=/usr/bin:/usr/local/bin MAIL=/var/mail//jcami PWD=/export/home/jcami LANG=C TZ=Europe/Malta HOME=/export/home/jcami/ SHLVL=2 LOGNAME=jcami SSH_CONNECTION=10.159.20.18 1167 10.158.48.20 22 _=/usr/bin/tail bash-3.00$ ps -eauxgww | grep 5.5.17 | grep -v grep jcami*28830* 0.1 0.2 3432 3048 pts/7O 15:45:56 0:00 /usr/ucb/ps -eauxgww SHELL=/bin/bash TERM=vt100 SSH_CLIENT=10.159.20.18 4805 22 OLDPWD=/ SSH_TTY=/dev/pts/7 USER=jcami SSH_AUTH_SOCK=/tmp/ssh-Mrh28782/agent.28782 PATH=/usr/bin:/usr/local/bin MAIL=/var/mail//jcami PWD=/projects/tomcat/apache-tomcat-5.5.17-externalwebservices LANG=C TZ=Europe/Malta HOME=/export/home/jcami/ SHLVL=2 LOGNAME=jcami SSH_CONNECTION=10.159.20.18 4805 10.158.48.20 22 _=/usr/ucb/ps jcami*28775 * 0.1 0.1 1280 904 pts/12 S 15:39:46 0:00 tail -f /projects/autotopup/logs/autopay.log SHELL=/bin/bash TERM=vt100 SSH_CLIENT= 10.159.20.18 1167 22 OLDPWD=/projects/tomcat/apache-tomcat-5.5.17-externalwebservices SSH_TTY=/dev/pts/12 USER=jcami SSH_AUTH_SOCK=/tmp/ssh-utE26750/agent.26750 PATH=/usr/bin:/usr/local/bin MAIL=/var/mail//jcami PWD=/export/home/jcami LANG=C TZ=Europe/Malta HOME=/export/home/jcami/ SHLVL=2 LOGNAME=jcami SSH_CONNECTION=10.159.20.18 1167 10.158.48.20 22 _=/usr/bin/tail bash-3.00$ ps -eauxgww | grep 5.5.17 | grep -v grep jcami*28833* 0.1 0.2 3432 3048 pts/7O 15:45:57 0:00 /usr/ucb/ps -eauxgww SHELL=/bin/bash TERM=vt100 SSH_CLIENT=10.159.20.18 4805 22 OLDPWD=/ SSH_TTY=/dev/pts/7 USER=jcami SSH_AUTH_SOCK=/tmp/ssh-Mrh28782/agent.28782 PATH=/usr/bin:/usr/local/bin MAIL=/var/mail//jcami PWD=/projects/tomcat/apache-tomcat-5.5.17-externalwebservices LANG=C TZ=Europe/Malta HOME=/export/home/jcami/ SHLVL=2 LOGNAME=jcami SSH_CONNECTION=10.159.20.18 4805 10.158.48.20 22 _=/usr/ucb/ps jcami*28775* 0.1 0.1 1280 904 pts/12 S 15:39:46 0:00 tail -f /projects/autotopup/logs/autopay.log SHELL=/bin/bash TERM=vt100 SSH_CLIENT= 10.159.20.18 1167 22 OLDPWD=/projects/tomcat/apache-tomcat-5.5.17-externalwebservices SSH_TTY=/dev/pts/12 USER=jcami SSH_AUTH_SOCK=/tmp/ssh-utE26750/agent.26750 PATH=/usr/bin:/usr/local/bin MAIL=/var/mail//jcami PWD=/export/home/jcami LANG=C TZ=Europe/Malta HOME=/export/home/jcami/ SHLVL=2 LOGNAME=jcami SSH_CONNECTION=10.159.20.18 1167 10.158.48.20 22 _=/usr/bin/tail Any idea why, please? Rgds, -- Jon Camilleri Mobile (MT): 00356 7982 7113 E-mail: [EMAIL PROTECTED] Please consider your environmental responsibility before printing this e-mail. I usually reply to e-mails within 2 business days. If it's urgent, give me a call. *** This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - 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 and jar loading
Hi, I have a brief question regarding the way tomcat loads jar files. Are the references to all jar files in common\lib and shared\lib loaded on server startup? I know classes are loaded once they are requested, but I added a new jar file that was never there before (so no classes were loaded) and I couldn't reference the classes. Is this because the classpath that tomcat uses references every single jar file, and the jvm needs to be stopped in order for the new jar file to appear on the classpath? I just bought a tomcat book, so hopefully I can stop asking these silly questions soon!! Cheers ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Environment Variables
Hi, Can anybody tell me which environment variables tomcat uses? I am pretty sure it uses JAVA_HOME for core java, and I am guessing it uses the web application directories for classes belonging to web apps under it. The reason I am asking this is that I have a jar file clash on my development machine, and when I try to run a certain class I get the error: java.lang.LinkageError: loader constraints violated when linking javax/xml/rpc/Service class. I am pretty sure this is because I have 2 copies of a class located in different jar files, I googled this and a lot of links point to CLASSPATH, but my CLASSPATH variable doesn't really have anything in it: C:\Program Files\gemplus\gac\GATicket.jar;C:\Program Files\gemplus\gac\iaikPkcs11Wrapper.jar Appreciate any help. Thanks, Paul Ockleford ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - 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: Environment Variables
Brilliant thanks for that. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: 06 June 2008 07:49 To: Tomcat Users List Subject: Re: Environment Variables Tomcat does not use CLASSPATH. The list of variables used by tomcat is written at the top of catalina.sh script. En l'instant précis du 06/06/08 10:46, [EMAIL PROTECTED] s'exprimait en ces termes: Hi, Can anybody tell me which environment variables tomcat uses? I am pretty sure it uses JAVA_HOME for core java, and I am guessing it uses the web application directories for classes belonging to web apps under it. The reason I am asking this is that I have a jar file clash on my development machine, and when I try to run a certain class I get the error: java.lang.LinkageError: loader constraints violated when linking javax/xml/rpc/Service class. I am pretty sure this is because I have 2 copies of a class located in different jar files, I googled this and a lot of links point to CLASSPATH, but my CLASSPATH variable doesn't really have anything in it: C:\Program Files\gemplus\gac\GATicket.jar;C:\Program Files\gemplus\gac\iaikPkcs11Wrapper.jar Appreciate any help. Thanks, Paul Ockleford ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - 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] ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible to assign different class loader for each web app with tomcat
Hi, Is it possible to configure a separate class loader for each web app running under tomcat? A colleague has informed that he can do this with web sphere and I am wondering if it is possible with tomcat. Thanks Paul Ockleford ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - 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: Possible to assign different class loader for each web app with tomcat
Ok, that's strange because yesterday I had a small problem, and I assumed that it was due to the same class being loaded on startup by 2 web apps. I had a url endpoint loaded into a config class on startup from the web.xml, for some reason no messages were reaching the correct end point. This config class is also loaded by a test version of the app running under the same tomcat as pre prod. When the second web app was loaded and its config class was loaded and the parameter read in from the web.xml it changed the value for both web apps. I have not being using java or tomcat for all that long, but I would have thought if a class loader was assigned for each web app then they would each have their own copy of the config class? Meaning that web app1 should not have been pointing at the end point for web app 2? If not then could you tell me why? Thanks -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 09 May 2008 11:10 To: Tomcat Users List Subject: Re: Possible to assign different class loader for each web app with tomcat [EMAIL PROTECTED] wrote: Hi, Is it possible to configure a separate class loader for each web app running under tomcat? A colleague has informed that he can do this with web sphere and I am wondering if it is possible with tomcat. This is the case by default. No configuration is required. 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 and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - 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: Possible to assign different class loader for each web app with tomcat
Thanks for the reply. To be honest I am not sure, both web apps are separated, have their own web.xml files and also are accessed via different ports, however as they are effectively the same application at different stages of development they each need to load parameters in on start up to a class that holds constant values. (I dont know if this is the best or a good way to do it, its how it was done before I started). Here are some excerpts from the web.xml, the only difference in each of the 2 web apps web.xml is that they load a different value for the url endpoint, as they point to different message handling development areas: servlet-nameConfigurationManager/servlet-name servlet-classapplication.util.startup.ConfigurationManager/servlet-class load-on-startup1/load-on-startup init-param param-nameMESSAGE.ENDPOINT/param-name param-valuehttp://192.168.28.193/router/SOAPEndpoint/param-value /init-param /servlet To be honest I am sure its a lack of understanding on my part, but thats something I want to correct! Thanks -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: 09 May 2008 11:35 To: Tomcat Users List Subject: Re: Possible to assign different class loader for each web app with tomcat This all depends on your webapp structure. If your config class is on the common or system class loader, it's shared by all webapps. Otherwise, (that mean if class is in WEB-INF/lib or WEB-INF/classes), it shouldn't be shared. Unless, of course, you specified a specific classloader to use by tomcat in your context.xml. Le Friday 09 May 2008 12:16:23 [EMAIL PROTECTED], vous avez écrit : Ok, that's strange because yesterday I had a small problem, and I assumed that it was due to the same class being loaded on startup by 2 web apps. I had a url endpoint loaded into a config class on startup from the web.xml, for some reason no messages were reaching the correct end point. This config class is also loaded by a test version of the app running under the same tomcat as pre prod. When the second web app was loaded and its config class was loaded and the parameter read in from the web.xml it changed the value for both web apps. I have not being using java or tomcat for all that long, but I would have thought if a class loader was assigned for each web app then they would each have their own copy of the config class? Meaning that web app1 should not have been pointing at the end point for web app 2? If not then could you tell me why? Thanks -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 09 May 2008 11:10 To: Tomcat Users List Subject: Re: Possible to assign different class loader for each web app with tomcat [EMAIL PROTECTED] wrote: Hi, Is it possible to configure a separate class loader for each web app running under tomcat? A colleague has informed that he can do this with web sphere and I am wondering if it is possible with tomcat. This is the case by default. No configuration is required. 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 and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - 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] ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that
RE: Possible to assign different class loader for each web app with tomcat
Ok thanks, it's starting to become clearer now. The class file is in a jar file that lives in tomcat\shared\lib. I am guessing that these classes are loaded by a class loader further up the hierarchy described in the tomcat docs. I suppose in this instance there would only be one class loaded? I guess if this is the case the only thing confusing me is why this class is actually loaded by tomcat when it doesn't have to be? Does the load-on-startup1/load-on-startup tag not load a class specifically for this web app regardless of where the class file might be? Thanks for the help by the way. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 09 May 2008 12:25 To: Tomcat Users List Subject: Re: Possible to assign different class loader for each web app with tomcat [EMAIL PROTECTED] wrote: Thanks for the reply. To be honest I am not sure, both web apps are separated, have their own web.xml files and also are accessed via different ports, however as they are effectively the same application at different stages of development they each need to load parameters in on start up to a class that holds constant values. (I don't know if this is the best or a good way to do it, its how it was done before I started). Here are some excerpts from the web.xml, the only difference in each of the 2 web apps web.xml is that they load a different value for the url endpoint, as they point to different message handling development areas: servlet-nameConfigurationManager/servlet-name servlet-classapplication.util.startup.ConfigurationManager/servlet- class load-on-startup1/load-on-startup init-param param-nameMESSAGE.ENDPOINT/param-name param-valuehttp://192.168.28.193/router/SOAPEndpoint/param-value /init-param /servlet To be honest I am sure it's a lack of understanding on my part, but that's something I want to correct! It all depends on where you put the .class file or the .jar that contains the .class file. With this information we should be able to help you fix this. Cheers, 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 and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - 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: Possible to assign different class loader for each web app with tomcat
Thanks for the replies, I think I understand what is happening now, I think for safety's sake I will use a separate config file for each web app instead of trying to share one between them all and load separate copies. Thank you. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 09 May 2008 13:41 To: Tomcat Users List Subject: Re: Possible to assign different class loader for each web app with tomcat [EMAIL PROTECTED] wrote: Ok thanks, it's starting to become clearer now. The class file is in a jar file that lives in tomcat\shared\lib. I am guessing that these classes are loaded by a class loader further up the hierarchy described in the tomcat docs. I suppose in this instance there would only be one class loaded? Correct. The class would be loaded once but that doesn't prevent multiple instances of the class being created. However, I suspect the class in question uses the singleton pattern so there is also only once instance. This instance will be shared between all webapps. I guess if this is the case the only thing confusing me is why this class is actually loaded by tomcat when it doesn't have to be? Does the load-on-startup1/load-on-startup tag not load a class specifically for this web app regardless of where the class file might be? No. load-on-startup requires Tomcat to load the servlet when the context starts and the number dictates the order (as per the spec). The class loaders will be searched in the order described in the docs and the first instance found of the class will be used. If (as it appears from your description) you have webapp specific information being held in a singleton class then you *must* place that class in WEB-INF/classes or the jar containing it in WEB-INF/lib shared/lib is for classes that can be safely shared between multiple webapps. Personally I never used it. It generally caused more problems than it solved - one of the reasons it is removed by default in 6.0.x onwards. Thanks for the help by the way. No problem. 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 and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail ** - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple web apps on different ports under one tomcat
Hi, I am trying to achieve the above, at the moment I am trying to do this by including an additional service parameter and assigning different ports for the connectors. However now my original web apps are not working either. My tomcat log file contains: INFO: Stopping Coyote HTTP/1.1 on http-8080 29-Apr-2008 11:52:08 org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8443 29-Apr-2008 11:52:08 org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-9080 29-Apr-2008 11:52:08 org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-9443 29-Apr-2008 11:52:09 org.apache.catalina.core.StandardService stop INFO: Stopping service LTCA 29-Apr-2008 11:52:09 org.apache.catalina.core.StandardPipeline unregisterValve INFO: Can't unregister valve org.apache.catalina.core.StandardEngineValve[Catalina] javax.management.InstanceNotFoundException: Catalina:type=Valve,name=StandardEngineValve at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanS erverInterceptor.java:1010) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(Defaul tMBeanServerInterceptor.java:354) at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:5 27) at org.apache.catalina.core.StandardPipeline.unregisterValve(StandardPipeline.j ava:321) at org.apache.catalina.core.StandardPipeline.stop(StandardPipeline.java:274) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1059) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447) at org.apache.catalina.core.StandardService.stop(StandardService.java:512) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743) at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) 29-Apr-2008 11:52:09 org.apache.catalina.core.StandardPipeline unregisterValve INFO: Can't unregister valve org.apache.catalina.valves.ErrorReportValve[localhost] javax.management.InstanceNotFoundException: Catalina:type=Valve,name=ErrorReportValve,host=localhost at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanS erverInterceptor.java:1010) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(Defaul tMBeanServerInterceptor.java:354) at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:5 27) at org.apache.catalina.core.StandardPipeline.unregisterValve(StandardPipeline.j ava:321) at org.apache.catalina.core.StandardPipeline.stop(StandardPipeline.java:274) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1059) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447) at org.apache.catalina.core.StandardService.stop(StandardService.java:512) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743) at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) 29-Apr-2008 11:52:09 org.apache.catalina.core.StandardPipeline unregisterValve INFO: Can't unregister valve org.apache.catalina.core.StandardHostValve[localhost] javax.management.InstanceNotFoundException: Catalina:type=Valve,name=StandardHostValve,host=localhost at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanS erverInterceptor.java:1010) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(Defaul tMBeanServerInterceptor.java:354) at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:5 27) at org.apache.catalina.core.StandardPipeline.unregisterValve(StandardPipeline.j ava:321) at
RE: Multiple web apps on different ports under one tomcat
Hi Ben, Firstly thanks for replying, it could be that my file is not arranged in the most suitable order then, I might have tags inside other tags when they don't need to be (could be shared by both services?). I have pasted my server.xml into this email, if you could take a look at the order of the tags I would be grateful. If you spot anything wrong then could you let me know. Cheers !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properties : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml -- !-- Define a SSL HTTP/1.1 Connector on port 8443 -- Connector port=8443 maxHttpHeaderSize=8192 SSLEnabled=true maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true keyAlias=tomcat keystoreFile=/applications/httpscert/.keystore