Re: [daemon] Cannot find daemon loader

2010-11-19 Thread pieter.br...@gmail.com
This is really weird; I figured out the issue.

The jsvc app choked on the name of the jar file.

I put the date the jar file is created between parens and on my dev machine
I tried to start the file directly and it failed. On the production machine
I have a symbolic link with a plain name pointing to the original file, and
it works.

When I renamed the local file and gave it a simple name it worked fine on
the dev machine too. Maybe this should be put in documentation or some kind
of warning that explains the issue should be given as output?

Anyway, thanks all!

On Thu, Nov 18, 2010 at 18:11, Mladen Turk mt...@apache.org wrote:

 On 11/18/2010 02:44 PM, pieter.br...@gmail.com wrote:

 I browsed the fat jar and it contains this:

 - /org/apache/commons/daemon
 - /org/apache/commons/daemon/support/

 The DaemonLoader.class is in the support package.

 The other thing (not sure if this is relevant) is that I don't have a
 class
 that implements the Daemon interface. My class just has methods for init,
 start, stop and destroy.


 You said it works on one box and doesn't on another.
 If that's a case, I doubt it runs by pure luck on the
 first box, so I'd check that other box, cause you must
 have something different.


 Regards

 --
 ^TM

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




-- 
Give a man fire, he will be warm for a night ; set a man on fire and he will
be warm for the rest of his life.


Re: [daemon] Cannot find daemon loader

2010-11-19 Thread sebb
On 19 November 2010 08:55, pieter.br...@gmail.com
pieter.br...@gmail.com wrote:
 This is really weird; I figured out the issue.

 The jsvc app choked on the name of the jar file.

 I put the date the jar file is created between parens and on my dev machine
 I tried to start the file directly and it failed. On the production machine
 I have a symbolic link with a plain name pointing to the original file, and
 it works.

 When I renamed the local file and gave it a simple name it worked fine on
 the dev machine too. Maybe this should be put in documentation or some kind
 of warning that explains the issue should be given as output?

I don't see how this can be an issue with jsvc, because the name with
parentheses was passed to openjdk as part of the classpath. This will
not be handled directly by jsvc.

Seems to me it is either an openjdk issue or a shell quoting issue.

 Anyway, thanks all!

 On Thu, Nov 18, 2010 at 18:11, Mladen Turk mt...@apache.org wrote:

 On 11/18/2010 02:44 PM, pieter.br...@gmail.com wrote:

 I browsed the fat jar and it contains this:

 - /org/apache/commons/daemon
 - /org/apache/commons/daemon/support/

 The DaemonLoader.class is in the support package.

 The other thing (not sure if this is relevant) is that I don't have a
 class
 that implements the Daemon interface. My class just has methods for init,
 start, stop and destroy.


 You said it works on one box and doesn't on another.
 If that's a case, I doubt it runs by pure luck on the
 first box, so I'd check that other box, cause you must
 have something different.


 Regards

 --
 ^TM

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




 --
 Give a man fire, he will be warm for a night ; set a man on fire and he will
 be warm for the rest of his life.


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



Re: [daemon] Cannot find daemon loader

2010-11-18 Thread Mladen Turk

On 11/18/2010 12:09 PM, pieter.br...@gmail.com wrote:

I have an 'uber' jar which contains the jars for all dependencies. On my
server the following command works fine:

sudo jsvc -home /usr/lib/jvm/java-6-openjdk -cp
/avalanche/avalanche-1.0-SNAPSHOT-\(2010-11-18_12\:33\:43\)-jar-with-dependencies.jar
-nodetach -debug -verbose -pidfile /var/run/avalanche.pid avalanche.service

But the same command on my dev box does not work. It fails with the
following messages:

...
[Loaded java.io.IOException from shared objects file]
[Loaded java.util.zip.ZipException from
/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
[Loaded java.security.PrivilegedActionException from shared objects file]
[Loaded java.io.FileNotFoundException from shared objects file]
Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader
java_init failed
Service exit with a return value of 1

I have the /avalanche folder to be:

sudo chmod a+r /avalanche/

but it doesn't change anything.

Does anybody know how to fix this kind of problem?



Seems like your fat .jar doesn't contain commons-daemon.jar
I would double check that.


--
^TM

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



Re: [daemon] Cannot find daemon loader

2010-11-18 Thread pieter.br...@gmail.com
I browsed the fat jar and it contains this:

- /org/apache/commons/daemon
- /org/apache/commons/daemon/support/

The DaemonLoader.class is in the support package.

The other thing (not sure if this is relevant) is that I don't have a class
that implements the Daemon interface. My class just has methods for init,
start, stop and destroy.

P

On Thu, Nov 18, 2010 at 15:38, Mladen Turk mt...@apache.org wrote:

 On 11/18/2010 12:09 PM, pieter.br...@gmail.com wrote:

 I have an 'uber' jar which contains the jars for all dependencies. On my
 server the following command works fine:

 sudo jsvc -home /usr/lib/jvm/java-6-openjdk -cp

 /avalanche/avalanche-1.0-SNAPSHOT-\(2010-11-18_12\:33\:43\)-jar-with-dependencies.jar
 -nodetach -debug -verbose -pidfile /var/run/avalanche.pid
 avalanche.service

 But the same command on my dev box does not work. It fails with the
 following messages:

 ...
 [Loaded java.io.IOException from shared objects file]
 [Loaded java.util.zip.ZipException from
 /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar]
 [Loaded java.security.PrivilegedActionException from shared objects file]
 [Loaded java.io.FileNotFoundException from shared objects file]
 Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader
 java_init failed
 Service exit with a return value of 1

 I have the /avalanche folder to be:

 sudo chmod a+r /avalanche/

 but it doesn't change anything.

 Does anybody know how to fix this kind of problem?


 Seems like your fat .jar doesn't contain commons-daemon.jar
 I would double check that.


 --
 ^TM

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




-- 
Give a man fire, he will be warm for a night ; set a man on fire and he will
be warm for the rest of his life.


Re: [daemon] Cannot find daemon loader

2010-11-18 Thread Mladen Turk

On 11/18/2010 02:44 PM, pieter.br...@gmail.com wrote:

I browsed the fat jar and it contains this:

- /org/apache/commons/daemon
- /org/apache/commons/daemon/support/

The DaemonLoader.class is in the support package.

The other thing (not sure if this is relevant) is that I don't have a class
that implements the Daemon interface. My class just has methods for init,
start, stop and destroy.


You said it works on one box and doesn't on another.
If that's a case, I doubt it runs by pure luck on the
first box, so I'd check that other box, cause you must
have something different.


Regards
--
^TM

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