commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: [daemon]
Date Thu, 17 Jul 2014 17:03:21 GMT
can you display PATH, CLASSPATH and JAVA_HOME please
assume:
PATH folder = folders for all executables?
CLASSPATH folders = contains all classes referenced by main java class..including local folder
e.g. $CLASSPATH = .:$CLASSPATH ?
files that are read are in SAME directory where you executed jsvc.exe ?
JAVA_HOME is set to base folder of JAVA installation ?

what happens when you run the same class using java.exe mypackage.MyClass ?

Martin 
___________________________


> From: Andrew.Martin@exactearth.com
> To: user@commons.apache.org
> Subject: RE: [daemon]
> Date: Thu, 17 Jul 2014 16:42:51 +0000
> 
> The output is identical to what I sent in the last email:
> 
> java.lang.InstantiationException: mypackage.MyClass
>         at java.lang.Class.newInstance(Class.java:359)
>         at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> 17/07/2014 17:39:24 10600 jsvc.exec error: Cannot load daemon
> 17/07/2014 17:39:24 10599 jsvc.exec error: Service exit with a return value of 3
> 
> This is from the error file. Nothing in the stdout file.
> 
> Andrew
> 
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: July-17-14 12:37 PM
> To: Commons Users List
> Subject: RE: [daemon]
> 
> jsvc.exe -outfile stdout.out -errfile stderr.errcat stdout.out cat stderr.err
> 
> report back the results
> Martin
> 
> From: Andrew.Martin@exactearth.com
> To: user@commons.apache.org
> Subject: [daemon]
> Date: Thu, 17 Jul 2014 16:24:14 +0000
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hi,
> 
> I'm trying to run a java daemon using jsvc and the Daemon interface. The java project
is a jar file which has a bunch of dependencies in a manifest file (including commons-daemon),
and I add this jar file to the classpath when running jsvc.
>  When I try to execute via jsvc however, I get this stacktrace in stderr:
> 
> java.lang.InstantiationException: com.mycomany.mypackage.MyClass
>         at java.lang.Class.newInstance(Class.java:359)
>         at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> 17/07/2014 17:03:34 9904 jsvc.exec error: Cannot load daemon
> 17/07/2014 17:03:34 9903 jsvc.exec error: Service exit with a return value of 3
> 
> Where MyClass is the class that I pass into jsvc.
> 
> I have tried using the -verbose option to help diagnose the problem, and with that I
can see in stdout that it loads all the dependencies from the manifest just fine, but no additional
information is provided to help diagnose the problem.
>  Is there a way to get more information about what causes this InstantationException?
> 
> Best,
> Andrew
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Andrew Martin
> 
> 
> Software Engineering Co-op, Software Development | exactEarth Ltd.
> 
> 
> 
> 
> 
> 60 Struck Ct. Cambridge, Ontario N1R 8L2
> 
> 
> office. +1.519.622.4445
> 
> 
> email. Andrew.Martin@exactearth.com
> 
> 
> 
> web. www.exactearth.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This e-mail and any attachment is for authorized use by the intended recipient(s) only.
It contains proprietary or confidential information and is not to be copied, disclosed to,
retained or used by, any other party. If you are not  an intended recipient then please promptly
delete this e-mail, any attachment and all copies and inform the sender. Thank you.
> 
> 
> 
> Andrew Martin
> Software Engineering Co-op, Software Development | exactEarth Ltd.
> 60 Struck Ct. Cambridge, Ontario N1R 8L2
> office. +1.519.622.4445
> email. Andrew.Martin@exactearth.com
> web. <www.exactearth.com>
> 
> 
> This e-mail and any attachment is for authorized use by the intended recipient(s) only.
It contains proprietary or confidential information and is not to be copied, disclosed to,
retained or used by, any other party. If you are not an intended recipient then please promptly
delete this e-mail, any attachment and all copies and inform the sender. Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message