Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D455D182D4 for ; Sat, 8 Aug 2015 16:29:43 +0000 (UTC) Received: (qmail 97877 invoked by uid 500); 8 Aug 2015 16:29:43 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 97755 invoked by uid 500); 8 Aug 2015 16:29:42 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 97737 invoked by uid 99); 8 Aug 2015 16:29:42 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2015 16:29:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 32B5819F0AF for ; Sat, 8 Aug 2015 16:29:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.208 X-Spam-Level: X-Spam-Status: No, score=-1.208 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H2=-1.108, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Yst84V8t5FYO for ; Sat, 8 Aug 2015 16:29:36 +0000 (UTC) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 1764942AFB for ; Sat, 8 Aug 2015 16:29:36 +0000 (UTC) Received: by iodb91 with SMTP id b91so76945081iod.1 for ; Sat, 08 Aug 2015 09:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fFxw+N8cjXc9MeW31wrG8fzKPBN4RuaqPIAfFeXZvaU=; b=V8mcT5RkX61bUyz/vilypEYc9vyLnApEkbJ2A/5/i6apEEcl8h6asE4Tphy1rg0y+o vobHfhHQR650lor8Dia8qgXqg7/LmBA7+GrKXKMOob/CdU9KiBcCjphJgcxSepx0/6mF v+YSmh1k337i8bswWFA0V4tJHou4W7HoHYTcjKJDVkyf7rU4QkFsShEecKTqgmGwRG5r 1ykw7EtwNx7GmSX2EDGD8G+Aeel20fUsHxZnrXMcaRWqI+qQSIXFQf1TjVNhFwaIWIwr Kh21WLWjAmYRgNqayfKecPoOV62hnUL7Si2aTEdx9DOKq4KyfYEZPTDCqJ+lj0O5DlIq pqWQ== MIME-Version: 1.0 X-Received: by 10.107.169.213 with SMTP id f82mr15739074ioj.42.1439051375718; Sat, 08 Aug 2015 09:29:35 -0700 (PDT) Received: by 10.107.136.226 with HTTP; Sat, 8 Aug 2015 09:29:35 -0700 (PDT) In-Reply-To: <55B6C531.2020605@g2ss.com> References: <55B6C531.2020605@g2ss.com> Date: Sat, 8 Aug 2015 17:29:35 +0100 Message-ID: Subject: Re: [daemon] How to daemonize a Java app that has a private default constructor From: sebb To: Commons Users List Content-Type: text/plain; charset=UTF-8 On 28 July 2015 at 00:56, Bill Durant 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-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org