You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nathan Wilhelmi <wi...@ucar.edu> on 2008/04/07 23:51:30 UTC

TC6 classpath problem...

Upgrading from TC5.5 to TC6 and having class path problems. We are 
starting it via JSVC, we used to start it up with the following class path:

CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

However with TC6, it requires

CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar:\
$CATALINA_HOME/lib/catalina.jar:$CATALINA_HOME/lib/tomcat-coyote.jar:\
$CATALINA_HOME/lib/servlet-api.jar:$CATALINA_HOME/lib/annotations-api.jar:$CATALINA_HOME/lib/jasper.jar\
:$CATALINA_HOME/lib/jsp-api.jar

just to start up, to get apps to run we have to list the entire contents 
of $CATALINA_HOME/lib/ as part of the classpath value, this doesn't seem 
right. Am I missing something obvious? Catalina.properties has: 
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar which I 
thought should bring all the jars into scope....

Thanks!

-Nate



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


RE: TC6 classpath problem...

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Nathan Wilhelmi [mailto:wilhelmi@ucar.edu] 
> Subject: RE: TC6 classpath problem...
> 
> JSVC_CLASSPATH=\
> $CATALINA_HOME/bin/commons-daemon.jar:\
> $CATALINA_HOME/bin/bootstrap.jar:\

Why do you have commons-daemon.jar on the -cp?  None of the doc shows
that.

> SEVERE: createMBeans: Throwable
> java.lang.NullPointerException
>         at java.io.File.<init>(File.java:222)
>         at 
> org.apache.catalina.core.StandardContext.getBasePath(StandardC
> ontext.java:4777)

That looks like a <Context> element for one of your webapps is bad.  If
the <Context> element is not in server.xml (and it shouldn't be), you
must not specify the path or docBase attributes.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: TC6 classpath problem...

Posted by Nathan Wilhelmi <wi...@ucar.edu>.
Thanks for the pointer, I changed it to:

JSVC_CLASSPATH=\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar:\

and passed $JSVC_CLASSPATH as the -cp command. It starts although I am getting some MBean errors, should this be picked up or do I need to extend the JSVC -cp beyond the basics above?

SEVERE: createMBeans: Throwable
java.lang.NullPointerException
        at java.io.File.<init>(File.java:222)
        at org.apache.catalina.core.StandardContext.getBasePath(StandardContext.java:4777)
.......

Thanks!

-Nate
 




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


RE: RE: TC6 classpath problem...

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Nathan Wilhelmi [mailto:wilhelmi@ucar.edu] 
> Subject: Re: RE: TC6 classpath problem...
> 
> I don't know how to get JSVC to start without it though, 
> every example I can find of JSVC has the minimal classpath 
> variables I listed.

That's odd, because every example I looked at and especially the actual
Tomcat doc itself shows only bin/bootstrap.jar, and that is specified by
the -cp command line option on jsvc, not the CLASSPATH environment
variable.  You need that -cp of the one jar and a few desirable system
properties settings (look in the scripts for those), nothing else.
Setting that mess you had will certainly destroy Tomcat's expected
classloader hierarchy.  Read this:
http://tomcat.apache.org/tomcat-6.0-doc/setup.html#Unix%20daemon

BTW, tools.jar has not been needed since the first release of 5.5.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: RE: TC6 classpath problem...

Posted by Nathan Wilhelmi <wi...@ucar.edu>.
I don't know how to get JSVC to start without it though, every example I can find of JSVC has the minimal classpath variables I listed. It won't start without it, likely as it bypasses the tomcat scripts you mentioned. What I am trying to figure out is why I have to list everything in /lib by hand, I thought Tomcat should pick those up on it's own based on catalina.properties....

Thanks!

-Nate

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


RE: TC6 classpath problem...

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Nathan Wilhelmi [mailto:wilhelmi@ucar.edu] 
> Subject: TC6 classpath problem...
> 
> to get apps to run we have to list the entire contents 
> of $CATALINA_HOME/lib/ as part of the classpath value

Did you know that setting CLASSPATH to anything when starting Tomcat is
a capital offense?

Really, get rid of the CLASSPATH variable; it must not be used with
Tomcat, and should not be used with any Java environment beyond 1.0.
The Tomcat startup scripts take care of establishing the necessary
paths.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org