Search Results

Search found 7 results on 1 pages for 'procrun'.

Page 1/1 | 1 

  • Java Windows Service with Procrun, StopMethod problem

    - by mcdon
    My Java class contains the following methods: public static void main(String[] argv) //start the service public static void stop() //stop the service I'm using Procrun from Apache Commons Daemon to setup the Java class as a Windows Service. I get an error when I try to stop the service "[618 javajni.c] [error] Static method 'void main(String[])' in Class com/caphyon/service/JavaService not found". The problem is I am trying to call the stop method when the service is shutting down, but it appears to override the StopMethod with 'void main(String[])'. Here are the stop and start parameters I am using when setting up the service: prunsrv.exe //US//JavaService --StartClass=com.caphyon.service.JavaService --StartMode=jvm --StartPath="C:\JavaService" prunsrv.exe //US//JavaService --StopClass=com.caphyon.service.JavaService --StopMode=jvm --StopPath="C:\JavaService" --StopMethod="void stop()" How do I set the StopMethod prunsrv will call when shutting down the service?

    Read the article

  • Spring boot JAR as windows service

    - by roblovelock
    I am trying to wrap a spring boot "uber JAR" with procrun. Running the following works as expected: java -jar my.jar I need my spring boot jar to automatically start on windows boot. The nicest solution for this would be to run the jar as a service (same as a standalone tomcat). When I try to run this I am getting "Commons Daemon procrun failed with exit value: 3" Looking at the spring-boot source it looks as if it uses a custom classloader: https://github.com/spring-projects/spring-boot/blob/master/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/JarLauncher.java I also get a "ClassNotFoundException" when trying to run my main method directly. java -cp my.jar my.MainClass Is there a method I can use to run my main method in a spring boot jar (not via JarLauncher)? Has anyone successfully integrated spring-boot with procrun? I am aware of http://wrapper.tanukisoftware.com/. However due to their licence I can't use it. UPDATE I have now managed to start the service using procrun. set SERVICE_NAME=MyService set BASE_DIR=C:\MyService\Path set PR_INSTALL=%BASE_DIR%prunsrv.exe REM Service log configuration set PR_LOGPREFIX=%SERVICE_NAME% set PR_LOGPATH=%BASE_DIR% set PR_STDOUTPUT=%BASE_DIR%stdout.txt set PR_STDERROR=%BASE_DIR%stderr.txt set PR_LOGLEVEL=Error REM Path to java installation set PR_JVM=auto set PR_CLASSPATH=%BASE_DIR%%SERVICE_NAME%.jar REM Startup configuration set PR_STARTUP=auto set PR_STARTIMAGE=c:\Program Files\Java\jre7\bin\java.exe set PR_STARTMODE=exe set PR_STARTPARAMS=-jar#%PR_CLASSPATH% REM Shutdown configuration set PR_STOPMODE=java set PR_STOPCLASS=TODO set PR_STOPMETHOD=stop REM JVM configuration set PR_JVMMS=64 set PR_JVMMX=256 REM Install service %PR_INSTALL% //IS//%SERVICE_NAME% I now just need to workout how to stop the service. I am thinking of doing someting with the spring-boot actuator shutdown JMX Bean. What happens when I stop the service at the moment is; windows fails to stop the service (but marks it as stopped), the service is still running (I can browse to localhost), There is no mention of the process in task manager (Not very good! unless I am being blind).

    Read the article

  • Tomcat on Windows

    - by andrew007
    Hi, I installed Tomcat 6.0.18 on Windows 2003 as a service. I try to set the CATALINA_OPTS environment variable but it seems to be ignored by Tomcat. Do I need to use the Tomcat Service Manager (procrun) instead? Is it normal that if I install Tomcat as a service it doesn't see the enviroment variables but it only wotks with procrun? THANKS

    Read the article

  • tomcat start service NoClassDefFoundError?

    - by mobibob
    I am trying to redeploy my server on a new server with a different DNS and IP address. Therefore, I think my problem is in the configuration to find JAR files. Is there a way to get more detail as to which class is being requested so I can narrow down my problem. Does anyone have any suggested troubleshooting guidance for such problem? BTW - the configuration was working on the original server, and I tried to find all the locations in the files: conf/, worker.properties, server.xml, catalina.policy, web.xml. The jarkarta.log repeats the starting... error initializing ... forever. Very boring, therefore, the problem has to be fundamental. Apparently, the error message is recorded in the log across more than one line and would be this: Error occurred during initialization of VM java/lang/NoClassDefFoundError : java/lang/Object [2012-05-21 18:20:33] [info] Procrun (2.0.4.0) started [2012-05-21 18:20:33] [info] Running Service... [2012-05-21 18:20:33] [info] Starting service... [2012-05-21 18:20:33] [info] Error occurred during initialization of VM [2012-05-21 18:20:33] [info] java/lang/NoClassDefFoundError [2012-05-21 18:20:33] [info] : java/lang/Object [2012-05-21 18:21:59] [info] Procrun (2.0.4.0) started [2012-05-21 18:21:59] [info] Running Service... [2012-05-21 18:21:59] [info] Starting service... [2012-05-21 18:21:59] [info] Error occurred during initialization of VM [2012-05-21 18:21:59] [info] java/lang/NoClassDefFoundError [2012-05-21 18:21:59] [info] : java/lang/Object [2012-05-21 18:35:16] [info] Procrun (2.0.4.0) started [2012-05-21 18:35:16] [info] Running Service... [2012-05-21 18:35:16] [info] Starting service... [2012-05-21 18:35:16] [info] Error occurred during initialization of VM [2012-05-21 18:35:16] [info] java/lang/NoClassDefFoundError [2012-05-21 18:35:16] [info] : java/lang/Object [2012-05-21 18:45:25] [info] Procrun (2.0.4.0) started [2012-05-21 18:45:25] [info] Running Service... [2012-05-21 18:45:25] [info] Starting service... [2012-05-21 18:45:25] [info] Error occurred during initialization of VM [2012-05-21 18:45:25] [info] java/lang/NoClassDefFoundError [2012-05-21 18:45:25] [info] : java/lang/Object [2012-05-21 18:46:29] [info] Procrun (2.0.4.0) started [2012-05-21 18:46:29] [info] Running Service... [2012-05-21 18:46:29] [info] Starting service... [2012-05-21 18:46:29] [info] Error occurred during initialization of VM [2012-05-21 18:46:29] [info] java/lang/NoClassDefFoundError

    Read the article

  • Tomcat 6.0 service does not start: java/lang/NoClassDefFoundError

    - by James Lawruk
    I installed Tomcat on my Windows XP PC. But I can't get it to start. I start the service and I see the progress bar, but it fails. I installed the Java Runtime Environment Version 6 and created JRE_HOME Environment variable. (C:\Program Files\Java\jre6) Any ideas? Thanks. Below is the jakarta_serviceYYYMMDD.log entries: [2010-04-08 14:22:42] [info] Commons Daemon procrun (1.0.2.0) started [2010-04-08 14:22:42] [info] Running Service... [2010-04-08 14:22:42] [info] Starting service... [2010-04-08 14:22:42] [info] Error occurred during initialization of VM [2010-04-08 14:22:42] [info] java/lang/NoClassDefFoundError [2010-04-08 14:22:42] [info] : java/lang/Object

    Read the article

  • Tomcat on Windows x64 using 32-bit JDK

    - by Erik
    Hoping someone can help. The rub: I can't get Tomcat 5.5 to start as a windows service on 64-bit windows using a 32-bit JDK. the details: I've been running Tomcat 5.5 on Windows Server 2008 (x64) as a service for some time using a 64-bit JDK. I'm being forced to install a 32-bit JDK on this 64-bit machine so I can make use of the Java JAI libraries (no 64-bit JAI version). I have to run Tomcat using this 32-bit JDK. I can run Tomcat using the 32-bit JDK if I start it using /bin/startup.bat Problem is, it will not start as a windows service. I'm using the Tomcat bundled procrun executables. Has anyone had success starting Tomcat as a service using a 32-bit JDK on a 64-bit machine? Thanks for your expertise.

    Read the article

1