You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tim Cronin <ti...@outboundengine.com> on 2015/07/02 15:13:32 UTC

JCS Region No longer alive so returning false for key

JCS 1.3

i periodically get the above error.

what do i need to do to recover from this?

Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
thanks for the reply.

looking at trunk there's an added check isDirectory.

On Mon, Jul 6, 2015 at 9:30 AM, sebb <se...@gmail.com> wrote:

> On 6 July 2015 at 15:15, Tim Cronin <ti...@outboundengine.com> 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
> > <http://docs.oracle.com/javase/8/docs/api/java/io/File.html#mkdirs-->.
> the
> > code needs to check if the dir already exists:
> >
> > the function should be as follows:
> >
> >     /**
> >      * Sets the diskPath attribute of the DiskCacheAttributes object
> >      * <p>
> >      * @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 <ti...@outboundengine.com>
> 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 <ti...@outboundengine.com>
> 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 <tv...@apache.org> 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
>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by sebb <se...@gmail.com>.
On 6 July 2015 at 15:15, Tim Cronin <ti...@outboundengine.com> 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
> <http://docs.oracle.com/javase/8/docs/api/java/io/File.html#mkdirs-->. the
> code needs to check if the dir already exists:
>
> the function should be as follows:
>
>     /**
>      * Sets the diskPath attribute of the DiskCacheAttributes object
>      * <p>
>      * @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 <ti...@outboundengine.com> 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 <ti...@outboundengine.com> 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 <tv...@apache.org> 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


Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
yes is see it there, but nothing about it being changed in 2.x.

On Fri, Jul 10, 2015 at 4:12 PM, Thomas Vandahl <tv...@apache.org> wrote:

> On 06.07.15 16:33, Tim Cronin wrote:
> > MaxLifeSeconds has been changed to MaxLife, didn't find anything in the
> > docs about this change.
>
> See http://commons.apache.org/proper/commons-jcs/RegionProperties.html
>
> Bye, Thomas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Thomas Vandahl <tv...@apache.org>.
On 06.07.15 16:33, Tim Cronin wrote:
> MaxLifeSeconds has been changed to MaxLife, didn't find anything in the
> docs about this change.

See http://commons.apache.org/proper/commons-jcs/RegionProperties.html

Bye, Thomas



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


Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
will there be another release cut soon?

how close to non beta release?

On Fri, Jul 10, 2015 at 1:48 AM, Thomas Vandahl <tv...@apache.org> wrote:

> On 06.07.15 17:06, Tim Cronin wrote:
> > I added the following before calling the composite cache shutdown.
> > this should be called via the composite cache shutdown code i think
> >
> >             ThreadPoolManager poolMgr = ThreadPoolManager.getInstance();
> >
> >             for(String poolName : poolMgr.getPoolNames()) {
> >                 try {
> >                     poolMgr.getPool(poolName).shutdown();
> >                 } catch (Throwable t) {
> >                     LOGGER.warn("Failed to close pool " + poolName, t);
> >                 }
> >             }
>
> Thank you for your contributions I'll try to take care of these.
> Please not that these problems also have been present in 1.3.
>
> Bye, Thomas.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Thomas Vandahl <tv...@apache.org>.
On 06.07.15 17:06, Tim Cronin wrote:
> I added the following before calling the composite cache shutdown.
> this should be called via the composite cache shutdown code i think
> 
>             ThreadPoolManager poolMgr = ThreadPoolManager.getInstance();
> 
>             for(String poolName : poolMgr.getPoolNames()) {
>                 try {
>                     poolMgr.getPool(poolName).shutdown();
>                 } catch (Throwable t) {
>                     LOGGER.warn("Failed to close pool " + poolName, t);
>                 }
>             }

Thank you for your contributions I'll try to take care of these.
Please not that these problems also have been present in 1.3.

Bye, Thomas.


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


Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
I added the following before calling the composite cache shutdown.
this should be called via the composite cache shutdown code i think

            ThreadPoolManager poolMgr = ThreadPoolManager.getInstance();

            for(String poolName : poolMgr.getPoolNames()) {
                try {
                    poolMgr.getPool(poolName).shutdown();
                } catch (Throwable t) {
                    LOGGER.warn("Failed to close pool " + poolName, t);
                }
            }


On Mon, Jul 6, 2015 at 9:33 AM, Tim Cronin <ti...@outboundengine.com> wrote:

> MaxLifeSeconds has been changed to MaxLife, didn't find anything in the
> docs about this change.
>
> What is the proper way to shutdown jsc now?
>
> this i how it was recomended to it in 1.3
>             CompositeCacheManager.getInstance().shutDown();
>
> I'm getting the following errors in tomcat when running against 2.0.
>
> 2015-07-06 14:26:21,251 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> appears to have started a thread named [JCS-ThreadPoolManager-Thread-8] but
> has failed to stop it. This is very likely to create a memory leak.
> 2015-07-06 14:26:21,252 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> appears to have started a thread named [JCS-ThreadPoolManager-Thread-9] but
> has failed to stop it. This is very likely to create a memory leak.
> 2015-07-06 14:26:21,252 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> appears to have started a thread named [JCS-ThreadPoolManager-Thread-10]
> but has failed to stop it. This is very likely to create a memory leak.
> 2015-07-06 14:26:21,253 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> appears to have started a thread named [JCS-ThreadPoolManager-Thread-11]
> but has failed to stop it. This is very likely to create a memory leak.
> 2015-07-06 14:26:21,254 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> created a ThreadLocal with key of type
> [org.apache.log4j.helpers.ThreadLocalMap] (value
> [org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
> [java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
> the web application was stopped. Threads are going to be renewed over time
> to try and avoid a probable memory leak.
> 2015-07-06 14:26:21,256 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> created a ThreadLocal with key of type
> [org.apache.log4j.helpers.ThreadLocalMap] (value
> [org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
> [java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
> the web application was stopped. Threads are going to be renewed over time
> to try and avoid a probable memory leak.
> 2015-07-06 14:26:21,257 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> created a ThreadLocal with key of type
> [org.apache.log4j.helpers.ThreadLocalMap] (value
> [org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
> [java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
> the web application was stopped. Threads are going to be renewed over time
> to try and avoid a probable memory leak.
> 2015-07-06 14:26:21,258 [localhost-startStop-2] ERROR
> org.apache.catalina.loader.WebappClassLoader- The web application []
> created a ThreadLocal with key of type
> [org.apache.log4j.helpers.ThreadLocalMap] (value
> [org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
> [java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
> the web application was stopped. Threads are going to be renewed over time
> to try and avoid a probable memory leak.
>
>
> On Mon, Jul 6, 2015 at 9:15 AM, Tim Cronin <ti...@outboundengine.com> 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
>> <http://docs.oracle.com/javase/8/docs/api/java/io/File.html#mkdirs-->.
>> the code needs to check if the dir already exists:
>>
>> the function should be as follows:
>>
>>     /**
>>      * Sets the diskPath attribute of the DiskCacheAttributes object
>>      * <p>
>>      * @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);
>>             }
>>         }
>>     }
>>
>>
>>
>> On Mon, Jul 6, 2015 at 8:37 AM, Tim Cronin <ti...@outboundengine.com>
>> 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 <ti...@outboundengine.com>
>>> 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 <tv...@apache.org> 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
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
MaxLifeSeconds has been changed to MaxLife, didn't find anything in the
docs about this change.

What is the proper way to shutdown jsc now?

this i how it was recomended to it in 1.3
            CompositeCacheManager.getInstance().shutDown();

I'm getting the following errors in tomcat when running against 2.0.

2015-07-06 14:26:21,251 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
appears to have started a thread named [JCS-ThreadPoolManager-Thread-8] but
has failed to stop it. This is very likely to create a memory leak.
2015-07-06 14:26:21,252 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
appears to have started a thread named [JCS-ThreadPoolManager-Thread-9] but
has failed to stop it. This is very likely to create a memory leak.
2015-07-06 14:26:21,252 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
appears to have started a thread named [JCS-ThreadPoolManager-Thread-10]
but has failed to stop it. This is very likely to create a memory leak.
2015-07-06 14:26:21,253 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
appears to have started a thread named [JCS-ThreadPoolManager-Thread-11]
but has failed to stop it. This is very likely to create a memory leak.
2015-07-06 14:26:21,254 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
created a ThreadLocal with key of type
[org.apache.log4j.helpers.ThreadLocalMap] (value
[org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
[java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
the web application was stopped. Threads are going to be renewed over time
to try and avoid a probable memory leak.
2015-07-06 14:26:21,256 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
created a ThreadLocal with key of type
[org.apache.log4j.helpers.ThreadLocalMap] (value
[org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
[java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
the web application was stopped. Threads are going to be renewed over time
to try and avoid a probable memory leak.
2015-07-06 14:26:21,257 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
created a ThreadLocal with key of type
[org.apache.log4j.helpers.ThreadLocalMap] (value
[org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
[java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
the web application was stopped. Threads are going to be renewed over time
to try and avoid a probable memory leak.
2015-07-06 14:26:21,258 [localhost-startStop-2] ERROR
org.apache.catalina.loader.WebappClassLoader- The web application []
created a ThreadLocal with key of type
[org.apache.log4j.helpers.ThreadLocalMap] (value
[org.apache.log4j.helpers.ThreadLocalMap@52378d83]) and a value of type
[java.util.Hashtable] (value [{host=Tim-PC}]) but failed to remove it when
the web application was stopped. Threads are going to be renewed over time
to try and avoid a probable memory leak.


On Mon, Jul 6, 2015 at 9:15 AM, Tim Cronin <ti...@outboundengine.com> 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
> <http://docs.oracle.com/javase/8/docs/api/java/io/File.html#mkdirs-->.
> the code needs to check if the dir already exists:
>
> the function should be as follows:
>
>     /**
>      * Sets the diskPath attribute of the DiskCacheAttributes object
>      * <p>
>      * @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);
>             }
>         }
>     }
>
>
>
> On Mon, Jul 6, 2015 at 8:37 AM, Tim Cronin <ti...@outboundengine.com> 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 <ti...@outboundengine.com>
>> 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 <tv...@apache.org> 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
>>>>
>>>>
>>>
>>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
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
<http://docs.oracle.com/javase/8/docs/api/java/io/File.html#mkdirs-->. the
code needs to check if the dir already exists:

the function should be as follows:

    /**
     * Sets the diskPath attribute of the DiskCacheAttributes object
     * <p>
     * @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);
            }
        }
    }



On Mon, Jul 6, 2015 at 8:37 AM, Tim Cronin <ti...@outboundengine.com> 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 <ti...@outboundengine.com> 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 <tv...@apache.org> 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
>>>
>>>
>>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Thomas Vandahl <tv...@apache.org>.
On 06.07.15 15:37, Tim Cronin wrote:
> is there any documentation on migrating from 1.3 to 2?

Not yet. I started to write something, but I have yet to finish it.

> 
> 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>

Thank you for the hint I will fix this.

Bye, Thomas.



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


Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
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 <ti...@outboundengine.com> 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 <tv...@apache.org> 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
>>
>>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Tim Cronin <ti...@outboundengine.com>.
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 <tv...@apache.org> 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
>
>

Re: [JCS] Region No longer alive so returning false for key

Posted by Thomas Vandahl <tv...@apache.org>.
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