File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Tomcat unix daemon can't load jsvc tomcat-juli.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Tomcat unix daemon can Watch "Tomcat unix daemon can New topic
Author

Tomcat unix daemon can't load jsvc tomcat-juli.jar

Joe Sanchez
Greenhorn

Joined: Oct 21, 2010
Posts: 6

Environment:
Tomcat 7.0.2 - running on 32-bit 1 GB ram
java version "1.6.0_21"
Debian 2.6.26-2-686
--
Tomcat directory (manual installation)
/srv/tomcat
/srv/tomcat/bin/tomcat-juli.jar
/srv/tomcat/bin/bootstrap.jar
/srv/tomcat/bin/native/unix/jsvc

All the paths are correctly addressed

EXECUTABLE

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

$DAEMON_HOME/native/unix/jsvc \
-user $TOMCAT_USER \
-debug \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
-wait 10 \
-pidfile $PID_FILE \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap

ERROR

java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:147)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 8 more

Any idea?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

You show a "-cp $CLASSPATH" option, but we can't see what CLASSPATH is. It needs to explicitly include tomcat-juli.jar , and presumably it is not.


[Jess in Action][AskingGoodQuestions]
Joe Sanchez
Greenhorn

Joined: Oct 21, 2010
Posts: 6

I added the classpath, but it was alredy as you told me :S.

Other ideas?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Well, in the CLASSPATH you show, I see an extra "$" before the jar file we're concerned about -- is that really there? That could be the problem.
Joe Sanchez
Greenhorn

Joined: Oct 21, 2010
Posts: 6

That was!! It was blind. Thanks

Now Tomcat is telling me that I don't have /home/jfclere/jakarta-tomcat-connectors/jni/native/.libs

isn't comming with tomcat package?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat unix daemon can't load jsvc tomcat-juli.jar