TC 5.5.9 - how to use the system classpath
Our tomcat's are configured to use the system classpath for a large amount of the libraries. With TC 4.1.30, we modify the setclasspath.* and use catalina.sh start to start it. I tried this with TC 5.5.9 and it did not work. Is there something else that I am supposed to do to make the system classpath available to the webapps? Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: war classpath problem
forgot to tell about my env : jboss3.2.2/jbossweb-tomcat41.sar On 9/20/05, lio tomcat <[EMAIL PROTECTED]> wrote: > > Hello world, > My war and i have some problem for loading some class that are embedded > in jars in myWar/WEB-INF/lib... > I tried to solve this by writing a proper myWar/META-INF/MANIFEST.MF with > no success. It simply ignores > it. > I don't have anymore idea. May you give me some clue? > At list a sample of a manifest file for a war file, please. > thx, >
war classpath problem
Hello world, My war and i have some problem for loading some class that are embedded in jars in myWar/WEB-INF/lib... I tried to solve this by writing a proper myWar/META-INF/MANIFEST.MF with no success. It simply ignores it. I don't have anymore idea. May you give me some clue? At list a sample of a manifest file for a war file, please. thx,
RE: tomcat 4.x classpath
I want to add a directory that I have in my j2sdk\jre\lib\ext that I am using for development on that server. I don't want to have to copy that folder over to tomcat/common/classes (for example), and have 2 copies of my code on the same system. I would rather add my j2sdk\jre\lib\ext\X to tomcat's classpath, or just have tomcat read my system classpath and get it from there. But by default tomcat does not use your system classpath, and I can't figure out how to either add the system classpath to its classpath or to add directories to it. It would read jar files from my lib/ext I believe, but because this code is in development it is not yet in a jar file. jason -Original Message- From: Alon Belman [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 4:35 PM To: Tomcat Users List Subject: Re: tomcat 4.x classpath You almost certainly don't need to set it directly. Tomcat will build classpaths for its different class loaders itself following the rules explained here: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html On 7/21/05, Bergthorson, Jason <[EMAIL PROTECTED]> wrote: > How do you add directories to tomcat's classpath? > > > > Jason Bergthorson > > GIS Programmer/Applications Developer > > > > Phone: 204.983.4035 > > Fax: 204.983.2178 > > 200-303 Main Street > > Winnipeg MB R3C 3G7 > > > > [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4.x classpath
Please take me off this mailing list. I don't know how I got on it and don't know what the hell it is about. WARREN TAYLOR Sunbelt Business Advisors Sunbelt Business Brokers of MS www.sunbeltnetwork.com -Original Message- From: Alon Belman [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 4:35 PM To: Tomcat Users List Subject: Re: tomcat 4.x classpath You almost certainly don't need to set it directly. Tomcat will build classpaths for its different class loaders itself following the rules explained here: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html On 7/21/05, Bergthorson, Jason <[EMAIL PROTECTED]> wrote: > How do you add directories to tomcat's classpath? > > > > Jason Bergthorson > > GIS Programmer/Applications Developer > > > > Phone: 204.983.4035 > > Fax: 204.983.2178 > > 200-303 Main Street > > Winnipeg MB R3C 3G7 > > > > [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.x classpath
You almost certainly don't need to set it directly. Tomcat will build classpaths for its different class loaders itself following the rules explained here: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html On 7/21/05, Bergthorson, Jason <[EMAIL PROTECTED]> wrote: > How do you add directories to tomcat's classpath? > > > > Jason Bergthorson > > GIS Programmer/Applications Developer > > > > Phone: 204.983.4035 > > Fax: 204.983.2178 > > 200-303 Main Street > > Winnipeg MB R3C 3G7 > > > > [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 4.x classpath
How do you add directories to tomcat's classpath? Jason Bergthorson GIS Programmer/Applications Developer Phone: 204.983.4035 Fax: 204.983.2178 200-303 Main Street Winnipeg MB R3C 3G7 [EMAIL PROTECTED]
Tomcat and your classpath
My current install of Tomcat 4.1.29 does not access my system classpath. I am using Windows 2000 Server. I would like Tomcat to access my classpath as I have a development package located in my %JAVA_HOME%\jre\lib\ext directory that I do not want to copy over to Tomcat\common\classes for my sites to access. I would like only one copy of this package located on my server and for standards reasons with my organization, it must be located in my lib\ext directory. Is there a way to add a path to Tomcat's classpath, or to even just add your entire classpath to Tomcat's classpath? Thanks! jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classpath issues with embedded tomcat
Hello all, I'm running embedded tomcat 5.5.9. Let's say that I have one version of X.jar in my main classpath when I launch my embedded Tomcat, and also a different version of X.jar in a deployed webapp under WEB-INF/lib. Is there a way to force tomcat to use the X.jar version that it's in WEB-INF/lib and NOT the one that's in the main classpath? The default class loading behavior uses the X.jar in the main classpath and not the X.jar in WEB-INF/lib, which is causing problems since the deployed webapp doesn't suppor the version of X.jar that the parent classloader has already loaded. Any help is greatly appreciated! Thanks, Ryan
RE: add to classpath
David, Can the DB hold my hibernate.cfg.xml, castor.properties, log4j.properties? Even if there was a way to put these in the database I'm afraid its more trouble than it worth. Thanks for the suggestions but I'll just stick with my script change. Stuart -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 12:57 AM To: Tomcat Users List Subject: Re: add to classpath Then I would highly recommend a persistent backend like a Db instead of playing with the classpath. Just my opinion. --David Stuart wrote: >Guru, >I need to do this so that I can deliver the application following my >company's standard format. The tomcat application is just a small part of >what is being delivered and we like to put all configuration information in >a standard place for all apps. [please don't ask for any more explanation >that this just accept the fact that I need to do it] *8-) > >BTW: I have just gone ahead and modified the Catalina.sh (I would rather >have some other way but at least it works...). > >Thanks, >Stuart > >-Original Message- >From: Gurumoorthy [mailto:[EMAIL PROTECTED] >Sent: Saturday, July 09, 2005 10:29 PM >To: Tomcat Users List >Subject: Re: add to classpath > >why are you doing this ? just copy the jars to the lib directory inside >WEB-INF .. and restart the app ... >or if this spans into multiple application then ... put them in the >tomcat/common/bin directory ... > >Regards >guru >- Original Message - >From: "Stuart" <[EMAIL PROTECTED]> >To: "'Tomcat Users List'" >Sent: Saturday, July 09, 2005 8:19 AM >Subject: add to classpath > > > > >>Hi, >>Please scratch that last question. I still do not know what the problem >>is >>but I think I will just go with modifying Catalina.sh. Actually all I >>need >>to do is add to the tomcat classpath so that my web applications can find >>things in different locations. >> >>Is there are better way than hacking the .sh file (jakarta-tomcat-5.0.28)? >> >>Thanks, >> >>Stuart >> >> >> >>-Original Message- >>From: Stuart [mailto:[EMAIL PROTECTED] >>Sent: Saturday, July 09, 2005 1:42 PM >>To: 'Tomcat Users List' >>Subject: Problem using org.apache.catalina.startup.Bootstrap >> >> >>Hi, >> >>I am trying to start Tomcat using my own script and am getting the >>following >>error (Please help!): >> >>/cygdrive/c/j2sdk1.4.2_07/bin/java -classpath >>.\;c:\data\stuart\npshome\var\prop >> >> >> >erties\lsms;c:\jakarta-tomcat-5.0.28\bin\bootstrap.jar;c:\j2sdk1.4.2_07\lib \ > > >>tool >>s.jar -Dcatalina.base=c:\data\stuart\npshome\var\lsmsweb >>-Dcatalina.home=c:\jakarta-tomcat-5.0.28 -Djava.io.tmpdir= >> >> >> >-Djava.endorsed.dirs=c:\jakarta-tomcat-5.0.28\bin;c:\jakarta-tomcat-5.0.28\ c > > >>ommon\lib org.apache.catalina.startup.Bootstrap start >> >> >>Bootstrap: Class loader creation threw exception >>java.lang.ExceptionInInitializerError at >> >> >> >org.apache.catalina.startup.ClassLoaderFactory.(ClassLoaderFactory. j > > >>ava:63) at >>org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java >>:103)at >>org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196) >> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402) >>Caused by: org.apache.commons.logging.LogConfigurationException: >>org.apache.comm >>ons.logging.LogConfigurationException: java.lang.NullPointerException >>(Caused by >>java.lang.NullPointerException) (Caused by >>org.apache.commons.logging.LogConfig >>urationException: java.lang.NullPointerException (Caused by >>java.lang.NullPointerException))at >>org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory >>Impl.java:543)at >>org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory >>Impl.java:235) >> >>Regards, >>Stuart >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: add to classpath
Then I would highly recommend a persistent backend like a Db instead of playing with the classpath. Just my opinion. --David Stuart wrote: Guru, I need to do this so that I can deliver the application following my company's standard format. The tomcat application is just a small part of what is being delivered and we like to put all configuration information in a standard place for all apps. [please don't ask for any more explanation that this just accept the fact that I need to do it] *8-) BTW: I have just gone ahead and modified the Catalina.sh (I would rather have some other way but at least it works...). Thanks, Stuart -Original Message- From: Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 10:29 PM To: Tomcat Users List Subject: Re: add to classpath why are you doing this ? just copy the jars to the lib directory inside WEB-INF .. and restart the app ... or if this spans into multiple application then ... put them in the tomcat/common/bin directory ... Regards guru - Original Message - From: "Stuart" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Saturday, July 09, 2005 8:19 AM Subject: add to classpath Hi, Please scratch that last question. I still do not know what the problem is but I think I will just go with modifying Catalina.sh. Actually all I need to do is add to the tomcat classpath so that my web applications can find things in different locations. Is there are better way than hacking the .sh file (jakarta-tomcat-5.0.28)? Thanks, Stuart -Original Message- From: Stuart [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 1:42 PM To: 'Tomcat Users List' Subject: Problem using org.apache.catalina.startup.Bootstrap Hi, I am trying to start Tomcat using my own script and am getting the following error (Please help!): /cygdrive/c/j2sdk1.4.2_07/bin/java -classpath .\;c:\data\stuart\npshome\var\prop erties\lsms;c:\jakarta-tomcat-5.0.28\bin\bootstrap.jar;c:\j2sdk1.4.2_07\lib\ tool s.jar -Dcatalina.base=c:\data\stuart\npshome\var\lsmsweb -Dcatalina.home=c:\jakarta-tomcat-5.0.28 -Djava.io.tmpdir= -Djava.endorsed.dirs=c:\jakarta-tomcat-5.0.28\bin;c:\jakarta-tomcat-5.0.28\c ommon\lib org.apache.catalina.startup.Bootstrap start Bootstrap: Class loader creation threw exception java.lang.ExceptionInInitializerError at org.apache.catalina.startup.ClassLoaderFactory.(ClassLoaderFactory.j ava:63) at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java :103)at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.comm ons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfig urationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory Impl.java:543)at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory Impl.java:235) Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: add to classpath
Guru, I need to do this so that I can deliver the application following my company's standard format. The tomcat application is just a small part of what is being delivered and we like to put all configuration information in a standard place for all apps. [please don't ask for any more explanation that this just accept the fact that I need to do it] *8-) BTW: I have just gone ahead and modified the Catalina.sh (I would rather have some other way but at least it works...). Thanks, Stuart -Original Message- From: Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 10:29 PM To: Tomcat Users List Subject: Re: add to classpath why are you doing this ? just copy the jars to the lib directory inside WEB-INF .. and restart the app ... or if this spans into multiple application then ... put them in the tomcat/common/bin directory ... Regards guru - Original Message - From: "Stuart" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Saturday, July 09, 2005 8:19 AM Subject: add to classpath > Hi, > Please scratch that last question. I still do not know what the problem > is > but I think I will just go with modifying Catalina.sh. Actually all I > need > to do is add to the tomcat classpath so that my web applications can find > things in different locations. > > Is there are better way than hacking the .sh file (jakarta-tomcat-5.0.28)? > > Thanks, > > Stuart > > > > -Original Message- > From: Stuart [mailto:[EMAIL PROTECTED] > Sent: Saturday, July 09, 2005 1:42 PM > To: 'Tomcat Users List' > Subject: Problem using org.apache.catalina.startup.Bootstrap > > > Hi, > > I am trying to start Tomcat using my own script and am getting the > following > error (Please help!): > > /cygdrive/c/j2sdk1.4.2_07/bin/java -classpath > .\;c:\data\stuart\npshome\var\prop > erties\lsms;c:\jakarta-tomcat-5.0.28\bin\bootstrap.jar;c:\j2sdk1.4.2_07\lib\ > tool > s.jar -Dcatalina.base=c:\data\stuart\npshome\var\lsmsweb > -Dcatalina.home=c:\jakarta-tomcat-5.0.28 -Djava.io.tmpdir= > -Djava.endorsed.dirs=c:\jakarta-tomcat-5.0.28\bin;c:\jakarta-tomcat-5.0.28\c > ommon\lib org.apache.catalina.startup.Bootstrap start > > > Bootstrap: Class loader creation threw exception > java.lang.ExceptionInInitializerError at > org.apache.catalina.startup.ClassLoaderFactory.(ClassLoaderFactory.j > ava:63) at > org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java > :103)at > org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196) >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402) > Caused by: org.apache.commons.logging.LogConfigurationException: > org.apache.comm > ons.logging.LogConfigurationException: java.lang.NullPointerException > (Caused by > java.lang.NullPointerException) (Caused by > org.apache.commons.logging.LogConfig > urationException: java.lang.NullPointerException (Caused by > java.lang.NullPointerException))at > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory > Impl.java:543)at > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory > Impl.java:235) > > Regards, > Stuart > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: add to classpath
why are you doing this ? just copy the jars to the lib directory inside WEB-INF .. and restart the app ... or if this spans into multiple application then ... put them in the tomcat/common/bin directory ... Regards guru - Original Message - From: "Stuart" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Saturday, July 09, 2005 8:19 AM Subject: add to classpath Hi, Please scratch that last question. I still do not know what the problem is but I think I will just go with modifying Catalina.sh. Actually all I need to do is add to the tomcat classpath so that my web applications can find things in different locations. Is there are better way than hacking the .sh file (jakarta-tomcat-5.0.28)? Thanks, Stuart -Original Message- From: Stuart [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 1:42 PM To: 'Tomcat Users List' Subject: Problem using org.apache.catalina.startup.Bootstrap Hi, I am trying to start Tomcat using my own script and am getting the following error (Please help!): /cygdrive/c/j2sdk1.4.2_07/bin/java -classpath .\;c:\data\stuart\npshome\var\prop erties\lsms;c:\jakarta-tomcat-5.0.28\bin\bootstrap.jar;c:\j2sdk1.4.2_07\lib\ tool s.jar -Dcatalina.base=c:\data\stuart\npshome\var\lsmsweb -Dcatalina.home=c:\jakarta-tomcat-5.0.28 -Djava.io.tmpdir= -Djava.endorsed.dirs=c:\jakarta-tomcat-5.0.28\bin;c:\jakarta-tomcat-5.0.28\c ommon\lib org.apache.catalina.startup.Bootstrap start Bootstrap: Class loader creation threw exception java.lang.ExceptionInInitializerError at org.apache.catalina.startup.ClassLoaderFactory.(ClassLoaderFactory.j ava:63) at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java :103)at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.comm ons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfig urationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory Impl.java:543)at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory Impl.java:235) Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
add to classpath
Hi, Please scratch that last question. I still do not know what the problem is but I think I will just go with modifying Catalina.sh. Actually all I need to do is add to the tomcat classpath so that my web applications can find things in different locations. Is there are better way than hacking the .sh file (jakarta-tomcat-5.0.28)? Thanks, Stuart -Original Message- From: Stuart [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 1:42 PM To: 'Tomcat Users List' Subject: Problem using org.apache.catalina.startup.Bootstrap Hi, I am trying to start Tomcat using my own script and am getting the following error (Please help!): /cygdrive/c/j2sdk1.4.2_07/bin/java -classpath .\;c:\data\stuart\npshome\var\prop erties\lsms;c:\jakarta-tomcat-5.0.28\bin\bootstrap.jar;c:\j2sdk1.4.2_07\lib\ tool s.jar -Dcatalina.base=c:\data\stuart\npshome\var\lsmsweb -Dcatalina.home=c:\jakarta-tomcat-5.0.28 -Djava.io.tmpdir= -Djava.endorsed.dirs=c:\jakarta-tomcat-5.0.28\bin;c:\jakarta-tomcat-5.0.28\c ommon\lib org.apache.catalina.startup.Bootstrap start Bootstrap: Class loader creation threw exception java.lang.ExceptionInInitializerError at org.apache.catalina.startup.ClassLoaderFactory.(ClassLoaderFactory.j ava:63) at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java :103)at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.comm ons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfig urationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory Impl.java:543)at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory Impl.java:235) Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
I could able to do it. But it is working for the files under the Tomcat Home Directory. Is it possible to put a directory outside the Tomcat and give it here under common.loader. I mean I will put a directory in c:\jars. I want this to be given for common.loader=c:/jars/*jar. It is not working for me If I give like this. Any reason you know? Thankas Srinivas Ivaturi. -Original Message- From: Anoop kumar V [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 6:27 PM To: Tomcat Users List Subject: Re: Application Level Classpath Setting AFAIK - Tomcat does not care about the system classpath. It picks up its classpath from catalina.sh ->setclasspath.sh (TC 4.x) In TC 5.x (this too FYI does not care abt the system classpath, but) you can modify the following lines in catalina.properties file under the conf dir ... # # # List of comma-separated paths defining the contents of the "common" # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. # If left as blank,the JVM system loader will be used as Catalina's "common" # loader. # Examples: # "foo": Add this folder as a class repository # "foo/*.jar": Add all the JARs of the specified folder as class # repositories # "foo/bar.jar": Add bar.jar as a class repository common.loader=${catalina.home}/common/classes,${catalina.home}/common/i1 8n/*.jar,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/ lib/*.jar # # List of comma-separated paths defining the contents of the "server" # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. # If left as blank, the "common" loader will be used as Catalina's "server" # loader. # Examples: # "foo": Add this folder as a class repository # "foo/*.jar": Add all the JARs of the specified folder as class # repositories # "foo/bar.jar": Add bar.jar as a class repository server.loader=${catalina.home}/server/classes,${catalina.home}/server/li b/*.jar # # List of comma-separated paths defining the contents of the "shared" # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_BASE path or absolute. If left as blank, # the "common" loader will be used as Catalina's "shared" loader. # Examples: # "foo": Add this folder as a class repository # "foo/*.jar": Add all the JARs of the specified folder as class # repositories # "foo/bar.jar": Add bar.jar as a class repository shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/li b/*.jar HTH, Anoop On 7/1/05, Peter Crowther <[EMAIL PROTECTED]> wrote: > > From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] > > It is not that it wont work , It is by design. > > OK. So, to summarise: > > - You have a set of jars that is too large to name on the classpath in > Windows; > > - The jars are required for one webapp only, not for the whole of Tomcat > (so one could argue that a classpath-based solution is a poor solution > as it might interfere with other webapps deployed in the same > container); > > - The jars would work if placed in the webapp's lib directory. > > You don't wish to place the jars into the webapp's lib directory "by > design", which prevents a simple solution that would apparently work. > If it doesn't work, I can't help much more unless you can give some more > information about why it doesn't work or why you'd prefer not to do > this. > > I'm not aware of another solution that would work without amending the > Tomcat source and recompiling. I don't think you can extend the > classpath in conf/server.xml or in web.xml (although I could be wrong; > this is from a fairly quick check). So the only alternative I can think > of is to deploy an entire custom version of Tomcat. > > Anyone else? > > - Peter > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks and best regards, Anoop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
> From: Anoop kumar V [mailto:[EMAIL PROTECTED] > In TC 5.x (this too FYI does not care abt the system classpath, but) > you can modify the following lines in catalina.properties file under > the conf dir ... > > That's better than my version - thanks, Anoop. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Application Level Classpath Setting
AFAIK - Tomcat does not care about the system classpath. It picks up its classpath from catalina.sh ->setclasspath.sh (TC 4.x) In TC 5.x (this too FYI does not care abt the system classpath, but) you can modify the following lines in catalina.properties file under the conf dir ... # # # List of comma-separated paths defining the contents of the "common" # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. # If left as blank,the JVM system loader will be used as Catalina's "common" # loader. # Examples: # "foo": Add this folder as a class repository # "foo/*.jar": Add all the JARs of the specified folder as class # repositories # "foo/bar.jar": Add bar.jar as a class repository common.loader=${catalina.home}/common/classes,${catalina.home}/common/i18n/*.jar,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar # # List of comma-separated paths defining the contents of the "server" # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. # If left as blank, the "common" loader will be used as Catalina's "server" # loader. # Examples: # "foo": Add this folder as a class repository # "foo/*.jar": Add all the JARs of the specified folder as class # repositories # "foo/bar.jar": Add bar.jar as a class repository server.loader=${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar # # List of comma-separated paths defining the contents of the "shared" # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_BASE path or absolute. If left as blank, # the "common" loader will be used as Catalina's "shared" loader. # Examples: # "foo": Add this folder as a class repository # "foo/*.jar": Add all the JARs of the specified folder as class # repositories # "foo/bar.jar": Add bar.jar as a class repository shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar HTH, Anoop On 7/1/05, Peter Crowther <[EMAIL PROTECTED]> wrote: > > From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] > > It is not that it wont work , It is by design. > > OK. So, to summarise: > > - You have a set of jars that is too large to name on the classpath in > Windows; > > - The jars are required for one webapp only, not for the whole of Tomcat > (so one could argue that a classpath-based solution is a poor solution > as it might interfere with other webapps deployed in the same > container); > > - The jars would work if placed in the webapp's lib directory. > > You don't wish to place the jars into the webapp's lib directory "by > design", which prevents a simple solution that would apparently work. > If it doesn't work, I can't help much more unless you can give some more > information about why it doesn't work or why you'd prefer not to do > this. > > I'm not aware of another solution that would work without amending the > Tomcat source and recompiling. I don't think you can extend the > classpath in conf/server.xml or in web.xml (although I could be wrong; > this is from a fairly quick check). So the only alternative I can think > of is to deploy an entire custom version of Tomcat. > > Anyone else? > > - Peter > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks and best regards, Anoop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
> From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] > It is not that it wont work , It is by design. OK. So, to summarise: - You have a set of jars that is too large to name on the classpath in Windows; - The jars are required for one webapp only, not for the whole of Tomcat (so one could argue that a classpath-based solution is a poor solution as it might interfere with other webapps deployed in the same container); - The jars would work if placed in the webapp's lib directory. You don't wish to place the jars into the webapp's lib directory "by design", which prevents a simple solution that would apparently work. If it doesn't work, I can't help much more unless you can give some more information about why it doesn't work or why you'd prefer not to do this. I'm not aware of another solution that would work without amending the Tomcat source and recompiling. I don't think you can extend the classpath in conf/server.xml or in web.xml (although I could be wrong; this is from a fairly quick check). So the only alternative I can think of is to deploy an entire custom version of Tomcat. Anyone else? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
It is not that it wont work , It is by design. -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 3:19 PM To: Tomcat Users List Subject: RE: Application Level Classpath Setting > From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] > I forget to mention these are 3 rd party JARS which I cannot > put in the LIB. "Cannot" by licensing terms, because the app will no longer work if you do, or what? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
> From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] > I forget to mention these are 3 rd party JARS which I cannot > put in the LIB. "Cannot" by licensing terms, because the app will no longer work if you do, or what? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
I forget to mention these are 3 rd party JARS which I cannot put in the LIB. -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 3:12 PM To: 'Tomcat Users List' Subject: RE: Application Level Classpath Setting Put it in WEB-INF/lib -Original Message- From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] Sent: 01 July 2005 10:40 To: tomcat-user@jakarta.apache.org Subject: Application Level Classpath Setting Hi I have a set of JAR files to be set into classpath. I cannot keep the entire JARs into System classpath because of Windows OS restriction. Now I want to put all the jars set to classpath only for that application level for WAS. Thanks Srinivas Ivaturi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Level Classpath Setting
Put it in WEB-INF/lib -Original Message- From: Srinivas Ivaturi [mailto:[EMAIL PROTECTED] Sent: 01 July 2005 10:40 To: tomcat-user@jakarta.apache.org Subject: Application Level Classpath Setting Hi I have a set of JAR files to be set into classpath. I cannot keep the entire JARs into System classpath because of Windows OS restriction. Now I want to put all the jars set to classpath only for that application level for WAS. Thanks Srinivas Ivaturi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Application Level Classpath Setting
Hi I have a set of JAR files to be set into classpath. I cannot keep the entire JARs into System classpath because of Windows OS restriction. Now I want to put all the jars set to classpath only for that application level for WAS. Thanks Srinivas Ivaturi.
Change classpath in webapp
Hallo, I've a question about property files in web applications. In my app for Tomcat 5.0.28 I want to use some property files for configuration (e.g. log4j.xml is one of them, but I've app specific property files too). Since these files have to be placed in the class path, so that my app can find them, I've placed them under WEB-INF/classes. This works fine, but I would prefer a special directory named "config" at the top of the web application (next to WEB-INF). Is it possible to tell Tomcat that this directory is in the classpath? Of course I could manipulate the global classpath but I hope there's a way to place this in the web app configuration? Adding "config" to Class-Path in META-INF/MANIFEST.MF had no effect. Regards Markus Weseloh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: classpath problem?
> From: Bagus [mailto:[EMAIL PROTECTED] > Subject: classpath problem? > > > echo $CLASSPATH > .:/www/my_tomcat_apps:/usr/local/jakarta-tomcat-5.4.4/ ^ | Want to make that 5.5.4 and see what happens? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classpath problem?
Hi, Newbie here, I'm not sure why I'd be getting these compilation errors. I see my tomcat server at http://localhost/. The http://www.coreservlets.com/Apache-Tomcat-Tutorial/ seems to tell me it's my classpath, but *I* think I have my jar files properly in my classpath. See this following shell transcript. Thanks, Bagus > id uid=0(root) gid=0(wheel) groups=0(wheel), 5(operator) > echo $CLASSPATH .:/www/my_tomcat_apps:/usr/local/jakarta-tomcat-5.4.4/common/lib/servlet-api .jar:/usr/local/jakarta-tomcat-5.5.4/common/lib/jsp-api.jar > ls /usr/local/jakarta-tomcat-5.5.4/common/lib/jsp-api.jar /usr/local/jakarta-tomcat-5.5.4/common/lib/jsp-api.jar > ls /usr/local/jakarta-tomcat-5.5.4/common/lib/servlet-api.jar /usr/local/jakarta-tomcat-5.5.4/common/lib/servlet-api.jar > pwd /usr/www/my_tomcat_apps > ls -al HelloServlet.java -rw-r--r-- 1 bagus staff 955 Feb 18 09:04 HelloServlet.java > javac HelloServlet.java elloServlet.java:2: package javax.servlet does not exist import javax.servlet.*; ^ HelloServlet.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ HelloServlet.java:13: cannot resolve symbol symbol : class HttpServlet location: class HelloServlet public class HelloServlet extends HttpServlet { ^ HelloServlet.java:14: cannot resolve symbol symbol : class HttpServletRequest location: class HelloServlet public void doGet(HttpServletRequest request, ^ HelloServlet.java:15: cannot resolve symbol symbol : class HttpServletResponse location: class HelloServlet HttpServletResponse response) ^ HelloServlet.java:16: cannot resolve symbol symbol : class ServletException location: class HelloServlet throws ServletException, IOException { ^ 6 errors - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Slightly OT] CLASSPATH variable in catalina.sh
Sorry. Didn't see your previous post relating to the use of the -security flag. I'm not sure why it should make a difference in this case but in the past I've found that using CATALINA_OPTS=-Djava.security.debug=access,failure and starting tomcat at the command line with: catalina run -security 2> access.err > access.out to be useful for debugging security issues. J Jon Wingfield wrote: I don't think ${catalina.home}/common/classes/log4j.properties is a valid classpath element. An excerpt from the java tools doc says: "How the Java Launcher Finds User Classes: User classes are classes which build on the Java platform. To find user classes, the launcher refers to the user class path -- a list of directories, JAR archives, and ZIP archives which contain class files." So - if you *really* want to go this road - ${catalina.home}/common/classes would probably be better. However, since (IIRC) tomcat doesn't ship with axis you probably have it in your webapp's WEB-INF/lib. WEB-INF/classes takes precedence so if the properties file is there it should be picked up first. Ultimately, I guess it all depends on the relative places in the classloader hierarchy of the log4j and axis jars. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html HTH, Jon Robert Bateman wrote: While debugging a log4j problem this afternoon... I happened to attempt to rearrange the contents of my CLASSPATH on my Fedora Core 2 machine in order to insure a correct log4j.properties file is being loaded by TC. To insure the proper file is loaded, I placed ${catalina.home}/common/classes/log4j.properties as the *first* entry in the CLASSPATH that catalina.sh passes into the bootstrap process. Looking at 'ps -aef | grep java' I see my properties file listed first in the classpath. HOWEVER, it appears that classloader sun.misc.Launcher$AppClassLoader in Java 1.4.2_05 doesn't honor the -classpath in it's entirety - as 1.4.2_05 *never* loads the log4j.properties file that's in the classpath. Instead - it decides to load the log4j.properties file that is contained in the axis-ant.jar file. Am I crazy Or did I do something wrong??? Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Slightly OT] CLASSPATH variable in catalina.sh
I don't think ${catalina.home}/common/classes/log4j.properties is a valid classpath element. An excerpt from the java tools doc says: "How the Java Launcher Finds User Classes: User classes are classes which build on the Java platform. To find user classes, the launcher refers to the user class path -- a list of directories, JAR archives, and ZIP archives which contain class files." So - if you *really* want to go this road - ${catalina.home}/common/classes would probably be better. However, since (IIRC) tomcat doesn't ship with axis you probably have it in your webapp's WEB-INF/lib. WEB-INF/classes takes precedence so if the properties file is there it should be picked up first. Ultimately, I guess it all depends on the relative places in the classloader hierarchy of the log4j and axis jars. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html HTH, Jon Robert Bateman wrote: While debugging a log4j problem this afternoon... I happened to attempt to rearrange the contents of my CLASSPATH on my Fedora Core 2 machine in order to insure a correct log4j.properties file is being loaded by TC. To insure the proper file is loaded, I placed ${catalina.home}/common/classes/log4j.properties as the *first* entry in the CLASSPATH that catalina.sh passes into the bootstrap process. Looking at 'ps -aef | grep java' I see my properties file listed first in the classpath. HOWEVER, it appears that classloader sun.misc.Launcher$AppClassLoader in Java 1.4.2_05 doesn't honor the -classpath in it's entirety - as 1.4.2_05 *never* loads the log4j.properties file that's in the classpath. Instead - it decides to load the log4j.properties file that is contained in the axis-ant.jar file. Am I crazy Or did I do something wrong??? Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Slightly OT] CLASSPATH variable in catalina.sh
While debugging a log4j problem this afternoon... I happened to attempt to rearrange the contents of my CLASSPATH on my Fedora Core 2 machine in order to insure a correct log4j.properties file is being loaded by TC. To insure the proper file is loaded, I placed ${catalina.home}/common/classes/log4j.properties as the *first* entry in the CLASSPATH that catalina.sh passes into the bootstrap process. Looking at 'ps -aef | grep java' I see my properties file listed first in the classpath. HOWEVER, it appears that classloader sun.misc.Launcher$AppClassLoader in Java 1.4.2_05 doesn't honor the -classpath in it's entirety - as 1.4.2_05 *never* loads the log4j.properties file that's in the classpath. Instead - it decides to load the log4j.properties file that is contained in the axis-ant.jar file. Am I crazy Or did I do something wrong??? Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jndi.properties file and classpath
Perhaps this was missed the first time. I think the answer should be fairly simple. How do I get my servlet to pull in my jndi.properties file, which right now is in the WEB-INF/classes directory, instead of whatever one it seems to be pulling in that is directing it to tomcat? Regards Eric -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:18 AM To: 'Tomcat Users List' Subject: jndi.properties file and classpath We are using tomcat 5.0.28 and our servlet needs to load jndi.properties from a jndi.properties file in our WEB-INF/classes directory but it seems to be getting it from elsewhere and so our servlet, which needs to call a bean on a separate application server instance (in this case jboss) fails because its jndi context it pointing it at, I assume, the jndi instance running in tomcat. I even tried appending this classes directory to the front of the classpath when starting within the script (shiver) but that didn't work. What do I need to do? Regards Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jndi.properties file and classpath
We are using tomcat 5.0.28 and our servlet needs to load jndi.properties from a jndi.properties file in our WEB-INF/classes directory but it seems to be getting it from elsewhere and so our servlet, which needs to call a bean on a separate application server instance (in this case jboss) fails because its jndi context it pointing it at, I assume, the jndi instance running in tomcat. I even tried appending this classes directory to the front of the classpath when starting within the script (shiver) but that didn't work. What do I need to do? Regards Eric
java.io.IOException: CreateProcess: jikes -classpath
I'm trying to use jikes 1.22 with Tomcat 5.5.7 on Windows 2000. I've built jikes following this: http://oss.software.ibm.com/developerworks/opensource/jikes/faq/dev-win32.sh tml I did these steps (quoting jasper howto): >From your Ant installation, copy ant.jar and (if it's available: Ant 1.5 and later) ant-launcher.jar to $CATALINA_BASE/common/lib. Download and install jikes. jikes must support the -encoding option. Execute jikes -help to verify that it was built with support for -encoding. Set the init parameter compiler to jikes. Define the property -Dbuild.compiler.emacs=true when starting Tomcat by adding it to your CATALINA_OPTS environment variable. This changes how jikes outputs error messages so that it is compatible with Jasper. Tomcat throws an exception (notice how classpath is truncated): --- Nested Exception --- java.io.IOException: CreateProcess: jikes -classpath "C:\Program Files\Java\jre1.5.0\lib\ext\dnsns.jar;C:\Program Files\Java\jre1.5.0\lib\ext\localedata.jar;C:\Program Files\Java\jre1.5.0\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jre1.5.0\lib\ext\sunpkcs11.jar;C:\Programs\Tomcat\bin\bootstrap.j ar;C:\Programs\Tomcat\work\Catalina\localhost\eltest;C:\Programs\Tomcat\shar ed\classes;C:\Programs\Tomcat\common\classes;C:\Programs\Tomcat\common\i18n\ tomcat-i18n-en.jar;C:\Programs\Tomcat\common\i18n\tomcat-i18n-es.jar;C:\Prog rams\Tomcat\common\i18n\tomcat-i18n-fr.jar;C:\Programs\Tomcat\common\i18n\to mcat-i18n-ja.jar;C:\Programs\Tomcat\common\lib\ant-launcher.jar;C:\Programs\ Tomcat\common\lib\ant.jar;C:\Programs\Tomcat\common\lib\commons-el.jar;C:\Pr ograms\Tomcat\common\lib\jasper-compiler-jdt.jar;C:\Programs\Tomcat\common\l ib\jasper-compiler.jar;C:\Programs\Tomcat\common\lib\jasper-runtime.jar;C:\P rograms\Tomcat\common\lib\jsp-api.jar;C:\Programs\Tomcat\common\lib\naming-f actory-dbcp.jar;C:\Programs\Tomcat\common\lib\naming-facto? at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) etc. Any ideas how to solve this prob? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting the classpath
Crude works for me. I'm just trying to figure out why jython can't see the classes that should be in my WEB-INF/classes folder. Or for that matter to make sure that folder is in the classpath. --mikej -=- mike jackson [EMAIL PROTECTED] > -Original Message- > From: Tim Funk [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 20, 2005 10:57 AM > To: Tomcat Users List > Subject: Re: Getting the classpath > > > A *crude way* is to get a reference to the current context > classloader. If > the classloader is a URLClassloader - you can call getURLs() > to get the > classpath for that loader. Then keep calling > classloader.getParent() and keep > casting to a URLClassloader until parent is null. > > -Tim > > Mike Jackson wrote: > > > How can I get the current classpath at runtime as "seen" by > any class > > in a particular context? I know I can run System.getProperty( > > "java.class.path" ), but that seems to just show me the > classpath at > > startup of tomcat rather than for objects within the webapp. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting the classpath
A *crude way* is to get a reference to the current context classloader. If the classloader is a URLClassloader - you can call getURLs() to get the classpath for that loader. Then keep calling classloader.getParent() and keep casting to a URLClassloader until parent is null. -Tim Mike Jackson wrote: How can I get the current classpath at runtime as "seen" by any class in a particular context? I know I can run System.getProperty( "java.class.path" ), but that seems to just show me the classpath at startup of tomcat rather than for objects within the webapp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting the classpath
How can I get the current classpath at runtime as "seen" by any class in a particular context? I know I can run System.getProperty( "java.class.path" ), but that seems to just show me the classpath at startup of tomcat rather than for objects within the webapp. --mikej -=- mike jackson [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classpath of a filter
You'd have to let your web app also be able to use the server classloader. You can do this by setting server="true" in the declaration. That being said - whatever your trying to do is probably a very bad idea. -Tim Brij Naald wrote: Hi, i'm creating a filter which needs to know if the request is an instance of org.apache.catalina.connector.RequestFacade. When executing the 'if (request instanceof RequestFacade)' the program gives an error for that line: java.lang.NoClassDefFoundError: org/apache/catalina/connector/RequestFacade I guess the RequestFacade is only in the classpath of the tomcat-server, and not in the one of the servlet itself. Does anyone know how I can solve this problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classpath of a filter
Hi, i'm creating a filter which needs to know if the request is an instance of org.apache.catalina.connector.RequestFacade. When executing the 'if (request instanceof RequestFacade)' the program gives an error for that line: java.lang.NoClassDefFoundError: org/apache/catalina/connector/RequestFacade I guess the RequestFacade is only in the classpath of the tomcat-server, and not in the one of the servlet itself. Does anyone know how I can solve this problem? Thanks! _ Koop geen kat in een zak. Probeer alles 14 dagen bij jou thuis. http://linkstat.neckermann.de/go.mb1?benl_11294 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi, >Thanks - yes I realise. Wonderin why tihs has been done? Was the old >classloader mechanisms in 5.0.x that broken? Not criticising, just trying >to understand the reasoning here. No, it was fine: the problems arose due to OS behavior mostly, specifically Windoze, and how virtual file handles are maintained via the URLClassLoader. So we worked around them by adding these optional features, which trade performance (one time only, not every resource access) for resource locking. It's a good option to provide I think, and the defaults (both antiX options turned off) result in no performance cost (actually, there are gains) over 5.0.x. >Also I tried with the antiARLocking="true", but had some very strange >behaviours - I could not delete a jar - in order to replace it. Also, when >I used the ant JAR task - it replaced the contents of the JAR, however when >I attemted to access my web app Exceptions were thrown regarding unexpected >end of ZIP/JAR files etc - specifically when the class that was replaced >was >looked for by the classloader - after which a class not found exception was >thrown! I checked the new JAR using different tools and it is fine! Yup, strange. Look into the code to see how antiJARLocking is different from antiResourceLocking, and you'll see why such effects are possible and how they might be different from one OS to another. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi. Thanks - yes I realise. Wonderin why tihs has been done? Was the old classloader mechanisms in 5.0.x that broken? Not criticising, just trying to understand the reasoning here. Also I tried with the antiARLocking="true", but had some very strange behaviours - I could not delete a jar - in order to replace it. Also, when I used the ant JAR task - it replaced the contents of the JAR, however when I attemted to access my web app Exceptions were thrown regarding unexpected end of ZIP/JAR files etc - specifically when the class that was replaced was looked for by the classloader - after which a class not found exception was thrown! I checked the new JAR using different tools and it is fine! Thanks, Carl -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 1:08 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.4 - classes in classpath not being "released" On Mon, 22 Nov 2004 16:37:39 +0200, Carl Olivier <[EMAIL PROTECTED]> wrote: > Ooppps. > > Sorry -meant 300 seconds! I think this could be improved, but the penalty will stay significant. antiJARLocking prevents locking through usage of getResource on the classloader (where you get a URL to an entry in a JAR, and which would lock the JAR if you carelessly open it - Xerces with Struts does that) is more limited, but less expensive. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 - classes in classpath not being "released"
On Mon, 22 Nov 2004 16:37:39 +0200, Carl Olivier <[EMAIL PROTECTED]> wrote: > Ooppps. > > Sorry -meant 300 seconds! I think this could be improved, but the penalty will stay significant. antiJARLocking prevents locking through usage of getResource on the classloader (where you get a URL to an entry in a JAR, and which would lock the JAR if you carelessly open it - Xerces with Struts does that) is more limited, but less expensive. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi, >(e.g. get the StandardHost and call remove on the service/engine and then >recreate a StandardHost instance with all the relevant settings, then >calling deploy and start on it...) This is really not a recommended practice. With the increased JMX and Logging interaction, it's hard to get this right. However, if you do it, the effects will be the same with respect to antiJAR/ResourceLocking, because the classloader path through the code is the same. (It's the ClassLoader references that lock up these files). Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Ooppps. Sorry -meant 300 seconds! -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 4:37 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hectic. When it says startup performance penalties its not kidding eh? Context set tot antiResourceLocking="true" and added like 30 seconds to the server startup time :) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:58 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Agreed. Just nice to be aware of the penalties! If you undeploy and redeploy a site (using the core Catalina) classes etc, if this was NOT activated (the antiResourceLocking) would there be any effects? I am not talking about a redeployment via class changes, but a manual redeploy from within code (e.g. get the StandardHost and call remove on the service/engine and then recreate a StandardHost instance with all the relevant settings, then calling deploy and start on it...) Thanks, Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 4:45 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, Yup, not kidding. However, the reason to turn this on is to do in-place reloading, as opposed to server restarting, so the penalty is easily amortized over a few (not many) reloads. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 9:37 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hectic. > >When it says startup performance penalties its not kidding eh? Context set >tot antiResourceLocking="true" and added like 30 seconds to the server >startup time :) > > > >-Original Message- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:58 PM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > > >Hi, >You would need to turn on the antiJARLocking or antiResourceLocking >features of Tomcat 5.5.x (they are Context attributes, use either one >but not both >at >the same time). > >Yoav Shapira http://www.yoavshapira.com > > >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Monday, November 22, 2004 3:45 AM >>To: Tomcat Users List >>Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" >> >>Hi. >> >>Further to my email below, I have noticed that it happens after the >first >>time I re-deoply classes - i.e. after the first context reload... >> >>Carl >> >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Monday, November 22, 2004 8:50 AM >>To: Tomcat Users List >>Subject: Tomcat 5.5.4 - classes in classpath not being "released" >> >>Greetings. >> >>Having the following problem using Tomcat 5.5.4 under JDK 1.5: >> >>After running my webapp for a bit in a development environment, I want >to >>copy new and replacement classes to the webapp classes location, but >>sometimes (about 50/50) I cannot overrite/delete some of the classes - >as >>the VM has not let them go (file handles I assume)? I have to shut the >JVM >>(Tomcat) down before I can deploy my new classes >> >>Is this something in the new JDK/JRE (5.0)? Or is this something in the >>Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >>replicate) the problem on 5.0.x under JDK 1.4.x. >> >>Any input would be appreciated. >> >>Thanks! >> >>Carl >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > >This e-mail, including any attachments, is a confidential business >communication, and may contain information that is confidential, >proprietary and/or privileged. This e-mail is intended only for the >individual(s) to >whom it is addressed, and may not be saved, copied, printed, disclosed or >used by anyone else. If you are not the(an) intended recipient, please >immediately delete this e-mail from your computer system and notify the >sender. Thank you. > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be s
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi, Yup, not kidding. However, the reason to turn this on is to do in-place reloading, as opposed to server restarting, so the penalty is easily amortized over a few (not many) reloads. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 9:37 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hectic. > >When it says startup performance penalties its not kidding eh? Context set >tot antiResourceLocking="true" and added like 30 seconds to the server >startup time :) > > > >-Original Message- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:58 PM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > > >Hi, >You would need to turn on the antiJARLocking or antiResourceLocking >features >of Tomcat 5.5.x (they are Context attributes, use either one but not both >at >the same time). > >Yoav Shapira http://www.yoavshapira.com > > >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Monday, November 22, 2004 3:45 AM >>To: Tomcat Users List >>Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" >> >>Hi. >> >>Further to my email below, I have noticed that it happens after the >first >>time I re-deoply classes - i.e. after the first context reload... >> >>Carl >> >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Monday, November 22, 2004 8:50 AM >>To: Tomcat Users List >>Subject: Tomcat 5.5.4 - classes in classpath not being "released" >> >>Greetings. >> >>Having the following problem using Tomcat 5.5.4 under JDK 1.5: >> >>After running my webapp for a bit in a development environment, I want >to >>copy new and replacement classes to the webapp classes location, but >>sometimes (about 50/50) I cannot overrite/delete some of the classes - >as >>the VM has not let them go (file handles I assume)? I have to shut the >JVM >>(Tomcat) down before I can deploy my new classes >> >>Is this something in the new JDK/JRE (5.0)? Or is this something in the >>Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >>replicate) the problem on 5.0.x under JDK 1.4.x. >> >>Any input would be appreciated. >> >>Thanks! >> >>Carl >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > >This e-mail, including any attachments, is a confidential business >communication, and may contain information that is confidential, >proprietary >and/or privileged. This e-mail is intended only for the individual(s) to >whom it is addressed, and may not be saved, copied, printed, disclosed or >used by anyone else. If you are not the(an) intended recipient, please >immediately delete this e-mail from your computer system and notify the >sender. Thank you. > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hectic. When it says startup performance penalties its not kidding eh? Context set tot antiResourceLocking="true" and added like 30 seconds to the server startup time :) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:58 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Ok, thanks!! Appreciate the response as always! Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:58 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi. Further to my email below, I have noticed that it happens after the first time I re-deoply classes - i.e. after the first context reload... Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 8:50 AM To: Tomcat Users List Subject: Tomcat 5.5.4 - classes in classpath not being "released" Greetings. Having the following problem using Tomcat 5.5.4 under JDK 1.5: After running my webapp for a bit in a development environment, I want to copy new and replacement classes to the webapp classes location, but sometimes (about 50/50) I cannot overrite/delete some of the classes - as the VM has not let them go (file handles I assume)? I have to shut the JVM (Tomcat) down before I can deploy my new classes Is this something in the new JDK/JRE (5.0)? Or is this something in the Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to replicate) the problem on 5.0.x under JDK 1.4.x. Any input would be appreciated. Thanks! Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.4 - classes in classpath not being "released"
Greetings. Having the following problem using Tomcat 5.5.4 under JDK 1.5: After running my webapp for a bit in a development environment, I want to copy new and replacement classes to the webapp classes location, but sometimes (about 50/50) I cannot overrite/delete some of the classes - as the VM has not let them go (file handles I assume)? I have to shut the JVM (Tomcat) down before I can deploy my new classes Is this something in the new JDK/JRE (5.0)? Or is this something in the Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to replicate) the problem on 5.0.x under JDK 1.4.x. Any input would be appreciated. Thanks! Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CLASSPATH & Classloaders - Embedded Tomcat
What are the CLASSPATH and Classloaders used when attempting to use the Embedded class to get a Tomcat 5 working? On a regular bundled Tomcat5, the catalina/common/lib, catalina/server/lib, catalina/common/endorsed are automatically searched for jars and loads them. Furthermore environment variables such as CATALINA_HOME, JAVA_HOME and others set in catalina.sh. How are these handled with Embedded? "embedded" is not even an option to catalina.sh of Tomcat 5 anymore? fyi, I have tomcat 5.0.28. Embedded api docs then is wrong as it mentions this option to catalina.sh Furthermore, the "-security" option, takes a different path in the script catalina.sh and one can not use these features with embedded? I am just trying to clarify. If one got a code to share how to programmatically use this Embedded class and deploy a war file, please post it so we can learn from you. Please Help. Thanks. ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classpath with a service help
On Mon, Sep 20, 2004 at 03:16:10PM -0700, John MccLain wrote: : I wish to deploy Tomct5.0.28 along with a webapp. I want to be able to : insure that Tomcat is deployed as a service, uses the standard classpath AND : 1 more classpath entry. How can I set up the Tomcat windows installer to : setup Tomcat as a service and include a specific directory on the classpath? : Do I simply change ...tomcat/bin/service.bat (is that all that the installer : runs)? if so, then how? I would prefer to not haveto have clients manually : configuring classpath's for windows services. Tomcat (and most other web containers) don't use the classpath as set as an environment variable or on the commandline. They use 1/ the JARs in the webapp's WEB-INF/lib and bare class files in WEB-INF/classes 2/ some container-specific hierarchy of classloaders, usually in a chain-of-responsibility pattern. Tomcat uses {Tomcat install}/common/lib {Tomcat install}/common/classes {Tomcat install}/shared/lib {Tomcat install}/shared/classes {Tomcat install}/server/lib {Tomcat install}/server/classes (though probably not in that order ;) Long story short: if you use the container's (and the spec's) method of making classes available, there should be no need to set a classpath. Make your "one other entry" available in one of the places mentioned above. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classpath with a service help
Howdy, I wish to deploy Tomct5.0.28 along with a webapp. I want to be able to insure that Tomcat is deployed as a service, uses the standard classpath AND 1 more classpath entry. How can I set up the Tomcat windows installer to setup Tomcat as a service and include a specific directory on the classpath? Do I simply change ...tomcat/bin/service.bat (is that all that the installer runs)? if so, then how? I would prefer to not haveto have clients manually configuring classpath's for windows services. John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 "Before you criticize someone, walk a mile in their shoes. That way, you'll be a mile from them, and you'll have their shoes." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP on-server compilation: classpath problem?
When I deploy a JSP document with Tomcat 5.5.1 without precompiling, I get an error message when accessing the corresponding web page. >>>> org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 32 in the jsp file: /test.jspx Generated servlet error: org.apache.jsp.tag.web.selection_tagx cannot be resolved or is not a type An error occurred at line: 32 in the jsp file: /test.jspx Generated servlet error: org.apache.jsp.tag.web.selection_tagx cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:544) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>>> I can precompile the document without a problem. If I don't precompile, the jasper compiler does everything it's supposed to do. The following files all exist $CATALINA_HOME/work/Catalina/localhost/myapp/org/apache/jsp/test_jspx.java $CATALINA_HOME/work/Catalina/localhost/myapp/org/apache/jsp/tag/web/selection_tagx.java $CATALINA_HOME/work/Catalina/localhost/myapp/org/apache/jsp/tag/web/selection_tagx.class For some reason, the JDTCompiler doesn't find the compiled selection_tagx.class. Michael -- Michael SchuerigThis is not a false alarm mailto:[EMAIL PROTECTED] This is not a test http://www.schuerig.de/michael/ --Rush, Red Tide - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CLASSPATH in Windows XP
On Fri, Aug 20, 2004 at 12:29:25PM +0200, Javier wrote: : Does Tomcat use this CLASSPATH? How can I tell Tomcat to use that? You *really* want to follow standards here, and using a classpath env var with a webapp is not quite standard. Review the servlet spec. Do a search for "WEB-INF/lib" and understand why you need to put the jars there. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CLASSPATH in Windows XP
My first thought on this will be that the space, i.e. Servidor web, might be the cause. Not all installation does have a problem with but, I know some apps does have a problem with folders that contain spaces. HTH! Javier wrote: Hello, I have Tomcat 5 running in Windows XP. Now I want to install Apache SOAP and AXIS not copying the jar files into Tomcat5/common/lib but setting their paths in CLASSPATH, like installation instructions of SOAP and AXIS says. It doesn’t work (copying the files all works fine). This is my CLASSPATH: "C:\Servidor web\AXIS 1.1\lib\axis.jar;C:\Servidor web\XML Security 1.1.0\libs\xmlsec.jar;C:\Servidor web\Xerces 2.5.0\xmlParserAPIs.jar;C:\Servidor web\Xerces 2.5.0\xml-apis.jar;C:\Servidor web\Xerces 2.5.0\xercesImpl.jar;C:\Servidor web\JAVA Mail 1.3.2ea\mail.jar;C:\Servidor web\JAF 1.0.2\activation.jar;C:\Servidor web\SOAP 2.3.1\lib\soap.jar;C:\WINDOWS\System32\QTJava.zip" Does Tomcat use this CLASSPATH? How can I tell Tomcat to use that? Thanks. -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CLASSPATH in Windows XP
Hello, I have Tomcat 5 running in Windows XP. Now I want to install Apache SOAP and AXIS not copying the jar files into Tomcat5/common/lib but setting their paths in CLASSPATH, like installation instructions of SOAP and AXIS says. It doesnt work (copying the files all works fine). This is my CLASSPATH: "C:\Servidor web\AXIS 1.1\lib\axis.jar;C:\Servidor web\XML Security 1.1.0\libs\xmlsec.jar;C:\Servidor web\Xerces 2.5.0\xmlParserAPIs.jar;C:\Servidor web\Xerces 2.5.0\xml-apis.jar;C:\Servidor web\Xerces 2.5.0\xercesImpl.jar;C:\Servidor web\JAVA Mail 1.3.2ea\mail.jar;C:\Servidor web\JAF 1.0.2\activation.jar;C:\Servidor web\SOAP 2.3.1\lib\soap.jar;C:\WINDOWS\System32\QTJava.zip" Does Tomcat use this CLASSPATH? How can I tell Tomcat to use that? Thanks.
RE: J2EE classpath issue, was Tomcat 3 will not load on Windows 98
Return Receipt Your RE: J2EE classpath issue, was Tomcat 3 will not load on Windows 98 document: was received Nicolas PEREZ/PAR/HD/Corp by: at: 16/07/2004 16:19:16 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: J2EE classpath issue, was Tomcat 3 will not load on Windows 98
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Subject: RE: J2EE classpath issue, was Tomcat 3 will not load on Windows 98 > > So its primarily a classpath issue? I.e. its not a case of *don't > use J2EE* and ensure your classpath order is right. Well, you are using J2EE, just not the Sun package. Note that the Sun J2EE SDK download comes with a lot of excess baggage that only further complicates the issue. > I guess it is in the documentation... or is it? I'll check. I don't really know - I found out the hard way. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: J2EE classpath issue, was Tomcat 3 will not load on Windows 98
Thanks Charles. > You don't want to download the Sun J2EE package - Tomcat > supplies its own, and having both on your system at the > same time can lead to some "interesting" events. > > Is this bad planning, or something a user should know about and work > round? J2EE does get other uses. As far as I can tell (Tomcat, JBoss, WebLogic, WebSphere), all the J2EE players provide their own copy of the necessary pieces of the J2EE jar from Sun, along with their implementations of the interfaces and abstract classes, plus their own extensions. Due to the complexity of J2EE class loading, having the Sun (or any other) J2EE jar in the classpath results in mixed resolutions - some classes come from the desired location, others from the wrong (possibly incompatible) one. Leads to much head-scratching. So its primarily a classpath issue? I.e. its not a case of *don't use J2EE* and ensure your classpath order is right. I guess it is in the documentation... or is it? I'll check. regards DaveP -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
starting tomcat on boot messes classpath
Ok, please can someone help this is driving me mad First I have tomcat 5 working fine, play around trying to get it to work with db2 jdbc driver (in shared/lib) eventually get it working. setup tomcat as daemon using jsvc and tomcat starts but won't look in shared lib and can't find the driver class... decide to skip jsvc and try and start tomcat from rc.local with... su - db2inst1 -c "/usr/local/tomcat/bin/startup.sh" this won't work as it can't find the JAVA_HOME env (even tho it is set) my test jsp page still works if i start tomcat manually with startup.sh but i don't want to have to do that can anyone help either with jsvc or using rc.local... here is the rc.tomcat script created for jsvc #!/bin/sh ## # # Copyright 2004 The Apache Software Foundation. # # Licensed 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. ## # # Small shell script to show how to start/stop Tomcat using jsvc # If you want to have Tomcat running on port 80 please modify the server.xml # file: # # # # # That is for Tomcat-5.0.x (Apache Tomcat/5.0) # # Adapt the following lines to your configuration JAVA_HOME=/usr/lib/java CATALINA_HOME=/usr/local/tomcat DAEMON_HOME=/usr/local/tomcat/bin TOMCAT_USER=db2inst1 TMP_DIR=/var/tmp CATALINA_OPTS= CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar:\ $CATALINA_HOME case "$1" in start) # # Start Tomcat # $DAEMON_HOME/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$TMP_DIR \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '&1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ ;; stop) # # Stop Tomcat # PID=`cat /var/run/jsvc.pid` kill $PID ;; *) echo "Usage tomcat.sh start/stop" exit 1;; esac - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
Thanks for the help ... btw, the syntax - cl.getResourceAsStream("/Test.properties") - works with Tomcat 4 and above only, with Tomcat 3, it still returns null. - Original Message - From: "QM" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, June 28, 2004 5:31 PM Subject: Re: problem with classpath On Mon, Jun 28, 2004 at 01:44:47PM +0530, Ankit Doshi wrote: : I tried this, but the getResourceAsStream method always returns null. : InputStream istream = : cl.getResourceAsStream("/usr/local/tomcat/webapps/test/WEB-INF/classes/Test. : properties"); : istream = cl.getResourceAsStream("Test.properties"); If the file is in the classpath, you must call cl.getResourceAsStream( "/Test.properties" ) Review the JavaDoc for getResourceAsStream() -- there are differences between calling it with and without the preceding "/" on a filename. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
On Mon, Jun 28, 2004 at 01:44:47PM +0530, Ankit Doshi wrote: : I tried this, but the getResourceAsStream method always returns null. : InputStream istream = : cl.getResourceAsStream("/usr/local/tomcat/webapps/test/WEB-INF/classes/Test. : properties"); : istream = cl.getResourceAsStream("Test.properties"); If the file is in the classpath, you must call cl.getResourceAsStream( "/Test.properties" ) Review the JavaDoc for getResourceAsStream() -- there are differences between calling it with and without the preceding "/" on a filename. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
I tried this, but the getResourceAsStream method always returns null. In fact, this doesn't work even if I lookup the property file directly from the jsp page, rather than jsp page calling bean and bean looking up property file ... here is the jsp page I am using : <[EMAIL PROTECTED] language="java" import="java.util.*,java.io.*"%> <% ClassLoader cl = Thread.currentThread().getContextClassLoader(); InputStream istream = cl.getResourceAsStream("/usr/local/tomcat/webapps/test/WEB-INF/classes/Test. properties"); System.out.println("input stream from context class loader ... :" + istream ); istream = cl.getResourceAsStream("Test.properties"); System.out.println("input stream from context class loader ... :" + istream ); istream = cl.getResourceAsStream("Test"); System.out.println("input stream from context class loader ... :" + istream ); %> All of the above prints null - Original Message - From: "Jacob Kjome" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Sunday, June 27, 2004 9:58 PM Subject: Re: problem with classpath You can achieve this by using the thread context class loader.. Thread.currentThread().getContextClassLoader().getResourceAsStream("client1. properties"); Or, just pass the classloader to the classes that need to load the properties files and you will get the same effect. Jake At 11:44 AM 6/26/2004 +0530, you wrote: >I wanted some info on using single instance of tomcat for managing multiple >web applications. I am repeating my question below, please help me out with >the same ... > >I am running an application for multiple clients and the setup is like the >set of classes being used are common and the property files are different >for each client. The structure looks as below : >/usr/local/common_application_classes/ - this folder contains all classes >/usr/local/properties/client1/ - this folder contains properties of client1 >/usr/local/properties/client2/ - this folder contains properties of client2 >.. etc for all the different clients. > >Now, this is a web based application and the classes in the >/usr/local/common_application_classes/ are being used from the web >application (servlet, jsp files). The properties files are being used from >the classes contained in the /usr/local/common_application_classes/ folder. > >I want to setup a common tomcat (preferabbly tomcat3, or tomcat4) for all >these clients, but how should I setup the classpath? >/usr/local/common_application_classes/ should be in tomcat's classpath. But, >properties files are different for different classes, so thought of creating >single tomcat and under that, multiple contexts, one for each client and the >properties files goes in the respective client's context/WEB-INF/classes. >But, since the classes accessing the properties files are outside tomcat >(not in context/WEB-INF/classes), are not being able to access properties >files - gives MissingResourceException. > >Let say, I have a test.jsp file in context /test, which calls a >TestClass.class file and this TestClass.class file is looking up some >property file through ResourceBundle. The property file is in >/test/WEB-INF/classes/ directory. Now, if the TestClass.class is in >/test/WEB-INF/classes, then it works perfectly fine, but if the >TestClass.class is outside tomcat (included in tomcat's classpath), then it >gives MissingResourceException while looking up property file. > >Please give me some direction to prceed further > >- Original Message - >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, June 22, 2004 11:45 AM >Subject: Re: problem with classpath > > >i am sorry you got a wrong address here i don't know who you are and what >you are talking about > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
I tried this, but the getResourceAsStream method always returns null. In fact, this doesn't work even if I call <[EMAIL PROTECTED] language="java" import="java.util.*,java.io.*"%> <% ClassLoader cl = Thread.currentThread().getContextClassLoader(); InputStream istream = cl.getResourceAsStream("/usr/local/hthk_tomcat/webapps/test/WEB-INF/classes/ Test.properties"); System.out.println("input stream from context class loader ... :" + istream ); istream = cl.getResourceAsStream("Test.properties"); System.out.println("input stream from context class loader ... :" + istream ); istream = cl.getResourceAsStream("Test"); System.out.println("input stream from context class loader ... :" + istream ); %> - Original Message - From: "Jacob Kjome" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Sunday, June 27, 2004 9:58 PM Subject: Re: problem with classpath You can achieve this by using the thread context class loader.. Thread.currentThread().getContextClassLoader().getResourceAsStream("client1. properties"); Or, just pass the classloader to the classes that need to load the properties files and you will get the same effect. Jake At 11:44 AM 6/26/2004 +0530, you wrote: >I wanted some info on using single instance of tomcat for managing multiple >web applications. I am repeating my question below, please help me out with >the same ... > >I am running an application for multiple clients and the setup is like the >set of classes being used are common and the property files are different >for each client. The structure looks as below : >/usr/local/common_application_classes/ - this folder contains all classes >/usr/local/properties/client1/ - this folder contains properties of client1 >/usr/local/properties/client2/ - this folder contains properties of client2 >.. etc for all the different clients. > >Now, this is a web based application and the classes in the >/usr/local/common_application_classes/ are being used from the web >application (servlet, jsp files). The properties files are being used from >the classes contained in the /usr/local/common_application_classes/ folder. > >I want to setup a common tomcat (preferabbly tomcat3, or tomcat4) for all >these clients, but how should I setup the classpath? >/usr/local/common_application_classes/ should be in tomcat's classpath. But, >properties files are different for different classes, so thought of creating >single tomcat and under that, multiple contexts, one for each client and the >properties files goes in the respective client's context/WEB-INF/classes. >But, since the classes accessing the properties files are outside tomcat >(not in context/WEB-INF/classes), are not being able to access properties >files - gives MissingResourceException. > >Let say, I have a test.jsp file in context /test, which calls a >TestClass.class file and this TestClass.class file is looking up some >property file through ResourceBundle. The property file is in >/test/WEB-INF/classes/ directory. Now, if the TestClass.class is in >/test/WEB-INF/classes, then it works perfectly fine, but if the >TestClass.class is outside tomcat (included in tomcat's classpath), then it >gives MissingResourceException while looking up property file. > >Please give me some direction to prceed further > >- Original Message - >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, June 22, 2004 11:45 AM >Subject: Re: problem with classpath > > >i am sorry you got a wrong address here i don't know who you are and what >you are talking about > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
You can achieve this by using the thread context class loader.. Thread.currentThread().getContextClassLoader().getResourceAsStream("client1.properties"); Or, just pass the classloader to the classes that need to load the properties files and you will get the same effect. Jake At 11:44 AM 6/26/2004 +0530, you wrote: I wanted some info on using single instance of tomcat for managing multiple web applications. I am repeating my question below, please help me out with the same ... I am running an application for multiple clients and the setup is like the set of classes being used are common and the property files are different for each client. The structure looks as below : /usr/local/common_application_classes/ - this folder contains all classes /usr/local/properties/client1/ - this folder contains properties of client1 /usr/local/properties/client2/ - this folder contains properties of client2 .. etc for all the different clients. Now, this is a web based application and the classes in the /usr/local/common_application_classes/ are being used from the web application (servlet, jsp files). The properties files are being used from the classes contained in the /usr/local/common_application_classes/ folder. I want to setup a common tomcat (preferabbly tomcat3, or tomcat4) for all these clients, but how should I setup the classpath? /usr/local/common_application_classes/ should be in tomcat's classpath. But, properties files are different for different classes, so thought of creating single tomcat and under that, multiple contexts, one for each client and the properties files goes in the respective client's context/WEB-INF/classes. But, since the classes accessing the properties files are outside tomcat (not in context/WEB-INF/classes), are not being able to access properties files - gives MissingResourceException. Let say, I have a test.jsp file in context /test, which calls a TestClass.class file and this TestClass.class file is looking up some property file through ResourceBundle. The property file is in /test/WEB-INF/classes/ directory. Now, if the TestClass.class is in /test/WEB-INF/classes, then it works perfectly fine, but if the TestClass.class is outside tomcat (included in tomcat's classpath), then it gives MissingResourceException while looking up property file. Please give me some direction to prceed further - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 22, 2004 11:45 AM Subject: Re: problem with classpath i am sorry you got a wrong address here i don't know who you are and what you are talking about - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
I wanted some info on using single instance of tomcat for managing multiple web applications. I am repeating my question below, please help me out with the same ... I am running an application for multiple clients and the setup is like the set of classes being used are common and the property files are different for each client. The structure looks as below : /usr/local/common_application_classes/ - this folder contains all classes /usr/local/properties/client1/ - this folder contains properties of client1 /usr/local/properties/client2/ - this folder contains properties of client2 .. etc for all the different clients. Now, this is a web based application and the classes in the /usr/local/common_application_classes/ are being used from the web application (servlet, jsp files). The properties files are being used from the classes contained in the /usr/local/common_application_classes/ folder. I want to setup a common tomcat (preferabbly tomcat3, or tomcat4) for all these clients, but how should I setup the classpath? /usr/local/common_application_classes/ should be in tomcat's classpath. But, properties files are different for different classes, so thought of creating single tomcat and under that, multiple contexts, one for each client and the properties files goes in the respective client's context/WEB-INF/classes. But, since the classes accessing the properties files are outside tomcat (not in context/WEB-INF/classes), are not being able to access properties files - gives MissingResourceException. Let say, I have a test.jsp file in context /test, which calls a TestClass.class file and this TestClass.class file is looking up some property file through ResourceBundle. The property file is in /test/WEB-INF/classes/ directory. Now, if the TestClass.class is in /test/WEB-INF/classes, then it works perfectly fine, but if the TestClass.class is outside tomcat (included in tomcat's classpath), then it gives MissingResourceException while looking up property file. Please give me some direction to prceed further - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 22, 2004 11:45 AM Subject: Re: problem with classpath i am sorry you got a wrong address here i don't know who you are and what you are talking about - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
Guys, Can anybody help me on this? Basically, I want to run multiple web applications from within single tomcat instance. - Original Message - From: "Ankit Doshi" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, June 22, 2004 11:43 AM Subject: problem with classpath Hello, I am running an application for multiple clients and the setup is like the set of classes being used are common and the property files are different for each client. The structure looks as below : /usr/local/common_application_classes/ - this folder contains all classes /usr/local/properties/client1/ - this folder contains properties of client1 /usr/local/properties/client2/ - this folder contains properties of client2 .. etc for all the different clients. Now, this is a web based application and the classes in the /usr/local/common_application_classes/ are being used from the web application (servlet, jsp files). The properties files are being used from the classes contained in the /usr/local/common_application_classes/ folder. I want to setup a common tomcat (preferabbly tomcat3, or tomcat4) for all these clients, but how should I setup the classpath? /usr/local/common_application_classes/ should be in tomcat's classpath. But, properties files are different for different classes, so thought of creating single tomcat and under that, multiple contexts, one for each client and the properties files goes in the respective client's context/WEB-INF/classes. But, since the classes accessing the properties files are outside tomcat (not in context/WEB-INF/classes), are not being able to access properties files - gives MissingResourceException. Let say, I have a test.jsp file in context /test, which calls a TestClass.class file and this TestClass.class file is looking up some property file through ResourceBundle. The property file is in /test/WEB-INF/classes/ directory. Now, if the TestClass.class is in /test/WEB-INF/classes, then it works perfectly fine, but if the TestClass.class is outside tomcat (included in tomcat's classpath), then it gives MissingResourceException while looking up property file. Please tell me how can I proceed further. Ankit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with classpath
i am sorry you got a wrong address here i don't know who you are and what you are talking about
problem with classpath
Hello, I am running an application for multiple clients and the setup is like the set of classes being used are common and the property files are different for each client. The structure looks as below : /usr/local/common_application_classes/ - this folder contains all classes /usr/local/properties/client1/ - this folder contains properties of client1 /usr/local/properties/client2/ - this folder contains properties of client2 .. etc for all the different clients. Now, this is a web based application and the classes in the /usr/local/common_application_classes/ are being used from the web application (servlet, jsp files). The properties files are being used from the classes contained in the /usr/local/common_application_classes/ folder. I want to setup a common tomcat (preferabbly tomcat3, or tomcat4) for all these clients, but how should I setup the classpath? /usr/local/common_application_classes/ should be in tomcat's classpath. But, properties files are different for different classes, so thought of creating single tomcat and under that, multiple contexts, one for each client and the properties files goes in the respective client's context/WEB-INF/classes. But, since the classes accessing the properties files are outside tomcat (not in context/WEB-INF/classes), are not being able to access properties files - gives MissingResourceException. Let say, I have a test.jsp file in context /test, which calls a TestClass.class file and this TestClass.class file is looking up some property file through ResourceBundle. The property file is in /test/WEB-INF/classes/ directory. Now, if the TestClass.class is in /test/WEB-INF/classes, then it works perfectly fine, but if the TestClass.class is outside tomcat (included in tomcat's classpath), then it gives MissingResourceException while looking up property file. Please tell me how can I proceed further. Ankit
Classpath problems on Tomcat
>From what I understand about Tomcat all of my application specific classes and libs are picked up after the bootstrap and system libs are grabbed. However, we are running into this problem: We have a package defined and several classes within this package. When we compile the source files they compile without problem (we set the classpath to WEB-INF/classes to make sure everything is picked up). However, at run-time, we get a NoClassDefFoundError on some of the classes package (but not all). The directory structure I have is as follows: WEB-INF / classes / search / dbBean / la / lib / ... (others, but not important) It is in the search package we are having this issue. Is there any other settings Tomcat needs to be able to correctly set the classpath to include these packages? Thanks, Brent ** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classpath and directories.
Me again :-( OK, it's not the "default dir", I copied all the relevant files and *.dtd to c:\windows\system32 and it still didn't work. I added %CATALINA_HOME%\bin to the classpath and copied all the files and *.dtd to the bin folder. This works 100% when run via startup.bat, but *not* when run as a service. I have tried setting the service to log on as a specific user and then copied all the files to the users's deafult home dir, but no luck. Please help... For some reason 5.0.18 works fine with identical configuration. ** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. **
Re: startupw.exe & classpath
Run the command: tomcatw //ES//Tomcat5 (or right-click on the sys-tray icon), and add your directory to the "Image Path". "Justin McReynolds" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having classpath trouble when I start Tomcat 5.0.19 with the "Start Tomcat" shortcut that points to "C:\Tomcat50\bin\tomcatw.exe //GT//Tomcat5" I want to include a directory that is outside of the tomcat install dir, e.g. "c:\mydir", but I don't know how to add that directory to the classpath. I can edit setclasspath.bat to include that directory, and then start Tomcat with either "startup.bat" or "catalina.bat" and it works fine; is there an analogous file for tomcatw.exe? Thank you, Justin McReynolds Advanced Product Support Engineer - Stellent, Inc. - Office: (425) 896-7057 - Cell: (425) 985-2425 - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: startupw.exe & classpath
On Mon, May 03, 2004 at 10:46:50AM -0700, Justin McReynolds wrote: : I want to include a directory that is outside of the tomcat install dir, : e.g. "c:\mydir", but I don't know how to add that directory to the : classpath. : : I can edit setclasspath.bat to include that directory, and then start : Tomcat with either "startup.bat" or "catalina.bat" and it works fine; is : there an analogous file for tomcatw.exe? Is there any reason you're not putting these classes/jars in (standard) dirs: {tomcat install}/common/lib {tomcat install}/common/classes {webapp context}/WEB-INF/lib {webapp context}/WEB-INF/classes ? Those are the Tomcat standards. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
startupw.exe & classpath
I'm having classpath trouble when I start Tomcat 5.0.19 with the "Start Tomcat" shortcut that points to "C:\Tomcat50\bin\tomcatw.exe //GT//Tomcat5" I want to include a directory that is outside of the tomcat install dir, e.g. "c:\mydir", but I don't know how to add that directory to the classpath. I can edit setclasspath.bat to include that directory, and then start Tomcat with either "startup.bat" or "catalina.bat" and it works fine; is there an analogous file for tomcatw.exe? Thank you, Justin McReynolds Advanced Product Support Engineer - Stellent, Inc. - Office: (425) 896-7057 - Cell: (425) 985-2425 - [EMAIL PROTECTED]
RE: Setting classpath out of the webapp directory
Hi, I think I'm not concerned by your message. Thanks in advanced to delete my adress from your list of users. -Message d'origine- De : Shapira, Yoav [mailto:[EMAIL PROTECTED] Envoye : lundi 3 mai 2004 15:17 A : Tomcat Users List Objet : RE: Setting classpath out of the webapp directory Hi, >OK, you are right, but I think, is really better to have the same code in >one file -- i think is;t better than have one code in a lot of files, don't >you? :) I completely agree, but the above is unrelated to your previous question. The same code should only be in one file, of course. Then you're only developing one place. Each time you make a new version of this shared library, you deploy it to all the applications that use it. This is elementary development process engineering. Don't waste your time hacking around strange classpath configurations, you'll get only headaches in the long run. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting classpath out of the webapp directory
Hi, >OK, you are right, but I think, is really better to have the same code in >one file -- i think is;t better than have one code in a lot of files, don't >you? :) I completely agree, but the above is unrelated to your previous question. The same code should only be in one file, of course. Then you're only developing one place. Each time you make a new version of this shared library, you deploy it to all the applications that use it. This is elementary development process engineering. Don't waste your time hacking around strange classpath configurations, you'll get only headaches in the long run. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
Shapira, Yoav wrote: > Hi, > >> Beacuase when you are developing both webapps at the same time, > duplicates >> leads into some data inconsistences, doesn't it? > > Not if your development and deployment process is well-controlled. > > Yoav Shapira > > OK, you are right, but I think, is really better to have the same code in one file -- i think is;t better than have one code in a lot of files, don't you? :) > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, > proprietary and/or privileged. This e-mail is intended only for the > individual(s) to whom it is addressed, and may not be saved, copied, > printed, disclosed or used by anyone else. If you are not the(an) > intended recipient, please immediately delete this e-mail from your > computer system and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting classpath out of the webapp directory
Hi, >Beacuase when you are developing both webapps at the same time, duplicates >leads into some data inconsistences, doesn't it? Not if your development and deployment process is well-controlled. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
Shapira, Yoav wrote: > Hi, > >> I want to have only one file of >> this class -- I don't want to copy classes between the webapps. > > Why? > > Yoav Shapira > Beacuase when you are developing both webapps at the same time, duplicates leads into some data inconsistences, doesn't it? Honza S. > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, > proprietary and/or privileged. This e-mail is intended only for the > individual(s) to whom it is addressed, and may not be saved, copied, > printed, disclosed or used by anyone else. If you are not the(an) > intended recipient, please immediately delete this e-mail from your > computer system and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting classpath out of the webapp directory
Hi, >I want to have only one file of >this class -- I don't want to copy classes between the webapps. Why? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
I've done: - in the common directory I've created "src" directory - into the src dir I've copied all shared java-sourced classes - i've compiled them into the common/classes directory - i've copied some shared libaries into the common/lib - i've removed whole directory webapps/MyApp/WEB-INF/classes/ (classes direcotry is still presented, but it is almost empty -- except the messageResources files -- these were leaved in the original space) - i've restarted tomcat Now no error occures. But after I want to connect to the webapp, that has some classes in the common/classes directory, the blank page in the browser occures and on the tomcat-terminal is written: java.lang.ClassCastException. This means, as I know, that tomcat can find this classes in the common/classes directory. :( Does anybody know, what I should set in the tomcat variables to let tomcat could search the common/classes directory for classes? Thanks a lot for help Honza S. Eric Noel wrote: > On 5/3/2004 4:26 PM, Honza Spurný wrote: > >> Hi there, >> >> I'have been trying to set the classpath of the webapp out of the >> directory of this webapp. This is for me little important, since >> some classes I'd like to use (I have to use) in other webapps. I >> want to have only one file of this class -- I don't want to copy >> classes between the webapps. >> >> I'm sure it is possible to do it, as I need it, but I don't know >> how. Would be anybody so kind and help me with this? >> >> I would also like to "export" the lib directory of webapp out of the >> webapp directory so that the shared libaries could be presented as >> file only once. This is probably the same problem as above. >> >> Could anybody help me? Thanks a lot. >> >> Best Regards. >> Honza Spurny >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > $CATALINA_HOME/common/lib - jars > $CATALINA_HOME/common/classes - classes > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
Place your classes in common/lib or shared/lib But you need to be careful. The common/lib and shared/lib classloaders cannot see the WEB-INF classloader - which means that you can easily get the no class found errors. Multiple copies of JAR files in each classloader is OK. You can do that via symlinks or better - make the copy of the libraries (or classes) as part of you ant build script. If its part of your ant build script - there is not extra work to do. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html -Tim Honza Spurný wrote: Hi there, I'have been trying to set the classpath of the webapp out of the directory of this webapp. This is for me little important, since some classes I'd like to use (I have to use) in other webapps. I want to have only one file of this class -- I don't want to copy classes between the webapps. I'm sure it is possible to do it, as I need it, but I don't know how. Would be anybody so kind and help me with this? I would also like to "export" the lib directory of webapp out of the webapp directory so that the shared libaries could be presented as file only once. This is probably the same problem as above. Could anybody help me? Thanks a lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
Eric Noel wrote: > On 5/3/2004 4:26 PM, Honza Spurný wrote: > >> Hi there, >> >> I'have been trying to set the classpath of the webapp out of the >> directory of this webapp. This is for me little important, since >> some classes I'd like to use (I have to use) in other webapps. I >> want to have only one file of this class -- I don't want to copy >> classes between the webapps. >> >> I'm sure it is possible to do it, as I need it, but I don't know >> how. Would be anybody so kind and help me with this? >> >> I would also like to "export" the lib directory of webapp out of the >> webapp directory so that the shared libaries could be presented as >> file only once. This is probably the same problem as above. >> >> Could anybody help me? Thanks a lot. >> >> Best Regards. >> Honza Spurny >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > $CATALINA_HOME/common/lib - jars > $CATALINA_HOME/common/classes - classes > After I did so, tomcat stops to work at all. Should I set some settings in tomcat or what is wrong, does anybody know about it. The error that occures is "java.lnag.NoSuchMethodException: org.apache.catalina.startup.Catalina.setAwait(boolean). Only things I did are: - in the common directory I've created "src" directory - into the src dir I've copied all shared java-sourced classes - i've compiled them into the common/classes directory - i've copied some shared libaries into the common/lib - i've removed whole directory webapps/MyApp/WEB-INF/classes/ (classes direcotry is still presented, but it is almost empty -- except the messageResources files -- these were leaved in the original space) - i've restarted tomcat - errors occures Please can anybody help. Thanks a lot Best Regards Honza S. > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
it's easy :) put your classes or jars to be *shared by your webapps* into the directory ---%TOMCAT_HOME%\shared\classes or %TOMCAT_HOME%\shared\lib Regards, Potomac - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting classpath out of the webapp directory
I know with Tomcat if you have shared classes, you can put them in the shared lib dir under tomcat. Your application classes >> %catalina_home%/webapps/root/WEB-INF/lib Shared classes >> %catalina_home%/lib -Original Message- From: Honza Spurn [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 10:26 To: Tomcat Maillisting Subject: Setting classpath out of the webapp directory Hi there, I'have been trying to set the classpath of the webapp out of the directory of this webapp. This is for me little important, since some classes I'd like to use (I have to use) in other webapps. I want to have only one file of this class -- I don't want to copy classes between the webapps. I'm sure it is possible to do it, as I need it, but I don't know how. Would be anybody so kind and help me with this? I would also like to "export" the lib directory of webapp out of the webapp directory so that the shared libaries could be presented as file only once. This is probably the same problem as above. Could anybody help me? Thanks a lot. Best Regards. Honza Spurny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting classpath out of the webapp directory
On 5/3/2004 4:26 PM, Honza Spurný wrote: Hi there, I'have been trying to set the classpath of the webapp out of the directory of this webapp. This is for me little important, since some classes I'd like to use (I have to use) in other webapps. I want to have only one file of this class -- I don't want to copy classes between the webapps. I'm sure it is possible to do it, as I need it, but I don't know how. Would be anybody so kind and help me with this? I would also like to "export" the lib directory of webapp out of the webapp directory so that the shared libaries could be presented as file only once. This is probably the same problem as above. Could anybody help me? Thanks a lot. Best Regards. Honza Spurny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] $CATALINA_HOME/common/lib - jars $CATALINA_HOME/common/classes - classes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting classpath out of the webapp directory
Hi there, I'have been trying to set the classpath of the webapp out of the directory of this webapp. This is for me little important, since some classes I'd like to use (I have to use) in other webapps. I want to have only one file of this class -- I don't want to copy classes between the webapps. I'm sure it is possible to do it, as I need it, but I don't know how. Would be anybody so kind and help me with this? I would also like to "export" the lib directory of webapp out of the webapp directory so that the shared libaries could be presented as file only once. This is probably the same problem as above. Could anybody help me? Thanks a lot. Best Regards. Honza Spurny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting classpath when running as service on win2k
Hi Vincent, Normally it is specified in the command line when you install the service. You can check a registry key -- HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Apache-Catalina/Parameters (assuming your service is named Apache-Catalina). Under this key you should have a JVM Option Number X, which specifies the -Djava.class.path setting. Hope this helps, Mark Vincent Lévin wrote: hello ! where do we specify the classpath when when we launch tomcat 5 as service ? we tried to put the classpath in 'catalina.bat', in the tomcat configuration program ("configure tomcat") but it seems that all this has no effect :/ and, an other problem: isn't it possible to update jars and classes in shared\lib or common\lib whithout reloading tomcat ? thanks ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
setting classpath when running as service on win2k
hello ! where do we specify the classpath when when we launch tomcat 5 as service ? we tried to put the classpath in 'catalina.bat', in the tomcat configuration program ("configure tomcat") but it seems that all this has no effect :/ and, an other problem: isn't it possible to update jars and classes in shared\lib or common\lib whithout reloading tomcat ? thanks ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problems with tomcat on Linux 9
Figured out my problem. I wasn't placing the class file in a subdirectory of the WEB-INF/classes/. Solution: created UserData.java with package name "userdata" created directory WEB-INF/classes/userdata placed UserData.class in WEB-INF/classes/userdata Thank you all who responded, and anyone else that read this and spent more then the time to click the delete button on it. -Andy. On Monday 19 April 2004 12:27 pm, Stephen Bacon wrote: > Hi Andy, > >I'm porting over to TC5 and I've not had any problems with it finding > my classes, *BUT* I don't put any classes into the base directory > itself, but below that. > > So for example, my UserBean class is in > /WEB-INF/classes/AccessCtrl and it is part of the package > "AccessCtrl" (i.e. first line of bean is "package AccessCtrl;") > > The pages that use this include the directive: > <%@ page import="AccessCtrl.*" %> > so that it can find them. > > Additionally, to avoid problems, I generally include the packagename > anyways in my useBean tags: >class="AccessCtrl.UserBean" > scope="session" /> > Which shouldn't be necessary, but I find it increases readability anyways. > > -Steve > > Andy Wadsworth wrote: > > Should I expect Tomcat to find my UserData.class file if I put it > > in webapps//WEB-INF/classes? Do I need to create a web.xml > > or should it find the class file without any web.xml customization? > > If anyone has a very simple example that I could drop in to see if > > it works, I'd appreciate it. I've already verified that the jsp-examples > > all work, but there is a lot of stuff in the web.xml that I shouldn't > > need for what I want to do, and finding what I need is probably where > > my problems lie. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### Historical High School Essay Bloopers: They (Greeks) also had myths. A myth is a female moth. One myth says that the mother of Achilles dipped him in the River Stynx until he became intollerable. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath problems with tomcat on Linux 9
Hi, You need the <%@ page import="package" %> directive to tell it where to look for it. Yang -Original Message- From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Sent: Monday, April 19, 2004 3:11 PM To: Tomcat Users List Subject: Re: Classpath problems with tomcat on Linux 9 Still no luck. I'm basically trying to do exactly the same thing that the "jsp-examples/checkbox" is doing and I can't get Tomcat to recognize my UserData.class file. I've tried placing my UserData.class file in every location possible, and no luck. My next step will be to downgrade to Tomcat 4 so I can at least try out the examples that are described in the Tomcat Bible (the examples don't work with Tomcat 5). Should I expect Tomcat to find my UserData.class file if I put it in webapps//WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. -Andy. On Friday 16 April 2004 07:32 pm, Berry, Layton wrote: > I'm guessing you need to put the UserData class in a package, > and import it into your savename page. > > Quoting from JSP 2.0 spec, "As of JSP 2.0, it is illegal > to refer to any classes from the unnamed (a.k.a. default) package." > > -Layton > > >-Original Message- > > From: Andy Wadsworth [mailto:[EMAIL PROTECTED] > > >Sent: Friday, April 16, 2004 2:26 PM > >To: [EMAIL PROTECTED] > >Subject: Classpath problems with tomcat on Linux 9 > > > > > > > >I'm just getting started with my JSP and tomcat experience, and while > >learning how JSP works, I'm can't get tomcat to recognize supporting > >class definitions that I have placed in /WEB-INF/classes. > > > >Here's my setup: > >* tomcat 5.0.19, running on RedHat Linux 9.0 Pro > >* no customization to $CATALINA_HOME/conf/web.xml > > no customization to $CATALINA_HOME/conf/server.xml > > added my user account as a manager in > >$CATALINA_HOME/conf/tomcat-users.xml > >* I'm running tomcat using the $CATALINA_HOME/bin/startup.sh > >* I'm running tomcat as my normal login id, although I've also > >tried it as > > root just to make sure it wasn't a file permissions issue. > >* I'm able to use the Tomcat manager at > >http://localhost:8080/manager to > > start/stop/reload/deploy applications > >* The jsp-examples appear to work fine > > > >Here's what I'm trying to do: > >* Created the following "index.jsp" and placed it in > > $CATALINA_HOME/webapps/test > > > > > > > >What's your name? > >What's your email? > > > > > > > >* Created the following as $CATALINA_HOME/webapps/test/savename.jsp > > > > > > > >Name: <%= user.getUsername() %> > >Email: <%= user.getEmail() %> > > > > > >* Created a UserData.java file that defines a public class UserData > > with username and email fields as type String. Added public > > access methods for setUsername, getUsername, setEmail, getEmail. > > I compiled UserData.java using javac, and to produce UserData.class > > which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The > > UserData.java class does not define a package nor does it import > > anything (line 1 is "public class UserData") > > > >* deployed the "test" application using the tomcat manager and it shows > > that the application is deployed with no errors. > > > >* Using IE 6.0, I enter the url to test.jsp and it displays the form as > > expected. I enter a name and email value into the form and press the > > submit button and I get the following: > > HTTP Status 500 - > > exception > > org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occurred at line: 1 in jsp file: /savename.jsp > > > > Generated sevlet error: > >[javac] Compiling 1 source file > > > ><...>/work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 > > symbol : class UserData > >location: class org.apache.jsp.savename_jsp > >UserDAta user = null > > > > > >I suspect this is a classpath issue but everyt
Re: Classpath problems with tomcat on Linux 9
Hi Andy, I'm porting over to TC5 and I've not had any problems with it finding my classes, *BUT* I don't put any classes into the base directory itself, but below that. So for example, my UserBean class is in /WEB-INF/classes/AccessCtrl and it is part of the package "AccessCtrl" (i.e. first line of bean is "package AccessCtrl;") The pages that use this include the directive: <%@ page import="AccessCtrl.*" %> so that it can find them. Additionally, to avoid problems, I generally include the packagename anyways in my useBean tags: class="AccessCtrl.UserBean" scope="session" /> Which shouldn't be necessary, but I find it increases readability anyways. -Steve Andy Wadsworth wrote: Should I expect Tomcat to find my UserData.class file if I put it in webapps//WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problems with tomcat on Linux 9
Still no luck. I'm basically trying to do exactly the same thing that the "jsp-examples/checkbox" is doing and I can't get Tomcat to recognize my UserData.class file. I've tried placing my UserData.class file in every location possible, and no luck. My next step will be to downgrade to Tomcat 4 so I can at least try out the examples that are described in the Tomcat Bible (the examples don't work with Tomcat 5). Should I expect Tomcat to find my UserData.class file if I put it in webapps//WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. -Andy. On Friday 16 April 2004 07:32 pm, Berry, Layton wrote: > I'm guessing you need to put the UserData class in a package, > and import it into your savename page. > > Quoting from JSP 2.0 spec, "As of JSP 2.0, it is illegal > to refer to any classes from the unnamed (a.k.a. default) package." > > -Layton > > >-Original Message- > > From: Andy Wadsworth [mailto:[EMAIL PROTECTED] > > >Sent: Friday, April 16, 2004 2:26 PM > >To: [EMAIL PROTECTED] > >Subject: Classpath problems with tomcat on Linux 9 > > > > > > > >I'm just getting started with my JSP and tomcat experience, and while > >learning how JSP works, I'm can't get tomcat to recognize supporting > >class definitions that I have placed in /WEB-INF/classes. > > > >Here's my setup: > >* tomcat 5.0.19, running on RedHat Linux 9.0 Pro > >* no customization to $CATALINA_HOME/conf/web.xml > > no customization to $CATALINA_HOME/conf/server.xml > > added my user account as a manager in > >$CATALINA_HOME/conf/tomcat-users.xml > >* I'm running tomcat using the $CATALINA_HOME/bin/startup.sh > >* I'm running tomcat as my normal login id, although I've also > >tried it as > > root just to make sure it wasn't a file permissions issue. > >* I'm able to use the Tomcat manager at > >http://localhost:8080/manager to > > start/stop/reload/deploy applications > >* The jsp-examples appear to work fine > > > >Here's what I'm trying to do: > >* Created the following "index.jsp" and placed it in > > $CATALINA_HOME/webapps/test > > > > > > > >What's your name? > >What's your email? > > > > > > > >* Created the following as $CATALINA_HOME/webapps/test/savename.jsp > > > > > > > >Name: <%= user.getUsername() %> > >Email: <%= user.getEmail() %> > > > > > >* Created a UserData.java file that defines a public class UserData > > with username and email fields as type String. Added public > > access methods for setUsername, getUsername, setEmail, getEmail. > > I compiled UserData.java using javac, and to produce UserData.class > > which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The > > UserData.java class does not define a package nor does it import > > anything (line 1 is "public class UserData") > > > >* deployed the "test" application using the tomcat manager and it shows > > that the application is deployed with no errors. > > > >* Using IE 6.0, I enter the url to test.jsp and it displays the form as > > expected. I enter a name and email value into the form and press the > > submit button and I get the following: > > HTTP Status 500 - > > exception > > org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occurred at line: 1 in jsp file: /savename.jsp > > > > Generated sevlet error: > >[javac] Compiling 1 source file > > > ><...>/work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 > > symbol : class UserData > >location: class org.apache.jsp.savename_jsp > >UserDAta user = null > > > > > >I suspect this is a classpath issue but everything I read says > >that if you > >put your classes in /WEB-INF/classes, it will just work. > > > >There must be some basic thing I'm missing. Any help would be very much > >apprciated. > > > >Thanks in advance. > >-Andy. > > > >-- > >###
RE: Classpath problems with tomcat on Linux 9
I'm guessing you need to put the UserData class in a package, and import it into your savename page. Quoting from JSP 2.0 spec, "As of JSP 2.0, it is illegal to refer to any classes from the unnamed (a.k.a. default) package." -Layton >-Original Message- >From: Andy Wadsworth [mailto:[EMAIL PROTECTED] >Sent: Friday, April 16, 2004 2:26 PM >To: [EMAIL PROTECTED] >Subject: Classpath problems with tomcat on Linux 9 > > > >I'm just getting started with my JSP and tomcat experience, and while >learning how JSP works, I'm can't get tomcat to recognize supporting >class definitions that I have placed in /WEB-INF/classes. > >Here's my setup: >* tomcat 5.0.19, running on RedHat Linux 9.0 Pro >* no customization to $CATALINA_HOME/conf/web.xml > no customization to $CATALINA_HOME/conf/server.xml > added my user account as a manager in >$CATALINA_HOME/conf/tomcat-users.xml >* I'm running tomcat using the $CATALINA_HOME/bin/startup.sh >* I'm running tomcat as my normal login id, although I've also >tried it as > root just to make sure it wasn't a file permissions issue. >* I'm able to use the Tomcat manager at >http://localhost:8080/manager to > start/stop/reload/deploy applications >* The jsp-examples appear to work fine > >Here's what I'm trying to do: >* Created the following "index.jsp" and placed it in > $CATALINA_HOME/webapps/test > > > >What's your name? >What's your email? > > > >* Created the following as $CATALINA_HOME/webapps/test/savename.jsp > > > >Name: <%= user.getUsername() %> >Email: <%= user.getEmail() %> > > >* Created a UserData.java file that defines a public class UserData > with username and email fields as type String. Added public > access methods for setUsername, getUsername, setEmail, getEmail. > I compiled UserData.java using javac, and to produce UserData.class > which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The > UserData.java class does not define a package nor does it import > anything (line 1 is "public class UserData") > >* deployed the "test" application using the tomcat manager and it shows > that the application is deployed with no errors. > >* Using IE 6.0, I enter the url to test.jsp and it displays the form as > expected. I enter a name and email value into the form and press the > submit button and I get the following: > HTTP Status 500 - > exception > org.apache.jasper.JasperException: Unable to compile class for JSP > An error occurred at line: 1 in jsp file: /savename.jsp > > Generated sevlet error: >[javac] Compiling 1 source file > ><...>/work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 > symbol : class UserData >location: class org.apache.jsp.savename_jsp >UserDAta user = null > > >I suspect this is a classpath issue but everything I read says >that if you >put your classes in /WEB-INF/classes, it will just work. > >There must be some basic thing I'm missing. Any help would be very much >apprciated. > >Thanks in advance. >-Andy. > >-- >### ># Andy Wadsworth # ># # ># BondMart Technologies, Inc. # ># [EMAIL PROTECTED] # ># # >### > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >
Re: Classpath problems with tomcat on Linux 9
Ah, if it was only that simple... The capital "A" is a typo in the email message, not in the actual error. I'm using IE on a WinXP box as my browser, but I sent my email from my Linux machine and I can't copy/paste between the two. -Andy. On Friday 16 April 2004 03:32 pm, Caldarale, Charles R wrote: > > From: Andy Wadsworth [mailto:[EMAIL PROTECTED] > > Subject: Classpath problems with tomcat on Linux 9 > > > > <...>/work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 > > symbol : class UserData > > location: class org.apache.jsp.savename_jsp > > UserDAta user = null > >^ > > > Seems awfully suspicious to have a capital A in the middle of the class > name... > > Are you sure the .jsp doesn't have a typo in it? > > - Chuck > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### How To Make Love Endure... Don't forget your wife's name ... That will mess up the love. Erin, age 8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath problems with tomcat on Linux 9
> From: Andy Wadsworth [mailto:[EMAIL PROTECTED] > Subject: Classpath problems with tomcat on Linux 9 > > <...>/work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 > symbol : class UserData > location: class org.apache.jsp.savename_jsp > UserDAta user = null ^ | Seems awfully suspicious to have a capital A in the middle of the class name... Are you sure the .jsp doesn't have a typo in it? - Chuck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classpath problems with tomcat on Linux 9
I'm just getting started with my JSP and tomcat experience, and while learning how JSP works, I'm can't get tomcat to recognize supporting class definitions that I have placed in /WEB-INF/classes. Here's my setup: * tomcat 5.0.19, running on RedHat Linux 9.0 Pro * no customization to $CATALINA_HOME/conf/web.xml no customization to $CATALINA_HOME/conf/server.xml added my user account as a manager in $CATALINA_HOME/conf/tomcat-users.xml * I'm running tomcat using the $CATALINA_HOME/bin/startup.sh * I'm running tomcat as my normal login id, although I've also tried it as root just to make sure it wasn't a file permissions issue. * I'm able to use the Tomcat manager at http://localhost:8080/manager to start/stop/reload/deploy applications * The jsp-examples appear to work fine Here's what I'm trying to do: * Created the following "index.jsp" and placed it in $CATALINA_HOME/webapps/test What's your name? What's your email? * Created the following as $CATALINA_HOME/webapps/test/savename.jsp Name: <%= user.getUsername() %> Email: <%= user.getEmail() %> * Created a UserData.java file that defines a public class UserData with username and email fields as type String. Added public access methods for setUsername, getUsername, setEmail, getEmail. I compiled UserData.java using javac, and to produce UserData.class which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The UserData.java class does not define a package nor does it import anything (line 1 is "public class UserData") * deployed the "test" application using the tomcat manager and it shows that the application is deployed with no errors. * Using IE 6.0, I enter the url to test.jsp and it displays the form as expected. I enter a name and email value into the form and press the submit button and I get the following: HTTP Status 500 - exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in jsp file: /savename.jsp Generated sevlet error: [javac] Compiling 1 source file <...>/work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 symbol : class UserData location: class org.apache.jsp.savename_jsp UserDAta user = null I suspect this is a classpath issue but everything I read says that if you put your classes in /WEB-INF/classes, it will just work. There must be some basic thing I'm missing. Any help would be very much apprciated. Thanks in advance. -Andy. -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tools.jar & classpath
hi everyone, dumb question time. here's winXP and tomcat 5.0.19. after setting up Tomcat as a service it didn't find the tools.jar and couldn't compile my .jsp's. the error page told me to copy tools.jar over from JAVA_HOME/lib/ to TOMCAT_HOME/common/lib and that works. but i don't like it. isn't there a way of telling tomcat or at least this one context the classpath for tools.jar e.g. via web.xml ? thanks, Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with starting up Tomcat 5.0.1.9 using launcher - a classpath issue?
hello Friend, Which JDK Version do you have? Have you tried on jdk1.3.x version. Because I can not compile jsp pages on tomcat 5.0 as well as tomcat 4.1.0 build 7 in jdk1.4.2 environment but both perfectly runs in jdk1.3 environment. I don't know the reason. ./Nikhil Yair Fine wrote: Did you mean tools.jar ? It is already in common\lib I also have my CATALINA_HOME environement variable set (C:\Program Files\Apache Software Foundation\Tomcat 5.0) It still don't work Yair -Original Message- From: FRANCOIS Dufour [mailto:[EMAIL PROTECTED] Sent: ש 03 אפריל 2004 15:48 To: [EMAIL PROTECTED] Subject: RE: Problem with starting up Tomcat 5.0.1.9 using launcher - a classpath issue? i ad the same ive red somwere to copy tool .jar to a folder in tomcat i tink its comun/lib not shure try to ad catalina_home environement variable pointing to your tomcat instalation folder [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: "Yair Fine" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Problem with starting up Tomcat 5.0.1.9 using launcher - a classpath issue? Date: Sat, 3 Apr 2004 14:52:43 +0200 Hi, I installed Tomcat 5.0.1.9 on Windows 2000. When I run Start menu-> programs -> Apache Tomcat 5.0 -> Start Tomcat , nothing happens, and no tomcat icon appears. When i go to bin directory and run startup-using-launcher.bat , I get an exception : java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at org.apache.commons.launcher.Launcher.start(Launcher.java:385) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja v a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso r Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at LauncherBootstrap.main(LauncherBootstrap.java:185) Indeed, if i look at ant.jar ion common\lib, there is no org/apache/tools/ant/launch/AntMain class Though is if run startup.bat, the server starts and work I have my JAVA_HOME variable path going to the right place Enyone have a clue ? Regards Yair Fine _ MSN Search, le moteur de recherche qui pense comme vous ! http://fr.ca.search.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with starting up Tomcat 5.0.1.9 using launcher - a classpath issue?
I did both : tomcatw //GT//Tomcat5 And tomcatw //ES//Tomcat5 And there was no response .Any other suggestions? -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Sent: ש 03 אפריל 2004 23:03 To: [EMAIL PROTECTED] Subject: Re: Problem with starting up Tomcat 5.0.1.9 using launcher - a classpath issue? The 'startup-using-launcher.bat' is pretty much unmaintained at the moment (and has nothing to do with the "Start Menu" shortcut :). To reproduce what the shortcut should be doing, cd to the Tomcat bin directory and run: tomcatw //GT//Tomcat5 To review your startup settings run: tomcatw //ES//Tomcat5 "Yair Fine" <[EMAIL PROTECTED]> wrote > Hi, > I installed Tomcat 5.0.1.9 on Windows 2000. > > When I run Start menu-> programs -> Apache Tomcat 5.0 -> Start Tomcat > , nothing happens, and no tomcat icon appears. > > When i go to bin directory and run startup-using-launcher.bat , I get > an exception : > java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain > at java.lang.ClassLoader.defineClass0(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:537) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) > at java.net.URLClassLoader.access$100(URLClassLoader.java:55) > at java.net.URLClassLoader$1.run(URLClassLoader.java:194) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:187) > at java.lang.ClassLoader.loadClass(ClassLoader.java:289) > at java.lang.ClassLoader.loadClass(ClassLoader.java:235) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) > at org.apache.commons.launcher.Launcher.start(Launcher.java:385) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > av > a:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > Impl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at LauncherBootstrap.main(LauncherBootstrap.java:185) > > Indeed, if i look at ant.jar ion common\lib, there is no > org/apache/tools/ant/launch/AntMain class Though is if run > startup.bat, the server starts and work I have my JAVA_HOME variable > path going to the right place > > Enyone have a clue ? > Regards > Yair Fine > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]