an alternative invocation mechanism for unix-daemon-like java code.
Questions tagged [apache-commons-daemon]
62 questions
1
vote
1 answer
Why am I getting the following error with Apache Commons Daemon ( 'specified service does not exist' )?
I'm attempting to run Apache Commons Daemon tool (on Windows 7), and when I double-click on LoggerServicew.exe (which was originally prunmgr.exe in the Apache Deamons folder) , I am getting the following error message :
What is meant by "as an…

Caffeinated
- 11,982
- 40
- 122
- 216
1
vote
3 answers
How can i know if the Daemon was stopped from a different thread
My Daemon create and runs a function on a different thread this function runs many other functions. I want to check before each function if the Daemon was closed and if not then i will perform the function.
How can i know if the Daemon was stopped?

Adi
- 2,074
- 22
- 26
1
vote
3 answers
Config for Tika Windows Service with Apache Commons Daemon
I'm trying to get Tika JAXRS running as a Windows Service using Apache Commons Daemon.
I've got tika-server-1.7.jar from http://tika.apache.org/download.html
I've downloaded v1.0.15 of the Windows binaries for Apache Commons Daemon from…

Snixtor
- 4,239
- 2
- 31
- 54
1
vote
1 answer
How to schedule documents4j server standalone as windows service using procrun?
I have been trying to schedule the documents4j as windows service using procrun for RTF to PDF conversion but it keeps throwing the following error:
com.documents4j.throwables.ConversionInputException: The sent input is invalid
at…

WiseGeek
- 421
- 3
- 6
1
vote
1 answer
Configuration reload with Jakarta Commons Daemon
Using Jakarta Commons Daemon is it possible to have my Java application perform an action (reload a configuration) when a SIGHUP signal is sent to the jsvc process? If not - what are my other options for reloading the configuration with this library…

teabot
- 15,358
- 11
- 64
- 79
1
vote
1 answer
Unit Testing Apache Commons Daemon in Java
Iv researched around and cant seem to find any decent resource to help me JUnit test an apache commons daemon written in Java. I would like to be able to test that when a daemon starts it starts without fail and when it shuts down its shuts down…

user1694873
- 473
- 1
- 11
- 21
1
vote
1 answer
Value of adding commons-daemon to an app
According to the Apache Commons Daemon project:
In case of a system-wide shutdown, the Virtual Machine process may be shut down directly by the operating system without notifying the running server application.
So I'm wondering: what is the value…

IAmYourFaja
- 55,468
- 181
- 466
- 756
0
votes
0 answers
commons daemon - Cannot find any VM in Java Home -Java 11
I am trying to run a daemon service with Java 11 and getting the below error.
Cannot find any VM in Java Home
I verified the java home is set correctly.
I tried to run with Java 8 and I do not run into any issues.
I also tried installing Java 11 JDK…

ht_3535
- 363
- 3
- 9
0
votes
1 answer
Apache Commons Daemon (prunsrv) problems in JDK17
Good morning,
Before JDK17 I had a working setup to use prunsrv in Windows to start a Java app as a service.
Now I tried the same in JDK17 and I got errors. I could make some progress but now I am stuck with the latest error I got:
The system cannot…

Viktor
- 1,325
- 2
- 19
- 41
0
votes
1 answer
"Client" Java Virtual Machine with jsvc
jsvc has a -client option but it isn't available on my system:
/usr/bin/jsvc -help ...
...
-jvm
use a specific Java Virtual Machine. Available JVMs:
'server'
-client
use a client Java Virtual Machine.
…

Johannes Ernst
- 3,072
- 3
- 42
- 56
0
votes
1 answer
Starting Wildfly as a windows service and waiting for start finished
I've been using http://commons.apache.org/proper/commons-daemon/ to create a windows service for the Wildfly startup (using exe mode as proposed in some blogs). The problem is, that the service is immediately marked as running. I have some other…

Jens Popp
- 131
- 1
- 12
0
votes
1 answer
Error "The directory name is invalid." when executing a jar using apache daemon windows service
I am trying to run a simple java jar as a windows service. After creating the service and when trying to start it I get the below error:
ServiceStart returned 5.
The directory name is invalid.
Full Log:
[2019-09-27 14:24:46] [debug] (…

Anand
- 47
- 2
- 7
0
votes
0 answers
Embedded jetty not starting when run as a windows service using Apache daemon
I am trying to run embedded jetty as a windows service using Apache Commons Daemon 1.2.0. I am able to run the embedded jetty jar using java -jar and start the server successfully, however when I try to run the same using Apache Daemon it does not…

Anand
- 47
- 2
- 7
0
votes
0 answers
Procrun (prunsrv.exe) fails to find jvm.dll automatically with JDK 11
Using the latest Apache Commons Daemon 1.2.0 on a Windows machine with JDK 11, it fails to automatically find the jvm.dll file and throws the following error:
( javajni.c:227 ) [ 4588] Invalid RuntimeLib ''
I need to open the properties of the…

Quade
- 1
- 2
0
votes
1 answer
JSVC re-exec requires execution with an absolute or relative path
My Class:
import org.apache.commons.daemon.Daemon;
import org.apache.commons.daemon.DaemonContext;
import org.apache.commons.daemon.DaemonInitException;
public class Main implements Daemon {
public static void main(String[] args) {
…

Shredped
- 1
- 2