Re: Different webapp paths on different hosts
See inline Med venlig hilsen/Kind regards Casper W. Schmidt Den 24-01-2013 02:32, Christopher Schultz skrev: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 BBQ, On 1/23/13 12:09 AM, bxqdev wrote: i need to map a custom paths, like "/path1" and "/path2", (not root "/" path), of the same webapp to a custom domains. as i said i need this mapping: ${samewebapp}/path1 is mapped to http://path1.com/ ${samewebapp}/path2 is mapped to http://path2.com/ NOT this: ${samewebapp}/path1 is mapped to http://path1.com/path1 ${samewebapp}/path2 is mapped to http://path2.com/path2 What is ${samewebpp}/path1? Is that a "piece" of a webapp? Do you care if the same webapp is deployed twice (which is probably going to be required)? Actually the OP is not really clear in describing anything. I'm wondering if "path1" in http://path1.com equals "path1" in the "/path1" part or not. Anyway I would say a context.xml file in conf/catalina/path1 (the hostname)/path1.xml (the context name) should do the trick? Place the webapp outside the appbase of the hosts and then point the docbase to the webapp (or just drop the .war with two different names in the appbases of the two hosts) :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAj0cACgkQ9CaO5/Lv0PCChwCggGZi3v8ylGaj6py+uQ2ZNuq9 0+QAnR5ENaqoollzjpB5dx7KtcT3mquu =/GYF -END PGP SIGNATURE- - 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: The APR based Apache Tomcat Native library was not found
Sorry I forgot the versions of things I am using. Tomcat 6.0.36 Red Hat Enterprise Linux Server release 6.2 (Santiago) Java 7u11 (32 bit) I think I found the problem, though. I have to run a 32 bit jvm because a COBOL odbc driver we have to use only comes in a 32 bit version. But the Red Hat box is 64 bit and when I ran 'file' on the libtcnative.so I compiled I found that it is 64 bit. So I think I just need to do a little Googling to see how to compile a 32 bit version and it could work.
Re: Different webapp paths on different hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 BBQ, On 1/23/13 12:09 AM, bxqdev wrote: > i need to map a custom paths, like "/path1" and "/path2", (not root > "/" path), of the same webapp to a custom domains. > > as i said i need this mapping: ${samewebapp}/path1 is mapped to > http://path1.com/ ${samewebapp}/path2 is mapped to > http://path2.com/ > > NOT this: ${samewebapp}/path1 is mapped to http://path1.com/path1 > ${samewebapp}/path2 is mapped to http://path2.com/path2 What is ${samewebpp}/path1? Is that a "piece" of a webapp? Do you care if the same webapp is deployed twice (which is probably going to be required)? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAj0cACgkQ9CaO5/Lv0PCChwCggGZi3v8ylGaj6py+uQ2ZNuq9 0+QAnR5ENaqoollzjpB5dx7KtcT3mquu =/GYF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problems trying to disable log rotation within Tomcat 6
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alan, On 1/23/13 7:33 PM, Alan Worstell wrote: > Hello, I'm using Tomcat 6.0.24-2ubuntu1.10 on Ubuntu 10.04.4 and I > am trying to disable datestamping and rotation of log files within > Tomcat so I can use logrotate for everything. I have added these > lines to /etc/tomcat6/logging.properties: > 1catalina.org.apache.juli.FileHandler.rotatable = false > 2localhost.org.apache.juli.FileHandler.rotatable = false > > From what I have read, this will set those files to be written as > prefix.suffix, rather than prefix.date.suffix as it does by > default. However, when I reload Tomcat after setting this, it is > creating: catalina.2013-01-23.log localhost.2013-01-23.log > > Any assistance would be greatly appreciated. I'd be careful about trying to use logrotate with Tomcat: if you move your log file, Tomcat will continue writing to it. If you copy-and-truncate the file, you may end up losing logs in the time between the start-of-copy and the end-of-truncate operation, or you may end up losing *all* logs after the first rotation. The reason Apache httpd works well with logrotate is because logrotate sends a signal to httpd that says "reset your logs". That closes the existing file descriptor (currently pointing to to a file that has been moved out of the way) and opens a new one to the original path name. Tomcat, JULI, log4j, etc. have no such mechanism and therefore implement log rotation internally. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAjtgACgkQ9CaO5/Lv0PC/3QCfVGKJHDtvhXyX8dQufQvRvLfh BtYAniLF4oF15uhXbJKyTJKQXmI75W9W =RQHD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fw: Can not understand how maxThreads of Connectors works
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hermes, On 1/23/13 5:25 PM, Hermes Flying wrote: > So is there an explanation for this? All I am interested is make > sure that after a limit, clients attempted to connect are stopped > based on my configuration on maxThreads and accept count. But I can > not figure out how this works. Sorry, but your description of what you experience does not match the experiences of others. The conclusion is that you are not configuring Tomcat the way you claim to be configuring it. You never told us what versions of things you were using. You never told us what OS you are on. You never told us how you are launching Tomcat. You never told us where your configuration files are. I cannot help you any further without the above information. I believe that others can also not help you without this information. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAjhwACgkQ9CaO5/Lv0PCSNQCgjrNeg1OWsZvWRWVfqOCEWRmP LBsAn26IFVIG/5zXXofpNPnxEQXrFWD/ =XZvE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: The APR based Apache Tomcat Native library was not found
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Andrew, On 1/23/13 3:00 PM, Andrew Winter wrote: > I have been having problems getting comet to work and decided to > try the APR connector. So I installed APR from the RPM, version > apr-1.3.9-3.el6_1.2.i686. I followed instructions that I found > locally and online and compiled up the tomcat-native-1.1.23. What version of Tomcat are you running? What "locally online instructions" did you find online? Your Tomcat should have come with tomcat-native.tar.gz in the bin/ directory. That file should contain a jni/native/BUILDING file that gives simple instructions. I have a script to test Tomcat builds that compiles and installs tcnative. The tcnative part of my script looks like this: OWD=`pwd` cd "${BASE_SOURCE_DIR}/output/build/bin/native/tomcat-native-"*/jni/native ./configure --with-apr=/usr/bin --with-ssl=yes - --with-java-home=/usr/lib/jvm/java-6-sun/ cd "${OWD}" make -C "${BASE_SOURCE_DIR}/output/build/bin/native/tomcat-native-"*/jni/native cp -d "${BASE_SOURCE_DIR}/output/build/bin/native/tomcat-native-"*/jni/native/.libs/* "${BASE_SOURCE_DIR}/output/build/bin/native" All the paths are crazy because I try to build everything in a single directory so I can blow it all away and re-run it repeatably. But, you basically run "./configure && make" and then copy the resulting objects into your java.library.path (which you have as /usr/local/apr/lib). If I were you, I'd just put them into CATALINA_HOME/bin so they don't pollute anywhere else. > It installed in the /usr/local/apr/lib folder. Hopefully not: tcnative should just produce a series of .so files that you can drop anywhere you want and then point java.library.path (a JVM system property) to it. APR should be installed in /usr/lib and not in /usr/local. Where did APR end up when you installed the RPM? > In the tomcat6.conf I set the > JAVA_OPTS="-Djava.library.path=/usr/local/apr/lib" That should be enough to load apr, but tcnative has to load, first. Where is tcnative*.so? > But I still get the message at start: INFO: The APR based Apache > Tomcat Native library which allows optimal performance in > production environments was not found on the java.library.path: > /usr/local/apr/lib > > What am I missing? The good news is that java.library.path is successfully set to /usr/local/apr/lib. Now -- what's in /usr/local/apr/lib? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAjSMACgkQ9CaO5/Lv0PBSUQCfU8dS7yqMUDqXvE6PPoslVrBJ NPEAoK8U7A4F/+h7YM92tyVJsGe93f0u =mzoo -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JAAS Module Tomcat 7 (Bundling and JNDI Datasource access)
I'm running into issues accessing a JNDI datasource in a JAAS module. Can I bundle a JAAS module in my war file? When I try to do this by defining the Realm in the context.xml of the web application I get a java.lang.ClassNotFoundException. The documentation specifies I must put the module in the lib directory. Can someone confirm this? When I deploy all the JAAS module and all required dependencies in a directory listed under "common.loader", I run into the following two issue. The JAAS module cannot seem to load the JNDI datasource "javax.naming.NameNotFoundException: Name [foo/bar] is not bound in this Context. Unable to find [foo]." Is there a way to expose a JNDI datasource to a JAAS module? Tomcat Version: 7.0.34 Datasource is defined in conf/server.xml as: The datasource is exposed in conf/context.xml as: The JAAS module is defined at either the server.xml or context.xml of the web application as: If defined in the server.xml the server fails to start. If it's in the application context.xml it fails when the application tries to load. Thank you, Justin CONFIDENTIALITY NOTICE: The information in this message, and any attachment, is intended for the sole use of the individual and entity to whom it is addressed. This information may be privileged, confidential, and protected from disclosure. If you are not the intended recipient you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it, or its contents, is strictly prohibited. If you think that you have received this message in error please notify the sender and destroy all copies of this communication and any attachments. Thank you.
Re: Problems trying to disable log rotation within Tomcat 6
2013/1/24 Alan Worstell : > Hello, > I'm using Tomcat 6.0.24-2ubuntu1.10 on Ubuntu 10.04.4 and I am trying to > disable datestamping and rotation of log files within Tomcat so I can use > logrotate for everything. > I have added these lines to /etc/tomcat6/logging.properties: > 1catalina.org.apache.juli.FileHandler.rotatable = false > 2localhost.org.apache.juli.FileHandler.rotatable = false > > From what I have read, this will set those files to be written as > prefix.suffix, rather than prefix.date.suffix as it does by default. > However, when I reload Tomcat after setting this, it is creating: > catalina.2013-01-23.log > localhost.2013-01-23.log > 1. 6.0.24 is old and has known security issues 2. Support for "rotatable=false" is implemented in 6.0.33 and later https://issues.apache.org/bugzilla/show_bug.cgi?id=49180 3. You can use java.util.logging.FileHandler in Tomcat logging in exactly the same way as JULI FileHandler. Note that it has different configuration options, see JDK docs for details. 4. I do not know whether "/etc/tomcat6/logging.properties" is the correct file. It is up to you to check that it is actually used. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problems trying to disable log rotation within Tomcat 6
Hello, I'm using Tomcat 6.0.24-2ubuntu1.10 on Ubuntu 10.04.4 and I am trying to disable datestamping and rotation of log files within Tomcat so I can use logrotate for everything. I have added these lines to /etc/tomcat6/logging.properties: 1catalina.org.apache.juli.FileHandler.rotatable = false 2localhost.org.apache.juli.FileHandler.rotatable = false From what I have read, this will set those files to be written as prefix.suffix, rather than prefix.date.suffix as it does by default. However, when I reload Tomcat after setting this, it is creating: catalina.2013-01-23.log localhost.2013-01-23.log Any assistance would be greatly appreciated. Thanks, -- Alan Worstell A1 Networks - Systems Administrator VTSP, dCAA, LPIC-1, Linux+, CLA, DCTS (707)570-2021 x204 For support issues please email supp...@a-1networks.com or call 707-703-1050 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Different webapp paths on different hosts
> -Original Message- > From: bxqdev [mailto:bxq...@themailbay.com] > Sent: Tuesday, January 22, 2013 11:09 PM > To: Tomcat Users List > Subject: Re: Different webapp paths on different hosts > > i need to map a custom paths, like "/path1" and "/path2", (not root "/" > path), of the same webapp to a custom domains. > > as i said i need this mapping: > ${samewebapp}/path1 is mapped to http://path1.com/ > ${samewebapp}/path2 is mapped to http://path2.com/ > > NOT this: > ${samewebapp}/path1 is mapped to http://path1.com/path1 > ${samewebapp}/path2 is mapped to http://path2.com/path2 > > custom paths of the same webapp should map to different root paths on > different domains. > > thanks! > > I haven't front-ended with Apache HTTPD in a long time, but could the OP do this using AJP? Jeff
Re: Fw: Can not understand how maxThreads of Connectors works
Hi, So is there an explanation for this? All I am interested is make sure that after a limit, clients attempted to connect are stopped based on my configuration on maxThreads and accept count. But I can not figure out how this works. From: Hermes Flying To: Tomcat Users List Sent: Monday, January 21, 2013 6:17 PM Subject: Re: Fw: Can not understand how maxThreads of Connectors works The web application works.I can not see any issue. What does this mean? From: Mark Thomas To: Tomcat Users List Sent: Monday, January 21, 2013 11:06 AM Subject: Re: Fw: Can not understand how maxThreads of Connectors works On 21/01/2013 07:07, Hermes Flying wrote: > > Hi, > Is there any update on this? I don't see any problem setting maxThreads=0 And if you try making a request with a Tomcat instance that uses that configuration? Mark > > Thank you > > > - Forwarded Message - > From: Hermes Flying > To: Tomcat Users List > Sent: Friday, January 18, 2013 8:55 AM > Subject: Re: Can not understand how maxThreads of Connectors works > > > Hi Chris, > Tried with this simple server.xml and maxThreads=0 but I did not see any kind > of errors.Attached the catalina logs > > > > > > SSLEngine="on" /> > > > > className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> > > > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> > > > > > 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" /> > > > > > > > > > > > protocol="HTTP/1.1" > connectionTimeout="2" > redirectPort="8443" /> > > > > > > > > > > > > > className="org.apache.catalina.realm.UserDatabaseRealm" > resourceName="UserDatabase"/> > > > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > > > > > > > > > > > > > > From: Christopher Schultz > To: Tomcat Users List > Sent: Thursday, January 17, 2013 6:57 PM > Subject: Re: Can not understand how maxThreads of Connectors works > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > André, > > On 1/17/13 3:32 AM, André Warnier wrote: >> Quite a few messages ago, I asked the OP if he could copy/paste >> his server.xml. > > Yes. Getting information from the OP seems to be difficult. > >> The reason was that if his config uses an Executor, then I believe >> the Threads settings in the Connectors don't really matter, do they >> ? > > Correct: setting executor="someExecutor" means that any > executor-related settings on the will be ignored in favor > of those set in the . > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iEYEAREIAAYFAlD4LX4ACgkQ9CaO5/Lv0PAzegCgtxrX5Yx2V0UlEiDI1hK/vK+H > u20AmwWQz6+LToA3uPSSb8V1+kdPMY3N > =9fQb > -END PGP > SIGNATURE- > > - > 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 > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Trying to install tomcat 7.0.35 but after installation it shows me as Apache Tomcat 7.0.2
Resolved and I am good now.Updated to 7.0.35. Thanks Chris On Wed, Jan 23, 2013 at 3:54 PM, Kiran Badi wrote: > My bad, I removed 7.0.2 instance by using service.bat uninstall from cmd > prompt and now I am not able to install updated one. getting the below > message.Do I need to set environment variables, I dont remember setting it > earlier for any of version I had installed. > > Microsoft Windows [Version 6.0.6002] > Copyright (c) 2006 Microsoft Corporation. All rights reserved. > > C:\Windows\system32>cd > "C:\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35 > \bin" > > C:\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35\bin>service.bat > install > > The tomcat.exe was not found... > The CATALINA_HOME environment variable is not defined correctly. > This environment variable is needed to run this program > > C:\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35\bin> > > On Wed, Jan 23, 2013 at 2:42 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256 >> >> Chris, >> >> On 1/23/13 4:32 AM, chris derham wrote: >> > If you really want to run 7.0.35 instead of 7.0.2, then remove the >> > service for 7.0.2, and then install the 7.0.35 service. To >> > uninstall the service, go to cmd prompt and from CATALINA_HOME\bin >> > run service uninstall. >> >> +1 >> >> - -chris >> -BEGIN PGP SIGNATURE- >> Version: GnuPG/MacGPG2 v2.0.17 (Darwin) >> Comment: GPGTools - http://gpgtools.org >> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ >> >> iEYEAREIAAYFAlEAPSgACgkQ9CaO5/Lv0PDtIwCePDlf9/2pKV+bipP5aDtCjqYF >> PtsAnRLMKENcNaSb6C5zQNbBgYrDkl82 >> =bB/S >> -END PGP SIGNATURE- >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >
Re: Trying to install tomcat 7.0.35 but after installation it shows me as Apache Tomcat 7.0.2
My bad, I removed 7.0.2 instance by using service.bat uninstall from cmd prompt and now I am not able to install updated one. getting the below message.Do I need to set environment variables, I dont remember setting it earlier for any of version I had installed. Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Windows\system32>cd "C:\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35 \bin" C:\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35\bin>service.bat install The tomcat.exe was not found... The CATALINA_HOME environment variable is not defined correctly. This environment variable is needed to run this program C:\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35\bin> On Wed, Jan 23, 2013 at 2:42 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Chris, > > On 1/23/13 4:32 AM, chris derham wrote: > > If you really want to run 7.0.35 instead of 7.0.2, then remove the > > service for 7.0.2, and then install the 7.0.35 service. To > > uninstall the service, go to cmd prompt and from CATALINA_HOME\bin > > run service uninstall. > > +1 > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iEYEAREIAAYFAlEAPSgACgkQ9CaO5/Lv0PDtIwCePDlf9/2pKV+bipP5aDtCjqYF > PtsAnRLMKENcNaSb6C5zQNbBgYrDkl82 > =bB/S > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
The APR based Apache Tomcat Native library was not found
I have been having problems getting comet to work and decided to try the APR connector. So I installed APR from the RPM, version apr-1.3.9-3.el6_1.2.i686. I followed instructions that I found locally and online and compiled up the tomcat-native-1.1.23. It installed in the /usr/local/apr/lib folder. In the tomcat6.conf I set the JAVA_OPTS="-Djava.library.path=/usr/local/apr/lib" But I still get the message at start: INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib What am I missing?
Re: Trying to install tomcat 7.0.35 but after installation it shows me as Apache Tomcat 7.0.2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/23/13 4:32 AM, chris derham wrote: > If you really want to run 7.0.35 instead of 7.0.2, then remove the > service for 7.0.2, and then install the 7.0.35 service. To > uninstall the service, go to cmd prompt and from CATALINA_HOME\bin > run service uninstall. +1 - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAPSgACgkQ9CaO5/Lv0PDtIwCePDlf9/2pKV+bipP5aDtCjqYF PtsAnRLMKENcNaSb6C5zQNbBgYrDkl82 =bB/S -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Loading a DeSerialized Class to WebabbClassLoader Question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peterm,, On 1/23/13 9:29 AM, Peter Lavin wrote: > My application was using ObjectInputStream (OIS) to convert a > serialized instance of an object. OIS uses a different class > loader, one which does not have visibility of the classes loaded in > the WebappClassLoader. This was giving a ClassNotFoundException. > > Then I found CustomObjectInputStream. Initially, I tried to import > this from catalina.jar but this caused several errors on deploying > the war, mainly related to XML parsers (??). > > I then got the source for CustomObjectInputStream and added it to > my web-app (about 100 lines of code). This yielded a solution, full > credit to... Craig R. McClanahan and Bip Thelin for writing this > :-) > > Thanks to those who replied to my earlier question. I should have read this first. Odd that OIS doesn't use the ContextClassLoader... - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAPKkACgkQ9CaO5/Lv0PBGGQCgsvilfSlKlnCjNYMIkR6keoi8 uLEAoLFJTHCG4lgIhPmJc5VFu1ruJaCt =aYfv -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Loading a DeSerialized Class to WebabbClassLoader Question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peter, On 1/22/13 2:16 PM, Peter Lavin wrote: > I've spent some time on this today and have found (at least I think > so) that my problem in deserializing an instance of an object is > related to the ClassLoader that the class ObjectInputStream uses. > It appears that it does not use the WebappClassLoader of the > service in question, but instead defaults to a ClassLoader higher > up the tree (which does not have visibility on the cache of the > WebappClassLoader). ObjectInputStream should be using the "context class loader" of the thread which should be the WebappClassLoader. Can you show us your code (the part that actually loads the bytes into the ClassLoader to define the class)? Also, where does the de-serialization occur? I suspect in the webapp, but you haven't described everything in detail (and the details count). > In my service, I've loaded a full class definition and created an > instance of it. At this point it (afaik) must be in the cache of > the WebappClassLoader. However, when an ObjectInputStream is called > to... ois.readObject() on a byte[] of an instance of that same > class, it fail for ClassNotFoundException. Hmm. Can you post the full stack trace of that CNFE? > A Tomcat solution is identified here... > http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/util/CustomObjectInputStream.html I'm > surprised that class needs to exist... I would have expected OIS to use the context class loader. I'll have to check on that. > Which is in $CATILANA_HOME/lib/catalina.jar. > > Has anyone use this? do I need to add this jar implement this, and > include it in my war file? You should be able to use that class directly from within CATALINA_HOME/lib - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAPHcACgkQ9CaO5/Lv0PBzPgCbBrCdn8wrD/6YYPoYNpoht6s8 8vsAnifcwJCpAtLsZqc3SfncDY9QdF2k =wIKl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Steve, On 1/22/13 11:59 PM, sry...@jsrsys.com wrote: > I thought you had hit the nail on the head of 5.0 vs. 5.5, but when > I recoded the short form into the long form I still get the same > error. I am ready to install a new Tomcat. Is there any reason to > NOT go to most recent 7.x release? In general, there's no reason not to upgrade all the way. I personally went from 4.1 up through 7.0 over the past few years because I wanted as few surprises as possible. I probably wasted my own time. The biggest jump for me was going from 4.1 -> 5.5 because of many configuration changes. Most of those were in 5.0 so you should have less of a headache than I did. As long as your web app doesn't rely on some weird old bug, you should be able to simply drop it into a running Tomcat 7 instance with no additional configuration and have it auto-deploy and "just work". That is, if you have META-INF/context.xml setup properly with your JNDI DataSource. Since you want a shared data source, your best bet is to put a element ( in each webapp's META-INF/context.xml. I prefer the use of META-INF/context.xml because then the app generally works when you move it between container installs, rather than having some magic make it work in one place but not another. If you don't have a META-INF/context.xml, you may completely forget that the server-default links a JNDI object for you and you won't be able to figure out why it does work one place and not in another. Sounds familiar, huh? > I realize that as long as I stay at Java 5 and MySQL 5 I don't have > to worry about writing code that won't work on the production > machine (which is more difficult to change). Java 5 and MySQL 5 should be fine. Tomcat 7 actually requires Java 6, though. I believe that every system on which Java runs can tolerate more than one Java version installed side-by-side, so you might want to talk to your NOC team about installing Java 1.7 before Java 1.8 ships in November. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAIMQACgkQ9CaO5/Lv0PDuPACgksD7m8kcC4PHCJLJTOHjIwX8 znQAn07eisQGFN0UZd7Yy1rnPZFu/ET3 =aNAU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: Tomcat 7: ClassNotFoundEception for security provider during startup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hanno, On 1/22/13 2:12 PM, Hanno Scharwächter wrote: > > Hanno, > > On 1/21/13 12:49 PM, Hanno Scharwächter wrote: >> the Bootstrap-ClassLoader. I checked the server-conf by >> starting both Tomcat versions with exactly the same server >> configuration (server.xml). While Tomcat 6 runs, Tomcat 7 refuses >> to start. > > You cannot expect to launch Tomcat 7 using a configuration file > (server.xml) for Tomcat 6. > > Instead, start with the server.xml that ships with Tomcat and make > whatever modifications you need to match your new configuration. > > > Hi Chris, this is exactly what I did. I modified the server.xml > from Tomcat 7 in accordance to my requirements; it failed to start. > To exclude any errors in the server.xml, I loaded the server.xml > from Tomcat 7 into Tomcat 6 (eliminating only a > ThreadLocalLeakPreventionListener) and it ran. Honestly, I'm quite surprised. > As I wrote, I started Tomcat 6 and 7 with identical server.xml > files. 6 ran 7 did not. What happens when you try to launch Tomcat 7? What do the logs say? Will Tomcat 7 start with it's stock server.xml configuration file? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAHysACgkQ9CaO5/Lv0PCqqgCfb059zJbQCpTK3TFWqFp95ryG g4sAoLuu126CNjxTxng7AmcVbJSyqsuQ =4oAb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WELCOME to users@tomcat.apache.org
On 23 Jan 2013, at 02:52, DHARMENDRA SETHI wrote: Hi I just installed Eclipse (Version: Juno Service Release 1 Build id: 20120920-0800) and want to know the how to make Tomcat node show up in window - preferences. I know I am missing the plugin but am not sure which plugin to download? This would be an Eclipse question and one that is probably well documented there. p I have following software downloaded/installed - [image: Inline image 2] Thanks DK On Tue, Jan 22, 2013 at 9:22 PM, wrote: > Hi! This is the ezmlm program. I'm managing the > users@tomcat.apache.org mailing list. > > I'm working for my owner, who can be reached > at users-ow...@tomcat.apache.org. > > Acknowledgment: I have added the address > >sethi.dharmen...@gmail.com > > to the users mailing list. > > Welcome to users@tomcat.apache.org! > > Please save this message so that you know the address you are > subscribed under, in case you later want to unsubscribe or change your > subscription address. > > > --- Administrative commands for the users list --- > > I can handle administrative requests automatically. Please > do not send them to the list address! Instead, send > your message to the correct command address: > > To subscribe to the list, send a message to: > > > To remove your address from the list, send a message to: > > > Send mail to the following for info and FAQ for this list: > > > > Similar addresses exist for the digest list: > > > > To get messages 123 through 145 (a maximum of 100 per request), mail: > > > To get an index with subject and author for messages 123-456 , mail: > > > They are always returned as sets of 100, max 2000 per request, > so you'll actually get 100-499. > > To receive all messages with the same subject as message 12345, > send a short message to: > > > The messages should contain one line or word of text to avoid being > treated as sp@m, but I will ignore their content. > Only the ADDRESS you send to is important. > > You can start a subscription for an alternate address, > for example "john@host.domain", just add a hyphen and your > address (with '=' instead of '@') after the command word: > > > To stop subscription for this address, mail: > > > In both cases, I'll send a confirmation message to that address. When > you receive it, simply reply to it to complete your subscription. > > If despite following these instructions, you do not get the > desired results, please contact my owner at > users-ow...@tomcat.apache.org. Please be patient, my owner is a > lot slower than I am ;-) > > --- Enclosed is a copy of the request I received. > > Return-Path: > Received: (qmail 2373 invoked by uid 99); 23 Jan 2013 02:22:46 - > Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) > by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 02:22:46 > + > X-ASF-Spam-Status: No, hits=1.5 required=5.0 > tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS > X-Spam-Check-By: apache.org > Received-SPF: pass (nike.apache.org: domain of > sethi.dharmendra@gmail.comdesignates 209.85.223.178 as permitted sender) > Received: from [209.85.223.178] (HELO mail-ie0-f178.google.com) > (209.85.223.178) > by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 02:22:37 > + > Received: by mail-ie0-f178.google.com with SMTP id c12so13119109ieb.9 > for gmail@tomcat.apache.org>; Tue, 22 Jan 2013 18:22:16 -0800 (PST) > DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; > d=gmail.com; s=20120113; > h=mime-version:x-received:in-reply-to:references:date:message-id > :subject:from:to:content-type; > bh=rxIXeyPfIacgJ3qKEtynw4l7yO4GjiUyRCZb6wEmNC4=; > > b=gWGZnR3RJqWQ5vzfH91Wef2WRHW7+KkGl//jkdbd1DhZFyitvQjBzmcuAnzYYbtO7U > > w2tiqSgH3VBI8oPdKDcBpEMKnd4u2K1KF1VdOQeRkANNwF9a6cQj7vr+URovcoKmXRAM > > HuU1lBaL+28tiyXQvDZWuksM2cPsahtFs0+IvnhtWjiIJoP5rcHg4D4fOhYI2A6QLraj > > qF2fTGSnKgWWUYFIZgigTLctGUm1ixd2TkfYU8fe08RLcgjb2U6Z2EZHLrwj5xNro48J > > aVhGcZE2PbaewvApOdUITlgMXEn31aYMNsgEnXZb2RYUxArl6kQCGn9Had1d3HtcFbV8 > gOvQ== > MIME-Version: 1.0 > X-Received: by 10.43.125.133 with SMTP id > gs5mr16234899icc.54.1358907736763; > Tue, 22 Jan 2013 18:22:16 -0800 (PST) > Received: by 10.64.78.69 with HTTP; Tue, 22 Jan 2013 18:22:16 -0800 (PST) > In-Reply-To: <1358907612.97014.ez...@tomcat.apache.org> > References: <1358907612.97014.ez...@tomcat.apache.org> > Date: Tue, 22 Jan 2013 21:22:16 -0500 > Message-ID: aw2iqq4b3+whold...@mail.gmail.com> > Subject: Re: confirm subscribe to users@tomcat.apache.org > From: DHARMENDRA SETHI > To: users-sc.1358907612.mngongokjnbjkkgiplli-sethi.dharmendra= > gmail@tomcat.apache.org > Content-Type: multipart/alternative; boundary=bcaec517cbe0eeaf0d04d3eb5c0a > X-Virus-Checked: Checked by ClamAV on apache.org > >
Re: Loading a DeSerialized Class to WebabbClassLoader Question
Solution and root of problem: My application was using ObjectInputStream (OIS) to convert a serialized instance of an object. OIS uses a different class loader, one which does not have visibility of the classes loaded in the WebappClassLoader. This was giving a ClassNotFoundException. Then I found CustomObjectInputStream. Initially, I tried to import this from catalina.jar but this caused several errors on deploying the war, mainly related to XML parsers (??). I then got the source for CustomObjectInputStream and added it to my web-app (about 100 lines of code). This yielded a solution, full credit to... Craig R. McClanahan and Bip Thelin for writing this :-) Thanks to those who replied to my earlier question. regards, Peter On 01/22/2013 07:16 PM, Peter Lavin wrote: Hi again, I've spent some time on this today and have found (at least I think so) that my problem in deserializing an instance of an object is related to the ClassLoader that the class ObjectInputStream uses. It appears that it does not use the WebappClassLoader of the service in question, but instead defaults to a ClassLoader higher up the tree (which does not have visibility on the cache of the WebappClassLoader). In my service, I've loaded a full class definition and created an instance of it. At this point it (afaik) must be in the cache of the WebappClassLoader. However, when an ObjectInputStream is called to... ois.readObject() on a byte[] of an instance of that same class, it fail for ClassNotFoundException. A Tomcat solution is identified here... http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/util/CustomObjectInputStream.html Which is in $CATILANA_HOME/lib/catalina.jar. Has anyone use this? do I need to add this jar implement this, and include it in my war file? regards, Peter On 01/21/2013 08:30 PM, Konstantin Kolinko wrote: 2013/1/21 Peter Lavin: Dear List, My web application needs to deserialize both classes and objects which are sent to it. I'm using Base64 serialization, and when I transport full.class file to a service, I can deserialize it with no problem using ObjectInputStream.readObject(). I also need to transport instances of certain classes to the application but without having the benefit of having the class loaded in the WebappClassLoader. Not surprisingly, deserializing an instance of a class fails for ClassNotFoundException. My question: When I need to transport an instance of a class, I can easily also transport the full class. This full class can be instantiated if required. How could I load this class to the WebappClassLoader and have it available there for when I need to call ois.readObject()? I want to load the (full) class to the WebClassLoader to over come the ClassNotFoundException. The same as with any other ClassLoader: use the bytes and call ClassLoader.defineClass(..), then ClassLoader.resolveClass(..). There is an example in WebappClassLoader.clearReferencesJdbc() method (though resolveClass() is not called there, I do not know why - maybe it was just forgotten). Env: Tomcat 7.0.14 Known security issues: http://tomcat.apache.org/security-7.html OSCentOS release 5.8 (Final) java version 1.6.0 22 OpenJDK Runtime Environment (IcedTea6 1.10.10) (rhel-1.28.1.10.10.el5 8-x86 64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- with best regards, Peter Lavin, PhD Candidate, CAG - Computer Architecture & Grid Research Group, Lloyd Institute, 005, Trinity College Dublin, Ireland. +353 1 8961536 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Trying to install tomcat 7.0.35 but after installation it shows me as Apache Tomcat 7.0.2
Kiran > I want to run it as service.I installed this by running service bat file > from cmd prompt.once installation was success full.I checked local > host:8080.over there I see version 7.0.2 . in a cmd prompt run netstat -ano. The output will list all processes and the TCP port they have open. Find the row that ends with :8080 in the second column. My machine runs tomcat on port 8084, and the row looks like this TCP0.0.0.0:8082 0.0.0.0:0 LISTENING 596 The last columns lists the process id. Start task manager (right click on task bar and click start task manager). Under view, click select columns, then add the PID column. Then look through the lists of processes on the process tab. Find the one matching the process above - so for my machine it was 596. When you have the row, click open file location. All this will show you the location of the tomcat running on port 8080. From what you have said it is very clear that it is tomcat 7.0.2. >I cannot remove all tomcats since > it will large effort for me.but I know there nothing wrong with those.they > sit in different directories. If you really want to run 7.0.35 instead of 7.0.2, then remove the service for 7.0.2, and then install the 7.0.35 service. To uninstall the service, go to cmd prompt and from CATALINA_HOME\bin run service uninstall. The alternative is to run 7.0.35 on a different port, e.g. 8081. Would this work better for you? HTH Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Getting java.nio.BufferOverflowException in Tomcat 7.0.25
Hi All, I am using Liferay 6.1 EE portal in which Tomcat 7.0.25 is bundled. Operating system environment is Unix. There is apache web server at front which takes the request from end user and forwards to above Liferay portal through Ajp connector. I am getting * "java.nio.BufferOverflowException"* exception in tomcat catalina logs but not able to find the root cause. Generally it occurs while we are running load test. Any sort of help is appreciated as I am not able to find any clue here. *Exception Trace:* * * SEVERE: Error processing request java.nio.BufferOverflowException at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:329) at org.apache.coyote.ajp.AjpAprProcessor.output(AjpAprProcessor.java:285) at org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1081) at org.apache.coyote.Response.doWrite(Response.java:533) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:383) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:473) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:334) at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:283) at org.apache.catalina.connector.Response.finishResponse(Response.java:507) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:434) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) -- REGARDS, HIMANSHU MODI -- NEVER GIVE UP --