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 90AB7188B6 for ; Mon, 6 Jul 2015 15:01:37 +0000 (UTC) Received: (qmail 92780 invoked by uid 500); 6 Jul 2015 15:01:36 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 92647 invoked by uid 500); 6 Jul 2015 15:01:36 -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 92584 invoked by uid 99); 6 Jul 2015 15:01:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2015 15:01:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tim@outboundengine.com designates 209.85.215.49 as permitted sender) Received: from [209.85.215.49] (HELO mail-la0-f49.google.com) (209.85.215.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2015 14:59:23 +0000 Received: by laar3 with SMTP id r3so159083928laa.0 for ; Mon, 06 Jul 2015 08:01:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=8w2Ri2R/camDxHjYwu905x2DodP1bXuZvuHpWmd17cI=; b=eXfD+zd15LXyBFEVvC/pxJJCNrSgaZxjRHdPx1rKU5Tmycp48a6Xj3jeoQwUCcuC3n 2Le8pf+HJSXymVICpOhKZT4V/GQcjOU1+K44brca07y8OPQ3/yyrglBskG+0LlC/cG86 aDL0T9gTHRKpQzghRa6JC/j9D/t0f9KXKtI8hZunLXL9psmQ3aoAZBSxBlkmmGmhrbFq vPpq5fRt6DOFMz373IXe3zemwGIXwwFp+s0wdl/obe/Tb+15EkbrifKtZ1mROZlad2ko ETmIrW7Dy0dJAK4DULOA4kkAEsLIfodQw7Sq4SBDl00M9EY4pIG9oELBrYicR3W/s1+A 8ZtQ== X-Gm-Message-State: ALoCoQkqOnU9TotaiglCLKAA1GKF0+BKWb+aViungfKlZ8Uiw22FphcFS3QEu0DKDCqBVRSnOOxScRmxAuQJU8XibaTsE2IfWeUoM16XPVjb7LOq1qCPAMz+YwMdNmtJMBRRviDHtMOXJVFMOJL7XjePqgwqZUE1XihdZ1s1Zu6uGKKupdKOTydGGA7OFsP0rDhNe+oD+ykifuyIu2vznRQOLfs/54gyzg== MIME-Version: 1.0 X-Received: by 10.112.157.36 with SMTP id wj4mr23270525lbb.115.1436194869640; Mon, 06 Jul 2015 08:01:09 -0700 (PDT) Received: by 10.25.158.129 with HTTP; Mon, 6 Jul 2015 08:01:09 -0700 (PDT) In-Reply-To: References: <55994C5B.6050904@apache.org> Date: Mon, 6 Jul 2015 10:01:09 -0500 Message-ID: Subject: Re: [JCS] Region No longer alive so returning false for key From: Tim Cronin To: Commons Users List Content-Type: multipart/alternative; boundary=001a11c2abc2089def051a362dd7 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2abc2089def051a362dd7 Content-Type: text/plain; charset=UTF-8 thanks for the reply. looking at trunk there's an added check isDirectory. On Mon, Jul 6, 2015 at 9:30 AM, sebb wrote: > On 6 July 2015 at 15:15, Tim Cronin wrote: > > AuxDiskCache is throwing error that it can't create the directory but it > > already exists. > > > > localhost-startStop-1 2015-07-06 14:01:30,006 ERROR > > org.apache.commons.jcs.auxiliary.disk.AbstractDiskCacheAttributes - > Failed > > to create directory C:\java\tomcat\temp\oeserver-cache > > > > I tested mkdirs and it follows what the javadoc says > > . > the > > code needs to check if the dir already exists: > > > > the function should be as follows: > > > > /** > > * Sets the diskPath attribute of the DiskCacheAttributes object > > *

> > * @param diskPath The new diskPath value > > */ > > public void setDiskPath( File diskPath ) > > { > > this.diskPath = diskPath; > > > > if(!this.diskPath.exists()) > > { > > boolean result = this.diskPath.mkdirs(); > > > > if (!result) > > { > > log.error("Failed to create directory " + diskPath); > > } > > } > > } > > That can still theoretically fail if something else creates the > directory in the meantime. > Also exists() will return true for a file as well as a directory. > > Please see: > > https://issues.apache.org/jira/browse/JCI-67 > > > > > > > > > On Mon, Jul 6, 2015 at 8:37 AM, Tim Cronin > wrote: > > > >> is there any documentation on migrating from 1.3 to 2? > >> > >> the JCSAdmin.jsp the FAQ link is broken. moved due to package change > >> < > http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/admin/JCSAdmin.jsp?view=log > > > >> > >> > >> On Mon, Jul 6, 2015 at 7:37 AM, Tim Cronin > wrote: > >> > >>> i understand that 1.3 is old and the 2 branch will be the way going > >>> forward but... > >>> > >>> this happens on our production server and really don't want to run beta > >>> code on it. > >>> > >>> i've played with the beta code and it requires code changes on our side > >>> as well. > >>> > >>> On Sun, Jul 5, 2015 at 10:25 AM, Thomas Vandahl wrote: > >>> > >>>> On 02.07.15 15:13, Tim Cronin wrote: > >>>> > JCS 1.3 > >>>> > > >>>> > i periodically get the above error. > >>>> > > >>>> > what do i need to do to recover from this? > >>>> > > >>>> > >>>> First of all I'd suggest to try out commons-jcs 2.0-beta1. It contains > >>>> numerous fixes and cleans up the lifecycle of most of the JCS manager > >>>> classes. If that doesn't help, come back and ask again as this would > >>>> require deeper digging. > >>>> > >>>> Bye, Thomas. > >>>> > >>>> --------------------------------------------------------------------- > >>>> 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 > > --001a11c2abc2089def051a362dd7--