On 28 July 2015 at 00:56, Bill Durant <bdur...@g2ss.com> wrote:
> Greetings:
>
> I have Java application that has a private default constructor in order to
> support the singleton pattern.
>
> When I try to daemonize the application with jsvc, I get the following
> exception:
>
> java.lang.IllegalAccessException: Class
> org.apache.commons.daemon.support.DaemonLoader can not access a member of
> class example.App with modifiers "private"
>     at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:101)
>     at java.lang.Class.newInstance(Class.java:432)
>     at
> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> Cannot load daemon
> Service exit with a return value of 3
>
> Is it not possible to daemonize a Java application that has a private
> default constructor with jsvc?

I would try writing a wrapper (with a public constructor) that creates
the singleton.

> Thanks!
>
> Bill
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to