commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Emmons <iemm...@bbn.com>
Subject [daemon] jsvc won't recognize my entry point class
Date Fri, 01 Mar 2013 21:06:38 GMT
I am trying to use jsvc to launch my program on Ubuntu 12.10 with Java 7:

$ java -version
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

With the -debug flag, jsvc reports that it correctly finds and loads the JVM shared lib:

/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so

At the very end of the log, jsvc reports the following:

Java VM created successfully
Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader
java_init failed

I am not surprised that jsvc can't find DaemonLoader, since I only built the native part of
commons-daemon.  However, I thought I understood from the docs that I didn't need DaemonLoader
if the entry point class on the jsvc command line implemented the magic four methods.  The
public interface of my entry point class looks like this:

public class JettyDaemon {
   public void init(String[] args) { ... }
   public void start() { ... }
   public void stop() { ... }
   public void destroy() { ... }
}

Why does jsvc not load and execute this class directly?  Is there a way to get jsvc to print
diagnostics about the loading process?  Or is it the case that jsvc requires the DaemonLoader
Java class to be available?

Thanks,

Ian
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message