Apache commons daemon "Failed creating Java" error

37,174

Solution 1

Just come across the same issue. You can resolve this by changing the JVM path to point to the x64 version as it uses the x32 by default

  • In windows right click the application from the system tray and select configure

  • Click Java tab

  • Set the Java Virtual Machine to/ or use the select path button:

    C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll

Solution 2

You can download the commons-deamon-1.0.15-bin-windows binaries, and you can see the folder hierarchy as follows;

  • List item
  • amd64
  • ia64
  • prunsrv.exe
  • prunmgr.exe

On my 64bit machine, i faced the same problem with prunsrv.exe. After some research(apache's website), the solution is using the correct version of prunsrv.exe under the amd64 for 64bit machines. Using amd64/prunsrv.exe worked for me.

Solution 3

Fixed the issue. The 32-bit version of the JRE must be installed since it looks for that registry info. I had the 64-bit version.

Solution 4

This issue usually occurred when we used 64 bit jre with 32 bit ApacheDS. I tried below solution and It worked for me.

  1. Install jre-8u91-windows-i586.exe. It will gets installed on C:\Program Files (x86).
  2. Copy msvcr100.dll and msvcr120.dll files from C:\Program Files (x86)\Java\jre1.8.0_91\bin to C:\Program Files (x86)\apacheds-1.5.0\bin .
  3. Set JAVA_HOME and PATH environment variables:

    JAVA_HOME - C:\Program Files (x86)\Java\jre1.8.0_91

    PATH - C:\Program Files (x86)\Java\jre1.8.0_91\bin.

  4. Go to Java tab in ApacheDS, Uncheck use default checkbox and set JVM to C:\Program Files (x86)\Java\jre1.8.0_91\bin\client\jvm.dll

  5. Start the service.

Solution 5

I had this issue trying to start Apache TC as a service. Fixed it by running TomCatW.exe //MS//, then configuring that from system tray by disabling the Java VM default setting and pointing it to my JRE\Server folder for my 64 bit installation.

Share:
37,174
anom217
Author by

anom217

Updated on December 15, 2021

Comments

  • anom217
    anom217 over 2 years

    I'm trying to start a Windows service using the Apache commons daemon. It works on Windows XP, but I'm trying to run it on Windows 7 x64. It fails to start and I get the following error in the logs:

    [2010-12-13 17:21:19] [info] Commons Daemon procrun (1.0.3.0) started [2010-12-13 17:21:19] [info] Running 'NodeService' Service... [2010-12-13 17:21:19] [info] Starting service... [2010-12-13 17:21:19] [error] Failed creating java [2010-12-13 17:21:19] [error] ServiceStart returned 1 [2010-12-13 17:21:19] [info] Run service finished. [2010-12-13 17:21:19] [info] Commons Daemon procrun finished

    I set the JAVA_HOME and added the java bin to PATH, just to be sure. I'm not sure why it's not starting, or if it has to do with the x64 operating system. It was designed for a 32-bit system originally.