What version of java are you running?

----- Original Message ----- From: "Mark Demma" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@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:[EMAIL PROTECTED]
  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to