From user-return-25053-apmail-commons-user-archive=commons.apache.org@commons.apache.org Mon Sep 27 22:26:58 2010 Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 76662 invoked from network); 27 Sep 2010 22:26:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 22:26:57 -0000 Received: (qmail 37167 invoked by uid 500); 27 Sep 2010 22:26:56 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 36941 invoked by uid 500); 27 Sep 2010 22:26:56 -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 36933 invoked by uid 99); 27 Sep 2010 22:26:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 22:26:55 +0000 X-ASF-Spam-Status: No, hits=4.5 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of Thomas.Rogers@oce.com does not designate 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 22:26:50 +0000 Received: from joe.nabble.com ([192.168.236.151]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1P0M9T-00043H-H4 for user@commons.apache.org; Mon, 27 Sep 2010 15:26:27 -0700 Date: Mon, 27 Sep 2010 15:26:27 -0700 (PDT) From: trags To: user@commons.apache.org Message-ID: <1285626387521-2716337.post@n4.nabble.com> In-Reply-To: <4C9B62D7.9040402@apache.org> References: <1285169475644-2550531.post@n4.nabble.com> <4C9B40C9.3090604@apache.org> <1285250054614-2552082.post@n4.nabble.com> <4C9B62D7.9040402@apache.org> Subject: Re: [daemon] Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19552_17035538.1285626387521" ------=_Part_19552_17035538.1285626387521 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Try with --StartMode=java This has been taking a long time, because the file paths that worked from the command line are not the same as when running as a service. I require my configuration file to be in the current working directory, but now I have several occurances of code like... File configFile = new File(System.getProperty("user.dir") + System.getProperty("file.separator") + "config"); ... urlConfig = configFile.toURI().toURL() This is true even after setting -Duser.dir=C:/MyApp/. For instance, my log4j files are still ending up in C:\Program Files\Java\jdk1.6.0_20\logs\. My config file points to the log4j config file. This first part works. However, in the log4j ini file, I specify that the logs should be placed in ./logs/, and the path this file uses is to the JDK. The good news is only two system properties were found to be significantly different, and therefore added to the ++JvmOptions: -Duser.dir and -Djava.io.tmpdir Thanks for your help, ^TM. Regards, Thomas -- View this message in context: http://apache-commons.680414.n4.nabble.com/daemon-Cannot-instantiate-class-com-sun-jndi-fscontext-RefFSContextFactory-tp2550531p2716337.html Sent from the Commons - User mailing list archive at Nabble.com. ------=_Part_19552_17035538.1285626387521--