You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Demma <md...@planetoutinc.com> on 2006/02/09 04:06:12 UTC

Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Hello folks

I am currently trying to convert from Resin Pro 3.0.17 to Tomcat  
5.5.  We have several Solaris 9 machines and we generally place  
applications in a NFS mounted "/usr/dist/" directory, which is RO for  
the web application servers.  I have a local link, /usr/resin -> /usr/ 
dist/pkgs/resin
which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17 so  
that I can easily install a new version of resin by changing that  
link.  I have my RESIN_HOME=/usr/resin, which is the NFS mount and my  
SERVER_ROOT=/usr/local/resin, which is a local directory.  In my  
resin.conf, I use
<web-app-deploy path="/w/${mode}/warfiles" expand-path="/usr/local/ 
resin/webapps"/>
to have Resin look on another NFS mounted directory "/w" for its  
warfiles, which it expands in the locally mounted /usr/local/resin.

This setup allows me to have my resin config files, binaries, shared  
libraries, etc, on a central NFS server, my warfiles on another NFS  
server and the only thing I need to have local is the webapps dir  
where it explodes the war files, and cache and session.  I am thus  
able to turn a machine into a "resin server" by copying over one rc  
file, which when invoked creates the /usr/local/resin dir and pulls  
everything else it needs off of NFS.

I've been scouring the web for days trying to figure out how to make  
Tomcat do the same thing, but can't for the life of me figure out  
how... the two main problems I run into is the inability to separate  
the web app deploy path, i.e. where it LOOKS for the warfiles and the  
expand path, where it expands them.  The other problem is wanting to  
put the conf/ files in a different location from the webapp/ files.   
$CATALINA_BASE seems to be the extent to which you can separate  
things, and it wants to put conf, logs, shared, webapps. work. temp  
together...

So.... my question is how in Tomcat do I put the bin/ common/ conf/  
server/ and shared/ directories in one location (NFS mounted RO) the  
temp/ webapps/ and work / locally ;  logs/ (all of them, including  
catalina.out) in a sepate location NOT in $CATALINA_BASE or HOME; AND  
put the location Tomcat looks for new .war files in another NFS  
mounted location.

I know I could do it all with sym-links, but god that would be  
messy.  Any suggestions?

Mark Demma
Senior UNIX Systems Admin
PlanetOut Inc.

Re: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by Mark Demma <md...@planetoutinc.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I have it, well, at least part of it... using the argument - 
config $CATALINA_HOME/conf/server.xml  allows it to start up, but  
then if the CATALINA_BASE doesn't have a conf/ directory, it doesn't  
work.  I copied the conf directory from the $CATALINA_HOME directory  
and got it to start up.

I can't for the life of me find anywhere that you can tell tomcat  
that it should look for it's whole #$@$%@ conf/ directory in  
$CATALINA_HOME NOT $CATALINA_BASE .... cause wouldn't it be  
convenient to have ONE conf/ directory mounted for multiple servers  
on one NFS mount.  Yes, NFS is satan, etc etc... but it's what I've  
got to work with.

Mark Demma
Senior UNIX Systems Admin
PlanetOut Inc.


On 9 Feb 2006, at 21:02, Parsons Technical Services wrote:

