Ok, I wrote the complete classpath (more than 20jars) without wildcard and it works. The problem is definitely the wildcard that cannot be used, sigh.
I'm also now reading that there is a recent request on JIRA to implement wildcards: https://issues.apache.org/jira/browse/DAEMON-166. 2010/7/21 sebb <[email protected]> > On 21 July 2010 16:12, Antonio Angelino <[email protected]> > wrote: > > Hello sebbaz, > > > > thank you for your reply. The main class, called using jni from prunsrv, > is > > in "controller.jar" that you can find in classhpath without the use of > > wildcard. > > > >> -Djava.class.path=D:\WORK\ > > > PROJECTS\workspace-comp\controller\target\lib\*;D:\WORK\PROJECTS\workspace-comp\controller\target\controller.jar > > > > If the problem is the classpath wildcard, I should see an error logged > after > > that daemon servirce is started successfully. Am I right? > > Not necessarily. > > Why not try and see what happens if you eliminate the wildcards? > > > -Antonio > > > > > > 2010/7/21 sebb <[email protected]> > > > >> On 21 July 2010 14:17, Antonio Angelino <[email protected]> > >> wrote: > >> > Hello, > >> > > >> > I am writing here because I don't know why service daemon don't find > the > >> > main java class. > >> > > >> > I am using JAVA6 with classpath wildcard and m2eclipse to: > >> > - build my controller.jar > >> > - fill the library jar directory (lib) > >> > - run service daemon > >> > > >> > > >> > I dont understan why if I build a "monolithic jar", merging > >> controller.jar > >> > and all other dependencies (using maven jar-with-dependencies), > service > >> > daemon works flawless. > >> > The Manifest.MF of controller.jar and controller-with-dependencies.jar > >> are > >> > identical. > >> > > >> > > >> > This is the debug log of prunsrv: > >> > > >> > [2010-07-21 15:01:36] [1381 prunsrv.c] [debug] Commons Daemon procrun > log > >> > initialized > >> > [2010-07-21 15:01:36] [info] Commons Daemon procrun (1.0.2.0) started > >> > [2010-07-21 15:01:36] [info] Running Service... > >> > [2010-07-21 15:01:36] [1165 prunsrv.c] [debug] Inside ServiceMain... > >> > [2010-07-21 15:01:36] [info] Starting service... > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[0] > >> > -Dctrl.base=D:\WORK\PROJECTS\workspace-comp\controller\target > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[1] > >> > -Dctrl.home=D:\WORK\PROJECTS\workspace-comp\controller\target > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[2] > >> > > >> > -Djava.endorsed.dirs=D:\WORK\PROJECTS\workspace-comp\controller\target\endorsed > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[3] > >> > > >> > -Dlog4j.configuration=file:/D:\WORK\PROJECTS\workspace-comp\controller\target\conf\log4j.xml > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[4] > >> > > -Djava.io.tmpdir=D:\WORK\PROJECTS\workspace-comp\controller\target\temp > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[5] > >> > > >> > -Djava.class.path=D:\WORK\PROJECTS\workspace-comp\controller\target\lib\*;D:\WORK\PROJECTS\workspace-comp\controller\target\controller.jar > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[6] vfprintf > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[7] -Xms128m > >> > [2010-07-21 15:01:36] [447 javajni.c] [debug] Jvm Option[8] -Xmx256m > >> > [2010-07-21 15:01:37] [602 javajni.c] [error] FindClass > >> > com/comp/controller/App failed > >> > [2010-07-21 15:01:37] [996 prunsrv.c] [error] Failed loading main > >> > com/comp/controller/App class > >> > > >> > D:\WORK\PROJECTS\workspace-comp\controller\target\lib\*;D:\WORK\PROJECTS\workspace-comp\controller\target\controller.jar > >> > [2010-07-21 15:01:37] [1280 prunsrv.c] [error] ServiceStart returned 3 > >> > [2010-07-21 15:01:37] [info] Run service finished. > >> > [2010-07-21 15:01:37] [info] Commons Daemon procrun finished. > >> > > >> > > >> > Why do I receive this error? > >> > >> Probably because Procrun 1.0.2 does not support wildcard classpath > >> definitions. > >> > >> > > >> > Thank you in advance for your help. > >> > > >> > Kind Regards, > >> > > >> > Antonio. > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
