Re: [CSV] Record Separator query
you can extend the formats and set the delimiter that way. https://commons.apache.org/proper/commons-csv/archives/1.2/apidocs/org/apache/commons/csv/CSVFormat.html https://commons.apache.org/proper/commons-csv/archives/1.2/apidocs/org/apache/commons/csv/CSVFormat.html#withDelimiter-char- On Wed, Aug 9, 2017 at 12:51 PM, nitin mahendruwrote: > Hi Gary, > > Thanks for a quick turnaround. We are using the below code to parse our > input csv: > CSVFormat.RFC4180.withIgnoreEmptyLines(true).parse(new > InputStreamReader(this.getStreamIn(), readerCharset)) > > We never tell the parser what line separator to expect and it automatically > figures it out. What I want to know is that is it possible to extract this > knowledge from the CSVParser object returned by the above as to what line > separator it found ? > > -Nitin > > > On Tue, Aug 8, 2017 at 3:23 PM Gary Gregory > wrote: > > > Hi Nitin, > > > > You _tell_ the parser what record separator to use, the parser does not > > tell you. > > > > Gary > > > > > > On Aug 8, 2017 16:13, "nitin mahendru" > wrote: > > > > Hello All, > > > > I am trying to read in a csv file which may be 'crlf' or 'lf' seperated. > > Then I want to change a particular column, say encrypt it and then write > > back a new csv with that updated column. I want to use the same record > > separator as was in the input file. > > > > Is there a way to get the record separator back from the CSVParser > object ? > > I am planning to use the below method to get the writer. > > CSVFormat.RFC4180.withRecordSeparator( > separator).print() > > > > For using the above I need to know the record separator upfront which I > > have no clue about as the Parser object does not expose that detail. > > > > thanks > > > > Nitin > > >
Re: [ANNOUNCE] Apache Commons JCS 2.0-beta-2 Released
doesn't show up in the main maven repo the listings http://mvnrepository.com/artifact/org.apache.commons/commons-jcs-core On Wed, Nov 16, 2016 at 8:54 AM, Thomas Vandahl <t...@apache.org> wrote: > On 16.11.16 14:56, Tim Cronin wrote: > > when will it be accessible via maven/ivy repo? > > It already is: > http://repo1.maven.org/maven2/org/apache/commons/commons- > jcs-core/2.0-beta-2/ > > Bye, Thomas. > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > >
Re: [ANNOUNCE] Apache Commons JCS 2.0-beta-2 Released
when will it be accessible via maven/ivy repo? On Wed, Nov 16, 2016 at 4:16 AM, Thomas Vandahlwrote: > The Apache Commons Team is pleased to announce the availability of: > > Apache Commons JCS 2.0-beta-2 > > Apache Commons JCS is a distributed, versatile caching system. > > The release notes can be reviewed at: > http://www.apache.org/dist/commons/jcs/RELEASE-NOTES.txt > > Distribution packages can be downloaded from: > https://commons.apache.org/proper/commons-jcs/download_jcs.cgi > > When downloading, please verify signatures using the KEYS file available > at: > http://www.apache.org/dist/commons > > Maven artifacts are also available in the central Maven repository: > > http://repo1.maven.org/maven2/org/apache/commons/ > > The Apache Commons Team > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > >
Re: [JCS] Region No longer alive so returning false for key
will there be another release cut soon? how close to non beta release? On Fri, Jul 10, 2015 at 1:48 AM, Thomas Vandahl t...@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-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
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 t...@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-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
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 t...@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-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
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 t...@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 t...@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-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
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 t...@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 t...@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
Re: [JCS] Region No longer alive so returning false for key
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 t...@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 t...@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 t...@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-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
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 t...@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 t...@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 t...@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
Re: [JCS] Region No longer alive so returning false for key
thanks for the reply. looking at trunk there's an added check isDirectory. On Mon, Jul 6, 2015 at 9:30 AM, sebb seb...@gmail.com wrote: On 6 July 2015 at 15:15, Tim Cronin t...@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 t...@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 t...@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 t...@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-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
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: JSC 1.3 thread cleanup
thanks, any eta on release date? On Sun, Jan 25, 2015 at 10:49 AM, Thomas Vandahl t...@apache.org wrote: On 23.01.15 15:16, Tim Cronin wrote: ok, thanks how different is 2 vs. 1.3? First of all it is unreleased as of yet. The main change is the use of the class CacheAccess instead of JCS when using caches. Due to the move to Apache Commons, the package has changed from org.apache.jcs to org.apache.commons.jcs. This will affect existing configuration files. Other than that, your code should continue to work. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JSC 1.3 thread cleanup
ok, thanks how different is 2 vs. 1.3? On Fri, Jan 23, 2015 at 1:31 AM, Thomas Vandahl t...@apache.org wrote: On 22.01.15 17:42, Tim Cronin wrote: I'm getting tomcat errors on shutdown: 2015-01-22 16:41:51,186 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [/api] appears to have started a thread named [ElementEventQueue.QProcessor-1] but has failed to stop it. This is very l ikely to create a memory leak. i tracked it down to org.apache.jcs.engine.control.CompositeCache: /** * EventQueue for handling element events. 1 should be enough for all the regions. Else should * create as needed per region. */ public static IElementEventQueue elementEventQ = new ElementEventQueue( AllRegionQueue ); then calling CompositeCache.elementEventQ.destroy(); but it can be flaky and IMO should be handled via CompositeCacheManager.shutdown(). is there a better way to handle this and do i need to file a bug on this? This has already been fixed in the current trunk. You may check out the code and see if it works. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JSC 1.3 thread cleanup
it's not a tomcat error, it's a JCS resource leak tomcat is showing the error but it's caused by JCS not cleaning up the threads it's creating. On Thu, Jan 22, 2015 at 11:46 AM, sebb seb...@gmail.com wrote: On 22 January 2015 at 16:42, Tim Cronin t...@outboundengine.com wrote: I'm getting tomcat errors on shutdown: This is the Commons User mailing list. Please subscribe to the Tomcat User mailing list and ask there. 2015-01-22 16:41:51,186 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [/api] appears to have started a thread named [ElementEventQueue.QProcessor-1] but has failed to stop it. This is very l ikely to create a memory leak. i tracked it down to org.apache.jcs.engine.control.CompositeCache: /** * EventQueue for handling element events. 1 should be enough for all the regions. Else should * create as needed per region. */ public static IElementEventQueue elementEventQ = new ElementEventQueue( AllRegionQueue ); then calling CompositeCache.elementEventQ.destroy(); but it can be flaky and IMO should be handled via CompositeCacheManager.shutdown(). is there a better way to handle this and do i need to file a bug on this? - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JSC 1.3 thread cleanup
no worries. had to double check myself. On Thu, Jan 22, 2015 at 12:57 PM, sebb seb...@gmail.com wrote: On 22 January 2015 at 18:39, Tim Cronin t...@outboundengine.com wrote: it's not a tomcat error, it's a JCS resource leak OK, sorry. Should have double-checked. tomcat is showing the error but it's caused by JCS not cleaning up the threads it's creating. On Thu, Jan 22, 2015 at 11:46 AM, sebb seb...@gmail.com wrote: On 22 January 2015 at 16:42, Tim Cronin t...@outboundengine.com wrote: I'm getting tomcat errors on shutdown: This is the Commons User mailing list. Please subscribe to the Tomcat User mailing list and ask there. 2015-01-22 16:41:51,186 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [/api] appears to have started a thread named [ElementEventQueue.QProcessor-1] but has failed to stop it. This is very l ikely to create a memory leak. i tracked it down to org.apache.jcs.engine.control.CompositeCache: /** * EventQueue for handling element events. 1 should be enough for all the regions. Else should * create as needed per region. */ public static IElementEventQueue elementEventQ = new ElementEventQueue( AllRegionQueue ); then calling CompositeCache.elementEventQ.destroy(); but it can be flaky and IMO should be handled via CompositeCacheManager.shutdown(). is there a better way to handle this and do i need to file a bug on this? - 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
JSC 1.3 thread cleanup
I'm getting tomcat errors on shutdown: 2015-01-22 16:41:51,186 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [/api] appears to have started a thread named [ElementEventQueue.QProcessor-1] but has failed to stop it. This is very l ikely to create a memory leak. i tracked it down to org.apache.jcs.engine.control.CompositeCache: /** * EventQueue for handling element events. 1 should be enough for all the regions. Else should * create as needed per region. */ public static IElementEventQueue elementEventQ = new ElementEventQueue( AllRegionQueue ); then calling CompositeCache.elementEventQ.destroy(); but it can be flaky and IMO should be handled via CompositeCacheManager.shutdown(). is there a better way to handle this and do i need to file a bug on this?
Re: Adding CData to xml property
it seems like your fighting with the API. it will escape special chars for you. On Tue, Jan 6, 2015 at 10:55 AM, jeevi tesh jeevitesh...@gmail.com wrote: Hi, Need to add CDATA into XML Property element, but special character are getting added. Here is my code. Please give your thoughts on the same. Here is the code. String cDataTagStart=\\![CDATA[; String cDataTagEnd=]]\\; credentialsURL =cDataTagStart+credentialsURL+cDataTagEnd; xmlContentOfMetaData = CredentialProvider.*getInstance*(); xmlContentOfMetaData.addProperty(Resource(-1).ResourceName, resourceName); xmlContentOfMetaData.addProperty(Resource.ResourceURL, credentialsURL); But Special characters are getting added ResourceNameTESTRESOURCENAME/ResourceName ResourceURL\lt;![CDATA[TESTCredentialsURLS2]]\gt;/ResourceURL Thanks jeevitesh
Re: [JCS] disk persistence - same conf file, different results
Any ETA on when JCS 2.0 will be released? On Mon, Nov 17, 2014 at 2:07 AM, Thomas Vandahl t...@apache.org wrote: On 14.11.14 19:14, joao tiago a. m. viegas wrote: thank you Thomas, but is there anyway to persist and reload the cache with 1.3? Unfortunately not. Sorry. JCS 1.3 is full of static classes which are not re-initialized properly. I tried to address most of these problems in 2.0, but still a few remain. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org