> Just wanted to make sure you didn't have 1.4 .
>
> Going out on a limb here, do you have allowlinking =true attribute  
> set in you context? It might be worth a try as some of your paths  
> may appear as links to Tomcat even if they are mounted volumes.
>
> Doug
>
>
> ----- Original Message ----- From: "Mark Demma"  
> <md...@planetoutinc.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Cc: "Parsons Technical Services" <pa...@earthlink.net>
> Sent: Thursday, February 09, 2006 11:02 PM
> Subject: Re: Using Tomcat over NFS over multiple hosts, want to  
> separate locations of directories
>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> java version "1.5.0_06"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
>> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
>>
>> Mark Demma
>> Senior UNIX Systems Admin
>> PlanetOut Inc.
>>
>> On 9 Feb 2006, at 19:49, Parsons Technical Services wrote:
>>
>>> What version of java are you running?
>>>
>>>
>>> ----- Original Message ----- From: "Mark Demma"  
>>> <md...@planetoutinc.com>
>>> To: "Tomcat Users List" <us...@tomcat.apache.org>
>>> Sent: Thursday, February 09, 2006 10:38 PM
>>> Subject: Re: Using Tomcat over NFS over multiple hosts, want to   
>>> separate locations of directories
>>>
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Well, I got tomcat running via NFS with these variables  
>>>> starting  up: (where /usr/dist/pkgs/... is a NFS mounted RO  
>>>> directory)
>>>>
>>>> JAVA_HOME=/usr/dist/pkgs/java
>>>> CATALINA_BASE=/usr/local/tomcat
>>>> CATALINA_HOME=/usr/dist/pkgs/tomcat
>>>> LOG_HOME=/usr/local/logs/$instance.hive/
>>>> ARGS="-config $CATALINA_HOME/conf/server.xml"
>>>> TOMCAT_START="$CATALINA_HOME/bin/startup.sh $ARGS"
>>>> TOMCAT_STOP="$CATALINA_HOME/bin/shutdown.sh $ARGS"
>>>>
>>>> the problem is that anything I put into webapps barfs with the  
>>>> following, looking like it can't find any of it's libraries at /  
>>>> usr/ dist/pkgs/tomcat/common/lib/, even tho I can see them fine   
>>>> from that machine...
>>>>
>>>> SEVERE: Begin event threw exception
>>>> java.lang.ClassNotFoundException:   
>>>> org.apache.catalina.deploy.FilterDef
>>>>
>>>> SEVERE: Parse error in application web.xml file at jndi:/  
>>>> localhost/ admin/WEB-INF/web.xml
>>>> java.lang.ClassNotFoundException:   
>>>> org.apache.catalina.deploy.FilterDef
>>>>         at    
>>>> org.apache.tomcat.util.digester.Digester.createSAXException  
>>>> (Digester.java:2719)
>>>>         at    
>>>> org.apache.tomcat.util.digester.Digester.createSAXException  
>>>> (Digester.java:2745)
>>>>         at org.apache.tomcat.util.digester.Digester.startElement  
>>>> (Digester.java:1278)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startE 
>>>> le men t(AbstractSAXParser.java:533)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerI 
>>>> mp l.s canStartElement(XMLDocumentFragmentScannerImpl.java:878)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerI 
>>>> mp l $FragmentContentDispatcher.dispatch  
>>>> (XMLDocumentFragmentScannerImpl.java:1693)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerI 
>>>> mp l.s canDocument(XMLDocumentFragmentScannerImpl.java:368)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
>>>>  ( XML11Configuration.java:834)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
>>>>  ( XML11Configuration.java:764)
>>>>         at   
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse  
>>>> (XMLParser.java:148)
>>>>         at  
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse  
>>>> (AbstractSAXParser.java:1242)
>>>>         at org.apache.tomcat.util.digester.Digester.parse  
>>>> (Digester.java:1561)
>>>>         at  
>>>> org.apache.catalina.startup.ContextConfig.applicationWebConfig  
>>>> (ContextConfig.java:350)
>>>>         at org.apache.catalina.startup.ContextConfig.start  
>>>> (ContextConfig.java:1055)
>>>>         at   
>>>> org.apache.catalina.startup.ContextConfig.lifecycleEvent  
>>>> (ContextConfig.java:261)
>>>>         at  
>>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent  
>>>> (LifecycleSupport.java:119)
>>>>         at org.apache.catalina.core.StandardContext.start  
>>>> (StandardContext.java:4111)
>>>>         at org.apache.catalina.core.ContainerBase.start  
>>>> (ContainerBase.java:1012)
>>>>         at org.apache.catalina.core.StandardHost.start  
>>>> (StandardHost.java:718)
>>>>         at org.apache.catalina.core.ContainerBase.start  
>>>> (ContainerBase.java:1012)
>>>>         at org.apache.catalina.core.StandardEngine.start  
>>>> (StandardEngine.java:442)
>>>>         at org.apache.catalina.core.StandardService.start  
>>>> (StandardService.java:450)
>>>>         at org.apache.catalina.core.StandardServer.start  
>>>> (StandardServer.java:700)
>>>>         at org.apache.catalina.startup.Catalina.start  
>>>> (Catalina.java: 551)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native   
>>>> Method)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke  
>>>> (NativeMethodAccessorImpl.java:39)
>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke  
>>>> (DelegatingMethodAccessorImpl.java:25)
>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>         at org.apache.catalina.startup.Bootstrap.start  
>>>> (Bootstrap.java:275)
>>>>         at org.apache.catalina.startup.Bootstrap.main  
>>>> (Bootstrap.java: 413)
>>>> Feb 9, 2006 7:22:42 PM org.apache.catalina.startup.ContextConfig  
>>>> applicationWebConfig
>>>> SEVERE: Occurred at line 16 column 11
>>>>
>>>> From the docs I read, changing CATALINA_BASE should NOT change   
>>>> where it looks for common/lib .. it should look in  
>>>> $CATALINA_HOME  for that...
>>>>
>>>>> When you use this "-Dcatalina.base=$CATALINA_BASE" argument,   
>>>>> Tomcat will
>>>>> calculate all relative references for files in the following  
>>>>> directories based
>>>>> on the value of $CATALINA_BASE instead of $CATALINA_HOME:
>>>>>
>>>>> * conf - Server configuration files (including server.xml)
>>>>> * logs - Log and output files
>>>>> * shared - For classes and resources that must be shared  
>>>>> across  all web
>>>>>            applications
>>>>> * webapps - Automatically loaded web applications
>>>>> * work - Temporary working directories for web applications
>>>>> * temp - Directory used by the JVM for temporary files  
>>>>> (java.io.tmp
>>>>
>>>> So why is it acting as if it can't find any libraries?
>>>>
>>>> Mark Demma
>>>> Senior UNIX Systems Admin
>>>> PlanetOut Inc.
>>>>
>>>>
>>>> On 9 Feb 2006, at 0:14, abdurrahman sahin wrote:
>>>>
>>>>> you may try to manually run tomcat via a script, that may help   
>>>>> you  to assign
>>>>> tomcat variables seperately
>>>>> i run tomcat via a script (guistart.sh) containing that
>>>>>
>>>>> CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
>>>>> export CATALINA_HOME
>>>>> cd $CATALINA_HOME/bin
>>>>> java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=  
>>>>> $CATALINA_HOME - Djava.en
>>>>> dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
>>>>> io.tmpdir=$CATALINA_HOME/temp -cp
>>>>> $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
>>>>> org.apache.catalina.startup.Bootst
>>>>> rap start
>>>>>
>>>>>   -----Original Message-----
>>>>>   From: Mark Demma [mailto:mdemma@planetoutinc.com]
>>>>>   Sent: Thursday, February 09, 2006 5:06 AM
>>>>>   To: users@tomcat.apache.org
>>>>>   Subject: Using Tomcat over NFS over multiple hosts, want to   
>>>>> separate
>>>>> locations of directories
>>>>>
>>>>>
>>>>>   Hello folks
>>>>>
>>>>>
>>>>>   I am currently trying to convert from Resin Pro 3.0.17 to   
>>>>> Tomcat 5.5. We
>>>>> have several Solaris 9 machines and we generally place   
>>>>> applications in a NFS
>>>>> mounted "/usr/dist/" directory, which is RO for the web   
>>>>> application servers.
>>>>> I have a local link, /usr/resin -> /usr/dist/pkgs/resin
>>>>>   which points to /usr/dist/pkgs/resin/ -> vers/resin- 
>>>>> pro-3.0.17  so that I
>>>>> can easily install a new version of resin by changing that  
>>>>> link.   I have my
>>>>> RESIN_HOME=/usr/resin, which is the NFS mount and my
>>>>> SERVER_ROOT=/usr/local/resin, which is a local directory.  In  
>>>>> my resin.conf,
>>>>> I use
>>>>>   <web-app-deploy path="/w/${mode}/warfiles"
>>>>> expand-path="/usr/local/resin/webapps"/>
>>>>>   to have Resin look on another NFS mounted directory "/w" for   
>>>>> its warfiles,
>>>>> which it expands in the locally mounted /usr/local/resin.
>>>>>
>>>>>
>>>>>   This setup allows me to have my resin config files,  
>>>>> binaries,  shared
>>>>> libraries, etc, on a central NFS server, my warfiles on  
>>>>> another  NFS server
>>>>> and the only thing I need to have local is the webapps dir  
>>>>> where  it explodes
>>>>> the war files, and cache and session.  I am thus able to turn a  
>>>>> machine into
>>>>> a "resin server" by copying over one rc file, which when  
>>>>> invoked creates the
>>>>> /usr/local/resin dir and pulls everything else it needs off of  
>>>>> NFS.
>>>>>
>>>>>
>>>>>   I've been scouring the web for days trying to figure out how  
>>>>> to  make
>>>>> Tomcat do the same thing, but can't for the life of me figure   
>>>>> out how... the
>>>>> two main problems I run into is the inability to separate the   
>>>>> web  app deploy
>>>>> path, i.e. where it LOOKS for the warfiles and the expand  
>>>>> path,   where it
>>>>> expands them.  The other problem is wanting to put the conf/   
>>>>> files  in a
>>>>> different location from the webapp/ files.  $CATALINA_BASE  
>>>>> seems  to be the
>>>>> extent to which you can separate things, and it wants to put   
>>>>> conf, logs,
>>>>> shared, webapps. work. temp together...
>>>>>
>>>>>
>>>>>   So.... my question is how in Tomcat do I put the bin/  
>>>>> common/  conf/
>>>>> server/ and shared/ directories in one location (NFS mounted  
>>>>> RO)   the temp/
>>>>> webapps/ and work / locally ;  logs/ (all of them, including  
>>>>> catalina.out)
>>>>> in a sepate location NOT in $CATALINA_BASE or HOME; AND put the  
>>>>> location
>>>>> Tomcat looks for new .war files in another NFS mounted location.
>>>>>
>>>>>
>>>>>   I know I could do it all with sym-links, but god that would  
>>>>> be messy. Any
>>>>> suggestions?
>>>>>
>>>>>
>>>>>   Mark Demma
>>>>>   Senior UNIX Systems Admin
>>>>>   PlanetOut Inc.
>>>>
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.1 (Darwin)
>>>>
>>>> iD8DBQFD7AqmJMZqGyatjL8RAmYpAJ0QlqhiLNftdYprn5+enofxxP7XtgCeLnHI
>>>> bGBihwtjo7k8ZL/klAocEdQ=
>>>> =gx2M
>>>> -----END PGP SIGNATURE-----
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.1 (Darwin)
>>
>> iD8DBQFD7BBNJMZqGyatjL8RAngJAJ9b9LlI9gJ3PZ+Yh7kU3hPVNXDVJgCbBZk6
>> u4AMHp8Q0PParozN8S0vsg0=
>> =tXwP
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD7CTuJMZqGyatjL8RAlvNAJ99Ezg79Hi9MjolsTWyciASZA2ZvgCfaaHO
h9aPLQGDYcUu7vgjvr5mvvw=
=akrv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by Parsons Technical Services <pa...@earthlink.net>.
Just wanted to make sure you didn't have 1.4 .

Going out on a limb here, do you have allowlinking =true attribute set in 
you context? It might be worth a try as some of your paths may appear as 
links to Tomcat even if they are mounted volumes.

Doug


----- Original Message ----- 
From: "Mark Demma" <md...@planetoutinc.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Cc: "Parsons Technical Services" <pa...@earthlink.net>
Sent: Thursday, February 09, 2006 11:02 PM
Subject: Re: Using Tomcat over NFS over multiple hosts, want to separate 
locations of directories


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
>
> Mark Demma
> Senior UNIX Systems Admin
> PlanetOut Inc.
>
> On 9 Feb 2006, at 19:49, Parsons Technical Services wrote:
>
>> What version of java are you running?
>>
>>
>> ----- Original Message ----- From: "Mark Demma" 
>> <md...@planetoutinc.com>
>> To: "Tomcat Users List" <us...@tomcat.apache.org>
>> Sent: Thursday, February 09, 2006 10:38 PM
>> Subject: Re: Using Tomcat over NFS over multiple hosts, want to  separate 
>> locations of directories
>>
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Well, I got tomcat running via NFS with these variables starting  up: 
>>> (where /usr/dist/pkgs/... is a NFS mounted RO directory)
>>>
>>> JAVA_HOME=/usr/dist/pkgs/java
>>> CATALINA_BASE=/usr/local/tomcat
>>> CATALINA_HOME=/usr/dist/pkgs/tomcat
>>> LOG_HOME=/usr/local/logs/$instance.hive/
>>> ARGS="-config $CATALINA_HOME/conf/server.xml"
>>> TOMCAT_START="$CATALINA_HOME/bin/startup.sh $ARGS"
>>> TOMCAT_STOP="$CATALINA_HOME/bin/shutdown.sh $ARGS"
>>>
>>> the problem is that anything I put into webapps barfs with the 
>>> following, looking like it can't find any of it's libraries at / usr/ 
>>> dist/pkgs/tomcat/common/lib/, even tho I can see them fine  from that 
>>> machine...
>>>
>>> SEVERE: Begin event threw exception
>>> java.lang.ClassNotFoundException:  org.apache.catalina.deploy.FilterDef
>>>
>>> SEVERE: Parse error in application web.xml file at jndi:/ localhost/ 
>>> admin/WEB-INF/web.xml
>>> java.lang.ClassNotFoundException:  org.apache.catalina.deploy.FilterDef
>>>         at   org.apache.tomcat.util.digester.Digester.createSAXException 
>>> (Digester.java:2719)
>>>         at   org.apache.tomcat.util.digester.Digester.createSAXException 
>>> (Digester.java:2745)
>>>         at org.apache.tomcat.util.digester.Digester.startElement 
>>> (Digester.java:1278)
>>>         at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle 
>>> men t(AbstractSAXParser.java:533)
>>>         at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp 
>>> l.s canStartElement(XMLDocumentFragmentScannerImpl.java:878)
>>>         at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l 
>>> $FragmentContentDispatcher.dispatch 
>>> (XMLDocumentFragmentScannerImpl.java:1693)
>>>         at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp 
>>> l.s canDocument(XMLDocumentFragmentScannerImpl.java:368)
>>>         at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( 
>>> XML11Configuration.java:834)
>>>         at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( 
>>> XML11Configuration.java:764)
>>>         at  com.sun.org.apache.xerces.internal.parsers.XMLParser.parse 
>>> (XMLParser.java:148)
>>>         at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse 
>>> (AbstractSAXParser.java:1242)
>>>         at org.apache.tomcat.util.digester.Digester.parse 
>>> (Digester.java:1561)
>>>         at 
>>> org.apache.catalina.startup.ContextConfig.applicationWebConfig 
>>> (ContextConfig.java:350)
>>>         at org.apache.catalina.startup.ContextConfig.start 
>>> (ContextConfig.java:1055)
>>>         at  org.apache.catalina.startup.ContextConfig.lifecycleEvent 
>>> (ContextConfig.java:261)
>>>         at 
>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent 
>>> (LifecycleSupport.java:119)
>>>         at org.apache.catalina.core.StandardContext.start 
>>> (StandardContext.java:4111)
>>>         at org.apache.catalina.core.ContainerBase.start 
>>> (ContainerBase.java:1012)
>>>         at org.apache.catalina.core.StandardHost.start 
>>> (StandardHost.java:718)
>>>         at org.apache.catalina.core.ContainerBase.start 
>>> (ContainerBase.java:1012)
>>>         at org.apache.catalina.core.StandardEngine.start 
>>> (StandardEngine.java:442)
>>>         at org.apache.catalina.core.StandardService.start 
>>> (StandardService.java:450)
>>>         at org.apache.catalina.core.StandardServer.start 
>>> (StandardServer.java:700)
>>>         at org.apache.catalina.startup.Catalina.start (Catalina.java: 
>>> 551)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke 
>>> (NativeMethodAccessorImpl.java:39)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
>>> (DelegatingMethodAccessorImpl.java:25)
>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>         at org.apache.catalina.startup.Bootstrap.start 
>>> (Bootstrap.java:275)
>>>         at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 
>>> 413)
>>> Feb 9, 2006 7:22:42 PM org.apache.catalina.startup.ContextConfig 
>>> applicationWebConfig
>>> SEVERE: Occurred at line 16 column 11
>>>
>>> From the docs I read, changing CATALINA_BASE should NOT change  where 
>>> it looks for common/lib .. it should look in $CATALINA_HOME  for that...
>>>
>>>> When you use this "-Dcatalina.base=$CATALINA_BASE" argument,  Tomcat 
>>>> will
>>>> calculate all relative references for files in the following 
>>>> directories based
>>>> on the value of $CATALINA_BASE instead of $CATALINA_HOME:
>>>>
>>>> * conf - Server configuration files (including server.xml)
>>>> * logs - Log and output files
>>>> * shared - For classes and resources that must be shared across  all 
>>>> web
>>>>            applications
>>>> * webapps - Automatically loaded web applications
>>>> * work - Temporary working directories for web applications
>>>> * temp - Directory used by the JVM for temporary files (java.io.tmp
>>>
>>> So why is it acting as if it can't find any libraries?
>>>
>>> Mark Demma
>>> Senior UNIX Systems Admin
>>> PlanetOut Inc.
>>>
>>>
>>> On 9 Feb 2006, at 0:14, abdurrahman sahin wrote:
>>>
>>>> you may try to manually run tomcat via a script, that may help  you  to 
>>>> assign
>>>> tomcat variables seperately
>>>> i run tomcat via a script (guistart.sh) containing that
>>>>
>>>> CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
>>>> export CATALINA_HOME
>>>> cd $CATALINA_HOME/bin
>>>> java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home= $CATALINA_HOME - 
>>>> Djava.en
>>>> dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
>>>> io.tmpdir=$CATALINA_HOME/temp -cp
>>>> $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
>>>> org.apache.catalina.startup.Bootst
>>>> rap start
>>>>
>>>>   -----Original Message-----
>>>>   From: Mark Demma [mailto:mdemma@planetoutinc.com]
>>>>   Sent: Thursday, February 09, 2006 5:06 AM
>>>>   To: users@tomcat.apache.org
>>>>   Subject: Using Tomcat over NFS over multiple hosts, want to  separate
>>>> locations of directories
>>>>
>>>>
>>>>   Hello folks
>>>>
>>>>
>>>>   I am currently trying to convert from Resin Pro 3.0.17 to  Tomcat 
>>>> 5.5. We
>>>> have several Solaris 9 machines and we generally place  applications 
>>>> in a NFS
>>>> mounted "/usr/dist/" directory, which is RO for the web  application 
>>>> servers.
>>>> I have a local link, /usr/resin -> /usr/dist/pkgs/resin
>>>>   which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17  so 
>>>> that I
>>>> can easily install a new version of resin by changing that link.   I 
>>>> have my
>>>> RESIN_HOME=/usr/resin, which is the NFS mount and my
>>>> SERVER_ROOT=/usr/local/resin, which is a local directory.  In my 
>>>> resin.conf,
>>>> I use
>>>>   <web-app-deploy path="/w/${mode}/warfiles"
>>>> expand-path="/usr/local/resin/webapps"/>
>>>>   to have Resin look on another NFS mounted directory "/w" for  its 
>>>> warfiles,
>>>> which it expands in the locally mounted /usr/local/resin.
>>>>
>>>>
>>>>   This setup allows me to have my resin config files, binaries,  shared
>>>> libraries, etc, on a central NFS server, my warfiles on another  NFS 
>>>> server
>>>> and the only thing I need to have local is the webapps dir where  it 
>>>> explodes
>>>> the war files, and cache and session.  I am thus able to turn a 
>>>> machine into
>>>> a "resin server" by copying over one rc file, which when invoked 
>>>> creates the
>>>> /usr/local/resin dir and pulls everything else it needs off of NFS.
>>>>
>>>>
>>>>   I've been scouring the web for days trying to figure out how to  make
>>>> Tomcat do the same thing, but can't for the life of me figure  out 
>>>> how... the
>>>> two main problems I run into is the inability to separate the  web  app 
>>>> deploy
>>>> path, i.e. where it LOOKS for the warfiles and the expand path,   where 
>>>> it
>>>> expands them.  The other problem is wanting to put the conf/  files  in 
>>>> a
>>>> different location from the webapp/ files.  $CATALINA_BASE seems  to 
>>>> be the
>>>> extent to which you can separate things, and it wants to put  conf, 
>>>> logs,
>>>> shared, webapps. work. temp together...
>>>>
>>>>
>>>>   So.... my question is how in Tomcat do I put the bin/ common/  conf/
>>>> server/ and shared/ directories in one location (NFS mounted RO)   the 
>>>> temp/
>>>> webapps/ and work / locally ;  logs/ (all of them, including 
>>>> catalina.out)
>>>> in a sepate location NOT in $CATALINA_BASE or HOME; AND put the 
>>>> location
>>>> Tomcat looks for new .war files in another NFS mounted location.
>>>>
>>>>
>>>>   I know I could do it all with sym-links, but god that would be 
>>>> messy. Any
>>>> suggestions?
>>>>
>>>>
>>>>   Mark Demma
>>>>   Senior UNIX Systems Admin
>>>>   PlanetOut Inc.
>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.1 (Darwin)
>>>
>>> iD8DBQFD7AqmJMZqGyatjL8RAmYpAJ0QlqhiLNftdYprn5+enofxxP7XtgCeLnHI
>>> bGBihwtjo7k8ZL/klAocEdQ=
>>> =gx2M
>>> -----END PGP SIGNATURE-----
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
>
> iD8DBQFD7BBNJMZqGyatjL8RAngJAJ9b9LlI9gJ3PZ+Yh7kU3hPVNXDVJgCbBZk6
> u4AMHp8Q0PParozN8S0vsg0=
> =tXwP
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by Mark Demma <md...@planetoutinc.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

Mark Demma
Senior UNIX Systems Admin
PlanetOut Inc.

On 9 Feb 2006, at 19:49, Parsons Technical Services wrote:

> What version of java are you running?
>
>
> ----- Original Message ----- From: "Mark Demma"  
> <md...@planetoutinc.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Thursday, February 09, 2006 10:38 PM
> Subject: Re: Using Tomcat over NFS over multiple hosts, want to  
> separate locations of directories
>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Well, I got tomcat running via NFS with these variables starting  
>> up: (where /usr/dist/pkgs/... is a NFS mounted RO directory)
>>
>> JAVA_HOME=/usr/dist/pkgs/java
>> CATALINA_BASE=/usr/local/tomcat
>> CATALINA_HOME=/usr/dist/pkgs/tomcat
>> LOG_HOME=/usr/local/logs/$instance.hive/
>> ARGS="-config $CATALINA_HOME/conf/server.xml"
>> TOMCAT_START="$CATALINA_HOME/bin/startup.sh $ARGS"
>> TOMCAT_STOP="$CATALINA_HOME/bin/shutdown.sh $ARGS"
>>
>> the problem is that anything I put into webapps barfs with the   
>> following, looking like it can't find any of it's libraries at / 
>> usr/ dist/pkgs/tomcat/common/lib/, even tho I can see them fine  
>> from that machine...
>>
>> SEVERE: Begin event threw exception
>> java.lang.ClassNotFoundException:  
>> org.apache.catalina.deploy.FilterDef
>>
>> SEVERE: Parse error in application web.xml file at jndi:/ 
>> localhost/ admin/WEB-INF/web.xml
>> java.lang.ClassNotFoundException:  
>> org.apache.catalina.deploy.FilterDef
>>         at   
>> org.apache.tomcat.util.digester.Digester.createSAXException  
>> (Digester.java:2719)
>>         at   
>> org.apache.tomcat.util.digester.Digester.createSAXException  
>> (Digester.java:2745)
>>         at org.apache.tomcat.util.digester.Digester.startElement  
>> (Digester.java:1278)
>>         at  
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle 
>> men t(AbstractSAXParser.java:533)
>>         at  
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp 
>> l.s canStartElement(XMLDocumentFragmentScannerImpl.java:878)
>>         at  
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp 
>> l $FragmentContentDispatcher.dispatch  
>> (XMLDocumentFragmentScannerImpl.java:1693)
>>         at  
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp 
>> l.s canDocument(XMLDocumentFragmentScannerImpl.java:368)
>>         at  
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( 
>> XML11Configuration.java:834)
>>         at  
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( 
>> XML11Configuration.java:764)
>>         at  
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse  
>> (XMLParser.java:148)
>>         at  
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse  
>> (AbstractSAXParser.java:1242)
>>         at org.apache.tomcat.util.digester.Digester.parse  
>> (Digester.java:1561)
>>         at   
>> org.apache.catalina.startup.ContextConfig.applicationWebConfig  
>> (ContextConfig.java:350)
>>         at org.apache.catalina.startup.ContextConfig.start  
>> (ContextConfig.java:1055)
>>         at  
>> org.apache.catalina.startup.ContextConfig.lifecycleEvent  
>> (ContextConfig.java:261)
>>         at   
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent  
>> (LifecycleSupport.java:119)
>>         at org.apache.catalina.core.StandardContext.start  
>> (StandardContext.java:4111)
>>         at org.apache.catalina.core.ContainerBase.start  
>> (ContainerBase.java:1012)
>>         at org.apache.catalina.core.StandardHost.start  
>> (StandardHost.java:718)
>>         at org.apache.catalina.core.ContainerBase.start  
>> (ContainerBase.java:1012)
>>         at org.apache.catalina.core.StandardEngine.start  
>> (StandardEngine.java:442)
>>         at org.apache.catalina.core.StandardService.start  
>> (StandardService.java:450)
>>         at org.apache.catalina.core.StandardServer.start  
>> (StandardServer.java:700)
>>         at org.apache.catalina.startup.Catalina.start 
>> (Catalina.java: 551)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>> Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke  
>> (NativeMethodAccessorImpl.java:39)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke  
>> (DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>         at org.apache.catalina.startup.Bootstrap.start  
>> (Bootstrap.java:275)
>>         at org.apache.catalina.startup.Bootstrap.main 
>> (Bootstrap.java: 413)
>> Feb 9, 2006 7:22:42 PM org.apache.catalina.startup.ContextConfig  
>> applicationWebConfig
>> SEVERE: Occurred at line 16 column 11
>>
>> From the docs I read, changing CATALINA_BASE should NOT change  
>> where  it looks for common/lib .. it should look in $CATALINA_HOME  
>> for that...
>>
>>> When you use this "-Dcatalina.base=$CATALINA_BASE" argument,  
>>> Tomcat  will
>>> calculate all relative references for files in the following   
>>> directories based
>>> on the value of $CATALINA_BASE instead of $CATALINA_HOME:
>>>
>>> * conf - Server configuration files (including server.xml)
>>> * logs - Log and output files
>>> * shared - For classes and resources that must be shared across  
>>> all  web
>>>            applications
>>> * webapps - Automatically loaded web applications
>>> * work - Temporary working directories for web applications
>>> * temp - Directory used by the JVM for temporary files (java.io.tmp
>>
>> So why is it acting as if it can't find any libraries?
>>
>> Mark Demma
>> Senior UNIX Systems Admin
>> PlanetOut Inc.
>>
>>
>> On 9 Feb 2006, at 0:14, abdurrahman sahin wrote:
>>
>>> you may try to manually run tomcat via a script, that may help  
>>> you  to assign
>>> tomcat variables seperately
>>> i run tomcat via a script (guistart.sh) containing that
>>>
>>> CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
>>> export CATALINA_HOME
>>> cd $CATALINA_HOME/bin
>>> java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home= 
>>> $CATALINA_HOME - Djava.en
>>> dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
>>> io.tmpdir=$CATALINA_HOME/temp -cp
>>> $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
>>> org.apache.catalina.startup.Bootst
>>> rap start
>>>
>>>   -----Original Message-----
>>>   From: Mark Demma [mailto:mdemma@planetoutinc.com]
>>>   Sent: Thursday, February 09, 2006 5:06 AM
>>>   To: users@tomcat.apache.org
>>>   Subject: Using Tomcat over NFS over multiple hosts, want to  
>>> separate
>>> locations of directories
>>>
>>>
>>>   Hello folks
>>>
>>>
>>>   I am currently trying to convert from Resin Pro 3.0.17 to  
>>> Tomcat  5.5. We
>>> have several Solaris 9 machines and we generally place  
>>> applications  in a NFS
>>> mounted "/usr/dist/" directory, which is RO for the web  
>>> application servers.
>>> I have a local link, /usr/resin -> /usr/dist/pkgs/resin
>>>   which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17  
>>> so  that I
>>> can easily install a new version of resin by changing that link.   
>>> I  have my
>>> RESIN_HOME=/usr/resin, which is the NFS mount and my
>>> SERVER_ROOT=/usr/local/resin, which is a local directory.  In my  
>>> resin.conf,
>>> I use
>>>   <web-app-deploy path="/w/${mode}/warfiles"
>>> expand-path="/usr/local/resin/webapps"/>
>>>   to have Resin look on another NFS mounted directory "/w" for  
>>> its warfiles,
>>> which it expands in the locally mounted /usr/local/resin.
>>>
>>>
>>>   This setup allows me to have my resin config files, binaries,  
>>> shared
>>> libraries, etc, on a central NFS server, my warfiles on another  
>>> NFS server
>>> and the only thing I need to have local is the webapps dir where  
>>> it explodes
>>> the war files, and cache and session.  I am thus able to turn a   
>>> machine into
>>> a "resin server" by copying over one rc file, which when invoked   
>>> creates the
>>> /usr/local/resin dir and pulls everything else it needs off of NFS.
>>>
>>>
>>>   I've been scouring the web for days trying to figure out how to  
>>> make
>>> Tomcat do the same thing, but can't for the life of me figure  
>>> out  how... the
>>> two main problems I run into is the inability to separate the  
>>> web  app deploy
>>> path, i.e. where it LOOKS for the warfiles and the expand path,   
>>> where it
>>> expands them.  The other problem is wanting to put the conf/  
>>> files  in a
>>> different location from the webapp/ files.  $CATALINA_BASE seems  
>>> to  be the
>>> extent to which you can separate things, and it wants to put  
>>> conf,  logs,
>>> shared, webapps. work. temp together...
>>>
>>>
>>>   So.... my question is how in Tomcat do I put the bin/ common/  
>>> conf/
>>> server/ and shared/ directories in one location (NFS mounted RO)   
>>> the temp/
>>> webapps/ and work / locally ;  logs/ (all of them, including  
>>> catalina.out)
>>> in a sepate location NOT in $CATALINA_BASE or HOME; AND put the   
>>> location
>>> Tomcat looks for new .war files in another NFS mounted location.
>>>
>>>
>>>   I know I could do it all with sym-links, but god that would be   
>>> messy. Any
>>> suggestions?
>>>
>>>
>>>   Mark Demma
>>>   Senior UNIX Systems Admin
>>>   PlanetOut Inc.
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.1 (Darwin)
>>
>> iD8DBQFD7AqmJMZqGyatjL8RAmYpAJ0QlqhiLNftdYprn5+enofxxP7XtgCeLnHI
>> bGBihwtjo7k8ZL/klAocEdQ=
>> =gx2M
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD7BBNJMZqGyatjL8RAngJAJ9b9LlI9gJ3PZ+Yh7kU3hPVNXDVJgCbBZk6
u4AMHp8Q0PParozN8S0vsg0=
=tXwP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by Parsons Technical Services <pa...@earthlink.net>.
What version of java are you running?


----- Original Message ----- 
From: "Mark Demma" <md...@planetoutinc.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, February 09, 2006 10:38 PM
Subject: Re: Using Tomcat over NFS over multiple hosts, want to separate 
locations of directories


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Well, I got tomcat running via NFS with these variables starting up: 
> (where /usr/dist/pkgs/... is a NFS mounted RO directory)
>
> JAVA_HOME=/usr/dist/pkgs/java
> CATALINA_BASE=/usr/local/tomcat
> CATALINA_HOME=/usr/dist/pkgs/tomcat
> LOG_HOME=/usr/local/logs/$instance.hive/
> ARGS="-config $CATALINA_HOME/conf/server.xml"
> TOMCAT_START="$CATALINA_HOME/bin/startup.sh $ARGS"
> TOMCAT_STOP="$CATALINA_HOME/bin/shutdown.sh $ARGS"
>
> the problem is that anything I put into webapps barfs with the  following, 
> looking like it can't find any of it's libraries at /usr/ 
> dist/pkgs/tomcat/common/lib/, even tho I can see them fine from that 
> machine...
>
> SEVERE: Begin event threw exception
> java.lang.ClassNotFoundException: org.apache.catalina.deploy.FilterDef
>
> SEVERE: Parse error in application web.xml file at jndi:/localhost/ 
> admin/WEB-INF/web.xml
> java.lang.ClassNotFoundException: org.apache.catalina.deploy.FilterDef
>         at  org.apache.tomcat.util.digester.Digester.createSAXException 
> (Digester.java:2719)
>         at  org.apache.tomcat.util.digester.Digester.createSAXException 
> (Digester.java:2745)
>         at org.apache.tomcat.util.digester.Digester.startElement 
> (Digester.java:1278)
>         at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen 
> t(AbstractSAXParser.java:533)
>         at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s 
> canStartElement(XMLDocumentFragmentScannerImpl.java:878)
>         at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
> $FragmentContentDispatcher.dispatch 
> (XMLDocumentFragmentScannerImpl.java:1693)
>         at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s 
> canDocument(XMLDocumentFragmentScannerImpl.java:368)
>         at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
> (XML11Configuration.java:834)
>         at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
> (XML11Configuration.java:764)
>         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse 
> (XMLParser.java:148)
>         at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse 
> (AbstractSAXParser.java:1242)
>         at org.apache.tomcat.util.digester.Digester.parse 
> (Digester.java:1561)
>         at  org.apache.catalina.startup.ContextConfig.applicationWebConfig 
> (ContextConfig.java:350)
>         at org.apache.catalina.startup.ContextConfig.start 
> (ContextConfig.java:1055)
>         at org.apache.catalina.startup.ContextConfig.lifecycleEvent 
> (ContextConfig.java:261)
>         at  org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent 
> (LifecycleSupport.java:119)
>         at org.apache.catalina.core.StandardContext.start 
> (StandardContext.java:4111)
>         at org.apache.catalina.core.ContainerBase.start 
> (ContainerBase.java:1012)
>         at org.apache.catalina.core.StandardHost.start 
> (StandardHost.java:718)
>         at org.apache.catalina.core.ContainerBase.start 
> (ContainerBase.java:1012)
>         at org.apache.catalina.core.StandardEngine.start 
> (StandardEngine.java:442)
>         at org.apache.catalina.core.StandardService.start 
> (StandardService.java:450)
>         at org.apache.catalina.core.StandardServer.start 
> (StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java: 551)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start 
> (Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: 413)
> Feb 9, 2006 7:22:42 PM org.apache.catalina.startup.ContextConfig 
> applicationWebConfig
> SEVERE: Occurred at line 16 column 11
>
> From the docs I read, changing CATALINA_BASE should NOT change where  it 
> looks for common/lib .. it should look in $CATALINA_HOME for that...
>
>> When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat  will
>> calculate all relative references for files in the following  directories 
>> based
>> on the value of $CATALINA_BASE instead of $CATALINA_HOME:
>>
>> * conf - Server configuration files (including server.xml)
>> * logs - Log and output files
>> * shared - For classes and resources that must be shared across all  web
>>            applications
>> * webapps - Automatically loaded web applications
>> * work - Temporary working directories for web applications
>> * temp - Directory used by the JVM for temporary files (java.io.tmp
>
> So why is it acting as if it can't find any libraries?
>
> Mark Demma
> Senior UNIX Systems Admin
> PlanetOut Inc.
>
>
> On 9 Feb 2006, at 0:14, abdurrahman sahin wrote:
>
>> you may try to manually run tomcat via a script, that may help you  to 
>> assign
>> tomcat variables seperately
>> i run tomcat via a script (guistart.sh) containing that
>>
>> CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
>> export CATALINA_HOME
>> cd $CATALINA_HOME/bin
>> java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME - 
>> Djava.en
>> dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
>> io.tmpdir=$CATALINA_HOME/temp -cp
>> $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
>> org.apache.catalina.startup.Bootst
>> rap start
>>
>>   -----Original Message-----
>>   From: Mark Demma [mailto:mdemma@planetoutinc.com]
>>   Sent: Thursday, February 09, 2006 5:06 AM
>>   To: users@tomcat.apache.org
>>   Subject: Using Tomcat over NFS over multiple hosts, want to separate
>> locations of directories
>>
>>
>>   Hello folks
>>
>>
>>   I am currently trying to convert from Resin Pro 3.0.17 to Tomcat  5.5. 
>> We
>> have several Solaris 9 machines and we generally place applications  in a 
>> NFS
>> mounted "/usr/dist/" directory, which is RO for the web application 
>> servers.
>> I have a local link, /usr/resin -> /usr/dist/pkgs/resin
>>   which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17 so  that 
>> I
>> can easily install a new version of resin by changing that link.  I  have 
>> my
>> RESIN_HOME=/usr/resin, which is the NFS mount and my
>> SERVER_ROOT=/usr/local/resin, which is a local directory.  In my 
>> resin.conf,
>> I use
>>   <web-app-deploy path="/w/${mode}/warfiles"
>> expand-path="/usr/local/resin/webapps"/>
>>   to have Resin look on another NFS mounted directory "/w" for its 
>> warfiles,
>> which it expands in the locally mounted /usr/local/resin.
>>
>>
>>   This setup allows me to have my resin config files, binaries, shared
>> libraries, etc, on a central NFS server, my warfiles on another NFS 
>> server
>> and the only thing I need to have local is the webapps dir where it 
>> explodes
>> the war files, and cache and session.  I am thus able to turn a  machine 
>> into
>> a "resin server" by copying over one rc file, which when invoked  creates 
>> the
>> /usr/local/resin dir and pulls everything else it needs off of NFS.
>>
>>
>>   I've been scouring the web for days trying to figure out how to make
>> Tomcat do the same thing, but can't for the life of me figure out  how... 
>> the
>> two main problems I run into is the inability to separate the web  app 
>> deploy
>> path, i.e. where it LOOKS for the warfiles and the expand path,  where it
>> expands them.  The other problem is wanting to put the conf/ files  in a
>> different location from the webapp/ files.  $CATALINA_BASE seems to  be 
>> the
>> extent to which you can separate things, and it wants to put conf,  logs,
>> shared, webapps. work. temp together...
>>
>>
>>   So.... my question is how in Tomcat do I put the bin/ common/ conf/
>> server/ and shared/ directories in one location (NFS mounted RO)  the 
>> temp/
>> webapps/ and work / locally ;  logs/ (all of them, including 
>> catalina.out)
>> in a sepate location NOT in $CATALINA_BASE or HOME; AND put the  location
>> Tomcat looks for new .war files in another NFS mounted location.
>>
>>
>>   I know I could do it all with sym-links, but god that would be  messy. 
>> Any
>> suggestions?
>>
>>
>>   Mark Demma
>>   Senior UNIX Systems Admin
>>   PlanetOut Inc.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
>
> iD8DBQFD7AqmJMZqGyatjL8RAmYpAJ0QlqhiLNftdYprn5+enofxxP7XtgCeLnHI
> bGBihwtjo7k8ZL/klAocEdQ=
> =gx2M
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by Mark Demma <md...@planetoutinc.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, I got tomcat running via NFS with these variables starting up:  
(where /usr/dist/pkgs/... is a NFS mounted RO directory)

JAVA_HOME=/usr/dist/pkgs/java
CATALINA_BASE=/usr/local/tomcat
CATALINA_HOME=/usr/dist/pkgs/tomcat
LOG_HOME=/usr/local/logs/$instance.hive/
ARGS="-config $CATALINA_HOME/conf/server.xml"
TOMCAT_START="$CATALINA_HOME/bin/startup.sh $ARGS"
TOMCAT_STOP="$CATALINA_HOME/bin/shutdown.sh $ARGS"

the problem is that anything I put into webapps barfs with the  
following, looking like it can't find any of it's libraries at /usr/ 
dist/pkgs/tomcat/common/lib/, even tho I can see them fine from that  
machine...

SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.deploy.FilterDef

SEVERE: Parse error in application web.xml file at jndi:/localhost/ 
admin/WEB-INF/web.xml
java.lang.ClassNotFoundException: org.apache.catalina.deploy.FilterDef
         at  
org.apache.tomcat.util.digester.Digester.createSAXException 
(Digester.java:2719)
         at  
org.apache.tomcat.util.digester.Digester.createSAXException 
(Digester.java:2745)
         at org.apache.tomcat.util.digester.Digester.startElement 
(Digester.java:1278)
         at  
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen 
t(AbstractSAXParser.java:533)
         at  
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s 
canStartElement(XMLDocumentFragmentScannerImpl.java:878)
         at  
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
$FragmentContentDispatcher.dispatch 
(XMLDocumentFragmentScannerImpl.java:1693)
         at  
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s 
canDocument(XMLDocumentFragmentScannerImpl.java:368)
         at  
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
(XML11Configuration.java:834)
         at  
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse 
(XMLParser.java:148)
         at  
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse 
(AbstractSAXParser.java:1242)
         at org.apache.tomcat.util.digester.Digester.parse 
(Digester.java:1561)
         at  
org.apache.catalina.startup.ContextConfig.applicationWebConfig 
(ContextConfig.java:350)
         at org.apache.catalina.startup.ContextConfig.start 
(ContextConfig.java:1055)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent 
(ContextConfig.java:261)
         at  
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent 
(LifecycleSupport.java:119)
         at org.apache.catalina.core.StandardContext.start 
(StandardContext.java:4111)
         at org.apache.catalina.core.ContainerBase.start 
(ContainerBase.java:1012)
         at org.apache.catalina.core.StandardHost.start 
(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start 
(ContainerBase.java:1012)
         at org.apache.catalina.core.StandardEngine.start 
(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start 
(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start 
(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java: 
551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start 
(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: 
413)
Feb 9, 2006 7:22:42 PM org.apache.catalina.startup.ContextConfig  
applicationWebConfig
SEVERE: Occurred at line 16 column 11

 From the docs I read, changing CATALINA_BASE should NOT change where  
it looks for common/lib .. it should look in $CATALINA_HOME for that...

> When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat  
> will
> calculate all relative references for files in the following  
> directories based
> on the value of $CATALINA_BASE instead of $CATALINA_HOME:
>
> * conf - Server configuration files (including server.xml)
> * logs - Log and output files
> * shared - For classes and resources that must be shared across all  
> web
>            applications
> * webapps - Automatically loaded web applications
> * work - Temporary working directories for web applications
> * temp - Directory used by the JVM for temporary files (java.io.tmp

So why is it acting as if it can't find any libraries?

Mark Demma
Senior UNIX Systems Admin
PlanetOut Inc.


On 9 Feb 2006, at 0:14, abdurrahman sahin wrote:

> you may try to manually run tomcat via a script, that may help you  
> to assign
> tomcat variables seperately
> i run tomcat via a script (guistart.sh) containing that
>
> CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
> export CATALINA_HOME
> cd $CATALINA_HOME/bin
> java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME - 
> Djava.en
> dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
> io.tmpdir=$CATALINA_HOME/temp -cp
> $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
> org.apache.catalina.startup.Bootst
> rap start
>
>   -----Original Message-----
>   From: Mark Demma [mailto:mdemma@planetoutinc.com]
>   Sent: Thursday, February 09, 2006 5:06 AM
>   To: users@tomcat.apache.org
>   Subject: Using Tomcat over NFS over multiple hosts, want to separate
> locations of directories
>
>
>   Hello folks
>
>
>   I am currently trying to convert from Resin Pro 3.0.17 to Tomcat  
> 5.5.  We
> have several Solaris 9 machines and we generally place applications  
> in a NFS
> mounted "/usr/dist/" directory, which is RO for the web application  
> servers.
> I have a local link, /usr/resin -> /usr/dist/pkgs/resin
>   which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17 so  
> that I
> can easily install a new version of resin by changing that link.  I  
> have my
> RESIN_HOME=/usr/resin, which is the NFS mount and my
> SERVER_ROOT=/usr/local/resin, which is a local directory.  In my  
> resin.conf,
> I use
>   <web-app-deploy path="/w/${mode}/warfiles"
> expand-path="/usr/local/resin/webapps"/>
>   to have Resin look on another NFS mounted directory "/w" for its  
> warfiles,
> which it expands in the locally mounted /usr/local/resin.
>
>
>   This setup allows me to have my resin config files, binaries, shared
> libraries, etc, on a central NFS server, my warfiles on another NFS  
> server
> and the only thing I need to have local is the webapps dir where it  
> explodes
> the war files, and cache and session.  I am thus able to turn a  
> machine into
> a "resin server" by copying over one rc file, which when invoked  
> creates the
> /usr/local/resin dir and pulls everything else it needs off of NFS.
>
>
>   I've been scouring the web for days trying to figure out how to make
> Tomcat do the same thing, but can't for the life of me figure out  
> how... the
> two main problems I run into is the inability to separate the web  
> app deploy
> path, i.e. where it LOOKS for the warfiles and the expand path,  
> where it
> expands them.  The other problem is wanting to put the conf/ files  
> in a
> different location from the webapp/ files.  $CATALINA_BASE seems to  
> be the
> extent to which you can separate things, and it wants to put conf,  
> logs,
> shared, webapps. work. temp together...
>
>
>   So.... my question is how in Tomcat do I put the bin/ common/ conf/
> server/ and shared/ directories in one location (NFS mounted RO)  
> the temp/
> webapps/ and work / locally ;  logs/ (all of them, including  
> catalina.out)
> in a sepate location NOT in $CATALINA_BASE or HOME; AND put the  
> location
> Tomcat looks for new .war files in another NFS mounted location.
>
>
>   I know I could do it all with sym-links, but god that would be  
> messy.  Any
> suggestions?
>
>
>   Mark Demma
>   Senior UNIX Systems Admin
>   PlanetOut Inc.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD7AqmJMZqGyatjL8RAmYpAJ0QlqhiLNftdYprn5+enofxxP7XtgCeLnHI
bGBihwtjo7k8ZL/klAocEdQ=
=gx2M
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by Mark Demma <md...@planetoutinc.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanx for the hints... what I still can't figure out is how to put  
the /conf/ directory in CATALINA_HOME instead of CATALINA_BASE   ....  
or at least configure where it looks for it...

Mark Demma
Senior UNIX Systems Admin
PlanetOut Inc.

On 9 Feb 2006, at 0:14, abdurrahman sahin wrote:

> you may try to manually run tomcat via a script, that may help you  
> to assign
> tomcat variables seperately
> i run tomcat via a script (guistart.sh) containing that
>
> CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
> export CATALINA_HOME
> cd $CATALINA_HOME/bin
> java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME - 
> Djava.en
> dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
> io.tmpdir=$CATALINA_HOME/temp -cp
> $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
> org.apache.catalina.startup.Bootst
> rap start
>
>   -----Original Message-----
>   From: Mark Demma [mailto:mdemma@planetoutinc.com]
>   Sent: Thursday, February 09, 2006 5:06 AM
>   To: users@tomcat.apache.org
>   Subject: Using Tomcat over NFS over multiple hosts, want to separate
> locations of directories
>
>
>   Hello folks
>
>
>   I am currently trying to convert from Resin Pro 3.0.17 to Tomcat  
> 5.5.  We
> have several Solaris 9 machines and we generally place applications  
> in a NFS
> mounted "/usr/dist/" directory, which is RO for the web application  
> servers.
> I have a local link, /usr/resin -> /usr/dist/pkgs/resin
>   which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17 so  
> that I
> can easily install a new version of resin by changing that link.  I  
> have my
> RESIN_HOME=/usr/resin, which is the NFS mount and my
> SERVER_ROOT=/usr/local/resin, which is a local directory.  In my  
> resin.conf,
> I use
>   <web-app-deploy path="/w/${mode}/warfiles"
> expand-path="/usr/local/resin/webapps"/>
>   to have Resin look on another NFS mounted directory "/w" for its  
> warfiles,
> which it expands in the locally mounted /usr/local/resin.
>
>
>   This setup allows me to have my resin config files, binaries, shared
> libraries, etc, on a central NFS server, my warfiles on another NFS  
> server
> and the only thing I need to have local is the webapps dir where it  
> explodes
> the war files, and cache and session.  I am thus able to turn a  
> machine into
> a "resin server" by copying over one rc file, which when invoked  
> creates the
> /usr/local/resin dir and pulls everything else it needs off of NFS.
>
>
>   I've been scouring the web for days trying to figure out how to make
> Tomcat do the same thing, but can't for the life of me figure out  
> how... the
> two main problems I run into is the inability to separate the web  
> app deploy
> path, i.e. where it LOOKS for the warfiles and the expand path,  
> where it
> expands them.  The other problem is wanting to put the conf/ files  
> in a
> different location from the webapp/ files.  $CATALINA_BASE seems to  
> be the
> extent to which you can separate things, and it wants to put conf,  
> logs,
> shared, webapps. work. temp together...
>
>
>   So.... my question is how in Tomcat do I put the bin/ common/ conf/
> server/ and shared/ directories in one location (NFS mounted RO)  
> the temp/
> webapps/ and work / locally ;  logs/ (all of them, including  
> catalina.out)
> in a sepate location NOT in $CATALINA_BASE or HOME; AND put the  
> location
> Tomcat looks for new .war files in another NFS mounted location.
>
>
>   I know I could do it all with sym-links, but god that would be  
> messy.  Any
> suggestions?
>
>
>   Mark Demma
>   Senior UNIX Systems Admin
>   PlanetOut Inc.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD677rJMZqGyatjL8RAtYBAJ94OWxJWXk8Q0onIpG6pV1oxYfeygCfUVPB
pwD46mwBmrnfxIHf7p/Sgc4=
=kltC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Using Tomcat over NFS over multiple hosts, want to separate locations of directories

Posted by abdurrahman sahin <ab...@argela.com.tr>.
you may try to manually run tomcat via a script, that may help you to assign
tomcat variables seperately
i run tomcat via a script (guistart.sh) containing that

CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat
export CATALINA_HOME
cd $CATALINA_HOME/bin
java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME -Djava.en
dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava.
io.tmpdir=$CATALINA_HOME/temp -cp
$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar
org.apache.catalina.startup.Bootst
rap start

  -----Original Message-----
  From: Mark Demma [mailto:mdemma@planetoutinc.com]
  Sent: Thursday, February 09, 2006 5:06 AM
  To: users@tomcat.apache.org
  Subject: Using Tomcat over NFS over multiple hosts, want to separate
locations of directories


  Hello folks


  I am currently trying to convert from Resin Pro 3.0.17 to Tomcat 5.5.  We
have several Solaris 9 machines and we generally place applications in a NFS
mounted "/usr/dist/" directory, which is RO for the web application servers.
I have a local link, /usr/resin -> /usr/dist/pkgs/resin
  which points to /usr/dist/pkgs/resin/ -> vers/resin-pro-3.0.17 so that I
can easily install a new version of resin by changing that link.  I have my
RESIN_HOME=/usr/resin, which is the NFS mount and my
SERVER_ROOT=/usr/local/resin, which is a local directory.  In my resin.conf,
I use
  <web-app-deploy path="/w/${mode}/warfiles"
expand-path="/usr/local/resin/webapps"/>
  to have Resin look on another NFS mounted directory "/w" for its warfiles,
which it expands in the locally mounted /usr/local/resin.


  This setup allows me to have my resin config files, binaries, shared
libraries, etc, on a central NFS server, my warfiles on another NFS server
and the only thing I need to have local is the webapps dir where it explodes
the war files, and cache and session.  I am thus able to turn a machine into
a "resin server" by copying over one rc file, which when invoked creates the
/usr/local/resin dir and pulls everything else it needs off of NFS.


  I've been scouring the web for days trying to figure out how to make
Tomcat do the same thing, but can't for the life of me figure out how... the
two main problems I run into is the inability to separate the web app deploy
path, i.e. where it LOOKS for the warfiles and the expand path, where it
expands them.  The other problem is wanting to put the conf/ files in a
different location from the webapp/ files.  $CATALINA_BASE seems to be the
extent to which you can separate things, and it wants to put conf, logs,
shared, webapps. work. temp together...


  So.... my question is how in Tomcat do I put the bin/ common/ conf/
server/ and shared/ directories in one location (NFS mounted RO) the temp/
webapps/ and work / locally ;  logs/ (all of them, including catalina.out)
in a sepate location NOT in $CATALINA_BASE or HOME; AND put the location
Tomcat looks for new .war files in another NFS mounted location.


  I know I could do it all with sym-links, but god that would be messy.  Any
suggestions?


  Mark Demma
  Senior UNIX Systems Admin
  PlanetOut Inc.