Re: [jcs] Invalid Class Exception help needed
Hi, thanks for your question. I'm not a JCS expert by any means so I'm not sure the answer to your question but I do have a question myself. What's the reason for wanting to clear the cache in these cases rather than just getting no result back so that you just refresh that value? On Fri, 22 Jan 2021, 07:26 Stuart Maclean, wrote: > I am using JCS 2.2. I am an infrequent user of JCS, so please bear with > me. I have checked the mail list archives for past few years, couldn't > find any answers to this q... > > I have a cache region whose key type is say String and whose value type > is some class C. C is Serializable. > > I use the cache, so objects of class C go into that region. The cache is > backed by disk, so objects of class C end up in files. > > C may then change, such that its serialVersionUID changes. If so, what I > want to happen is that when I do a > > C c = cache.get( "K" ); > > I would like to see the InvalidClassException, so that I can call > > cache.clear() > > and start over with the 'new' C objects. > > But cache.get() doesn't throw such an error. I always get a null result > back, which means I can't distinguish this type of error from a simple > cache miss (key not present), so I can't call the cache.clear(). > > Somewhere in the call stack, JCS is catching the error so that it > doesn't propogate to user code? > > Are there any api calls I can make to set the cache up so that it is > cleared on this type of error? > > Thanks > > Stu > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > >
Re: JCS LateralTCPCacheFactory
Have you tested to see if any of the the TcpListenerPorts are open on your server? If you're on Linux you can try `netstat -l` On Thu, 27 Jul 2017 at 15:52 Russell Sherk wrote: > Hi Greg, > > Don't know much about JCS. Just general Tomcat stuff. > > See if this helps: > http://sentineltechsupport.gemalto.com/2013/10/java-runtime-log-error-could-not-instantiate-auxfactory-named-dc/ > > If not, maybe someone else in the list can help. > > Cheers, > > --Russ > > -Original Message- > From: Greg Parker [mailto:gmparker2...@gmail.com] > Sent: July-27-17 10:07 AM > To: Commons Users List > Subject: Re: JCS LateralTCPCacheFactory > > Thanks Russ, > > So the TcpListenerPort value should match the tomcat port? So if tomcat > is running on port 6080 the cache.ccf on that instance should set > TcpListenerPort=6080? I set things up this way and nothing seems to > complain; however, now I get a SEVERE error on first access and caching is > not working across the three instances. Here are the details: > > SEVERE [ajp-nio-6009-exec-1] > org.apache.commons.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary > Could not instantiate auxiliary cache named "hello". > > jcs.region.hello=LTCP > > jcs.region.hello.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes > jcs.region.hello.cacheattributes.MaxObjects=1000 > > jcs.region.hello.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache > jcs.region.hello.cacheattributes.UseMemoryShrinker=true > jcs.region.hello.cacheattributes.MaxMemoryIdleTimeSeconds=3600 > jcs.region.hello.cacheattributes.ShrinkerIntervalSeconds=60 > jcs.region.hello.cacheattributes.MaxSpoolPerRun=500 > > jcs.region.hello.elementattributes=org.apache.commons.jcs.engine.ElementAttributes > jcs.region.hello.elementattributes.IsEternal=false > > > > jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory > > jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes > jcs.auxiliary.LTCP.attributes.UdpDiscoveryEnabled=false > jcs.auxiliary.LTCP.attributes.AllowGet=true > jcs.auxiliary.LTCP.attributes.Receive=true > jcs.auxiliary.LTCP.attributes.TcpListenerPort=6080 > jcs.auxiliary.LTCP.attributes.TcpServers=localhost:7080,localhost:8080 > > Thanks > > > > > On Jul 27, 2017, at 8:57 AM, Russell Sherk > wrote: > > > > Hi Greg, > > > > Tomcat uses two consecutive ports. The one you specify and the next one > for shutdown. E.g if you specify 8020, the shutdown port by default is 8021. > > > > Try spacing your ports out: 8020, 8022, 8024. > > > > --Russ > > > > > > On Jul 26, 2017 10:11 PM, Greg Parker wrote: > > I'm trying to get a sample cluster of tomcat servers (server A, B and C) > to use a distributed cache. The ‘hello’ cache is configured on each server > with a different TcpListenerPort on each server (8020, 8021, 8022) like > this: > > > > jcs.region.hello=LTCP > > … > > > > jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp > > .LateralTCPCacheFactory > > jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral > > .socket.tcp.TCPLateralCacheAttributes > > jcs.auxiliary.LTCP.attributes.UdpDiscoveryEnabled=false > > jcs.auxiliary.LTCP.attributes.AllowGet=true > > jcs.auxiliary.LTCP.attributes.Receive=true > > jcs.auxiliary.LTCP.attributes.TcpListenerPort=8020 > > jcs.auxiliary.LTCP.attributes.TcpServers=localhost:8020,localhost:8021 > > ,localhost:8022 > > > > > > Server A has a page that sets a value in the cache like this: > > > >cache = JCS.getInstance("hello"); > >cache.put(“message", “Hello from server A"); > > > > > > Server B, and C try to get the value without setting it: > > > >cache = JCS.getInstance("hello"); > >add(new Label("message", "Server B -> cache has : " + > > cache.get(“message");)); > > > > > > The first time I access the page on server A I get an exception - > "Cannot connect to localhost:8021”. If I access the page on each server > then things appear to start communicating; however, the “message” entry > from the “hello” region is set on server A and null on B and C. Sometimes > I see the value on server C displayed properly but never on server B. > > > > With a configuration like this should I expect to see values immediately > distributed to the other servers? > > > > Is there a way I should be bootstrapping the cache when the server > starts? If the servers need to communicate with one another it would seem > to me that they need to be listening long before the first time the server > tries to access the cache. > > > > For performance I would like to use the cache to store serialized XML > data instead of storing it in the session or a database. The data remains > in the cache while the user transforms it through several request cycles. > So during a request cycle the XML data would be retrieved, transformed, and > stored back in the cache. In a cl
Re: [JCS]
The error I got was "Table already exists: JCS_STORE_SHRINK in statement [CREATE CACHED TABLE JCS_STORE_SHRINK]" How about the attached patch instead? Looks like my commit made no difference to the continuum problem :-( On Sat, 6 Feb 2016 at 17:42 Thomas Vandahl wrote: > Hi Mat, > > On 03.02.16 17:44, Mat Jaggard wrote: > > I have three patches that might be helpful... > > > > 1. Javadoc changes to make it compile on my machine > > 2. Server port changes which may (or may not) fix the continuum unit > > test issue > > 3. Change to the way existing tables are detected (I think I got a > > different SQL error code) > > Thanks again for contributing. I applied patches 1 and 2. I'm not so > sure about 3. > The check for SQL state 23000 is quite common. We use the same check in > DB Torque for several different database systems with good success. > What error message did you get? > > Bye, Thomas. > > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > > Index: HsqlSetupTableUtil.java === --- HsqlSetupTableUtil.java (revision 1726611) +++ HsqlSetupTableUtil.java (working copy) @@ -60,7 +60,7 @@ } catch ( SQLException e ) { -if ("23000".equals(e.getSQLState())) +if ("23000".equals(e.getSQLState()) || ("S0001".equals(e.getSQLState()) && e.getErrorCode() == -21)) { newT = false; } Index: JDBCDiskCacheShrinkUnitTest.java === --- JDBCDiskCacheShrinkUnitTest.java (revision 1726611) +++ JDBCDiskCacheShrinkUnitTest.java (working copy) @@ -254,7 +254,7 @@ } catch ( SQLException e ) { -if ("23000".equals(e.getSQLState())) +if ("23000".equals(e.getSQLState()) || ("S0001".equals(e.getSQLState()) && e.getErrorCode() == -21)) { newT = false; } Index: mysql/MySQLDiskCacheHsqlBackedUnitTest.java === --- mysql/MySQLDiskCacheHsqlBackedUnitTest.java (revision 1726611) +++ mysql/MySQLDiskCacheHsqlBackedUnitTest.java (working copy) @@ -207,7 +207,7 @@ } catch ( SQLException e ) { -if ("23000".equals(e.getSQLState())) +if ("23000".equals(e.getSQLState()) || ("S0001".equals(e.getSQLState()) && e.getErrorCode() == -21)) { newT = false; } - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS]
I have three patches that might be helpful... 1. Javadoc changes to make it compile on my machine 2. Server port changes which may (or may not) fix the continuum unit test issue 3. Change to the way existing tables are detected (I think I got a different SQL error code) Many thanks, Mat. On Tue, 2 Feb 2016 at 17:12 Thomas Vandahl wrote: > On 02.02.16 11:22, Mat Jaggard wrote: > > I've submitted my pull request. > > > > https://github.com/apache/commons-jcs/pull/2 > > > > On Mon, 1 Feb 2016 at 16:32 Gary Gregory wrote: > > > >> It is, github is just a mirror. You submit a patch with the Jira if you > >> prefer. > > Thanks for your contribution. How do I merge this into SVN now? I'm not > familiar with github. > > Bye, Thomas > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > > Index: java/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java === --- java/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java (revision 1726611) +++ java/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java (working copy) @@ -46,7 +46,7 @@ /** * These tests startup the remote server and make requests to it. - * + * * * @author Aaron Smuts */ @@ -53,7 +53,9 @@ @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class BasicRemoteCacheClientServerUnitTest extends Assert { -/** +private static final int LOCAL_PORT = 12020; + + /** * Server instance to use in the tests. */ private static RemoteCacheServer server = null; @@ -124,12 +126,12 @@ * Verify that we can start the remote cache server. Send an item to the remote. Verify that the * remote put count goes up. If we go through JCS, the manager will be shared and we will get * into an endless loop. We will use a mock cache manager instead. - * + * * The remote server uses the real JCS. We can verify that items are added to JCS behind the * server by calling get. We cannot access it directly via JCS since it is serialized. - * + * * This test uses a mock injected client to test a normal server. - * + * * * @throws Exception */ @@ -142,7 +144,7 @@ RemoteCacheAttributes attributes = new RemoteCacheAttributes(); attributes.setRemoteLocation("localhost", remotePort); -attributes.setLocalPort(1202); +attributes.setLocalPort(LOCAL_PORT); RemoteCacheManager remoteCacheManager = RemoteCacheFactory.getManager(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); String regionName = "testSinglePut"; @@ -176,7 +178,7 @@ /** * Verify that we can remove an item via the remote server. - * + * * * @throws Exception */ @@ -189,7 +191,7 @@ RemoteCacheAttributes attributes = new RemoteCacheAttributes(); attributes.setRemoteLocation("localhost", remotePort); -attributes.setLocalPort(1202); +attributes.setLocalPort(LOCAL_PORT); MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); @@ -245,7 +247,7 @@ RemoteCacheAttributes attributes = new RemoteCacheAttributes(); attributes.setRemoteLocation("localhost", remotePort); -attributes.setLocalPort(1202); +attributes.setLocalPort(LOCAL_PORT); RemoteCacheManager remoteCacheManager = RemoteCacheFactory.getManager(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); String regionName = "testPutAndListen"; @@ -294,7 +296,7 @@ RemoteCacheAttributes attributes = new RemoteCacheAttributes(); attributes.setRemoteLocation("localhost", remotePort); -attributes.setLocalPort(1202); +attributes.setLocalPort(LOCAL_PORT); RemoteCacheManager remoteCacheManager = RemoteCacheFactory.getManager(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); String regionName = "testPutaMultipleAndListen"; Index: test-conf/TestRemoteCacheClientServer.ccf === --- test-conf/TestRemoteCacheClientServer.ccf (revision 1726611) +++ test-conf/TestRemoteCacheClientServer.ccf (working copy) @@ -18,10 +18,10 @@ # # REMOTE SERVER CONFIG # # Registry used to register and provide the IRmiCacheService service. registry.host=localhost -registry.port=1102 +registry.port=11020 # client callback p
Re: [JCS]
I've submitted my pull request. https://github.com/apache/commons-jcs/pull/2 On Mon, 1 Feb 2016 at 16:32 Gary Gregory wrote: > It is, github is just a mirror. You submit a patch with the Jira if you > prefer. > > Gary > On Feb 1, 2016 8:12 AM, "Mat Jaggard" wrote: > > > Ah, great, I thought JCS was on subversion at > > https://svn.apache.org/repos/asf/commons/proper/jcs/ > > > > On Mon, 1 Feb 2016 at 16:07 Papendieck, Thomas < > > thomas.papendi...@opitz-consulting.com> wrote: > > > > > https://github.com/apache/commons-jcs > > > > > > create an account on github > > > make a fork > > > push your changes > > > initiate a pull request > > > > > > bye > > > Thomas > > > > > > -Ursprüngliche Nachricht- > > > Von: Mat Jaggard [mailto:apa...@jaggard.org.uk] > > > Gesendet: Montag, 1. Februar 2016 16:23 > > > An: Commons Users List > > > Betreff: [JCS] > > > > > > Hi, > > > I have two patches to fix some problems I had running build and unit > > tests > > > on JCS 2.0 - who can I give them to? > > > > > > Thanks, > > > Mat. > > > > > >
Re: [JCS]
Ah, great, I thought JCS was on subversion at https://svn.apache.org/repos/asf/commons/proper/jcs/ On Mon, 1 Feb 2016 at 16:07 Papendieck, Thomas < thomas.papendi...@opitz-consulting.com> wrote: > https://github.com/apache/commons-jcs > > create an account on github > make a fork > push your changes > initiate a pull request > > bye > Thomas > > -----Ursprüngliche Nachricht- > Von: Mat Jaggard [mailto:apa...@jaggard.org.uk] > Gesendet: Montag, 1. Februar 2016 16:23 > An: Commons Users List > Betreff: [JCS] > > Hi, > I have two patches to fix some problems I had running build and unit tests > on JCS 2.0 - who can I give them to? > > Thanks, > Mat. >
[JCS]
Hi, I have two patches to fix some problems I had running build and unit tests on JCS 2.0 - who can I give them to? Thanks, Mat.
Re: Re: [POOL2] Pooling mutable objects
He didn't create his own hash function, he generated it in eclipse. This is better because you get all the testing of other eclipse users without any runtime dependencies. On 6 February 2015 at 16:16, William Speirs wrote: > I'm not sure I understand your comment Mat. From what I can tell, Michael > made his own hash function. That's fine, but *might* have unexpected > collision issues. Might not too... I don't know. My guess though is that > he's not an expert (who is an expert on hash functions?) and might > unknowingly fall into a trap here. > > For example, commons-lang HashBuilder uses 37 as the "prime" and 17 as the > initial result... Michael didn't. Maybe he's OK, maybe he's not... but why > risk it? Why not just use the library and not reinvent the wheel? (Most > valid reason would be not wanting to pull in a whole library for these two > functions/classes.) > > Again, take my advice for what you paid, nothing. :-) > > Bill- > > On Fri, Feb 6, 2015 at 11:06 AM, Mat Jaggard > wrote: > > > William - I'm not sure if you noticed, but they didn't hand-make > anything. > > > > On 6 February 2015 at 16:00, William Speirs wrote: > > > > > Why wouldn't you use the HashCodeBuilder? Much simpler: > > > > > > return new HashCodeBuilder().append(internalId).toHashCode(); > > > > > > Done in 1 line, and probably fewer collisions than your hand-made one. > > Same > > > with the EqualsBuilder... > > > > > > If you don't want the dep on commons-lang, then I can understand... but > > I'd > > > just borrow their internal algo. > > > > > > My $0.02... > > > > > > Bill- > > > > > > On Fri, Feb 6, 2015 at 10:54 AM, Michael Osipov <1983-01...@gmx.net> > > > wrote: > > > > > > > This is what I did: > > > > this.internalId = RandomStringUtils.randomAlphanumeric(8); > > > > > > > > Some Eclipse magic: > > > > @Override > > > > public int hashCode() { > > > > final int prime = 31; > > > > int result = 1; > > > > result = prime * result + ((internalId == null) ? 0 : > > > > internalId.hashCode()); > > > > return result; > > > > } > > > > > > > > @Override > > > > public boolean equals(Object obj) { > > > > if (this == obj) > > > > return true; > > > > if (obj == null) > > > > return false; > > > > if (getClass() != obj.getClass()) > > > > return false; > > > > RawSession other = (RawSession) obj; > > > > if (internalId == null) { > > > > if (other.internalId != null) > > > > return false; > > > > } else if (!internalId.equals(other.internalId)) > > > > return false; > > > > return true; > > > > } > > > > > > > > > Gesendet: Freitag, 06. Februar 2015 um 16:47 Uhr > > > > > Von: "James Carman" > > > > > An: "Commons Users List" > > > > > Betreff: Re: [POOL2] Pooling mutable objects > > > > > > > > > > Or just let your IDE generate the methods. > > > > > > > > > > > > > > > On Fri, Feb 6, 2015 at 9:05 AM, William Speirs > > > > > wrote: > > > > > > I'd think adding a UUID then overriding equals and hashCode would > > do > > > > the > > > > > > trick. To aid you in doing this, commons-lang has EqualsBuilder > [1] > > > and > > > > > > HashCodeBuilder [2], I highly recommend using them. > > > > > > > > > > > > Bill- > > > > > > > > > > > > > > > > > > [1] > > > > > > > > > > > > > > > > https://commons.apache.org/proper/commons-lang/javadocs/api-3.3.2/org/apache/commons/lang3/builder/EqualsBuilder.html > > > > > > > > > > > > [2] > > > > > > > > > > > > > > > > https://commons.apache.org/proper/commons-lang/
Re: Re: [POOL2] Pooling mutable objects
William - I'm not sure if you noticed, but they didn't hand-make anything. On 6 February 2015 at 16:00, William Speirs wrote: > Why wouldn't you use the HashCodeBuilder? Much simpler: > > return new HashCodeBuilder().append(internalId).toHashCode(); > > Done in 1 line, and probably fewer collisions than your hand-made one. Same > with the EqualsBuilder... > > If you don't want the dep on commons-lang, then I can understand... but I'd > just borrow their internal algo. > > My $0.02... > > Bill- > > On Fri, Feb 6, 2015 at 10:54 AM, Michael Osipov <1983-01...@gmx.net> > wrote: > > > This is what I did: > > this.internalId = RandomStringUtils.randomAlphanumeric(8); > > > > Some Eclipse magic: > > @Override > > public int hashCode() { > > final int prime = 31; > > int result = 1; > > result = prime * result + ((internalId == null) ? 0 : > > internalId.hashCode()); > > return result; > > } > > > > @Override > > public boolean equals(Object obj) { > > if (this == obj) > > return true; > > if (obj == null) > > return false; > > if (getClass() != obj.getClass()) > > return false; > > RawSession other = (RawSession) obj; > > if (internalId == null) { > > if (other.internalId != null) > > return false; > > } else if (!internalId.equals(other.internalId)) > > return false; > > return true; > > } > > > > > Gesendet: Freitag, 06. Februar 2015 um 16:47 Uhr > > > Von: "James Carman" > > > An: "Commons Users List" > > > Betreff: Re: [POOL2] Pooling mutable objects > > > > > > Or just let your IDE generate the methods. > > > > > > > > > On Fri, Feb 6, 2015 at 9:05 AM, William Speirs > > wrote: > > > > I'd think adding a UUID then overriding equals and hashCode would do > > the > > > > trick. To aid you in doing this, commons-lang has EqualsBuilder [1] > and > > > > HashCodeBuilder [2], I highly recommend using them. > > > > > > > > Bill- > > > > > > > > > > > > [1] > > > > > > > https://commons.apache.org/proper/commons-lang/javadocs/api-3.3.2/org/apache/commons/lang3/builder/EqualsBuilder.html > > > > > > > > [2] > > > > > > > https://commons.apache.org/proper/commons-lang/javadocs/api-3.3.2/org/apache/commons/lang3/builder/HashCodeBuilder.html > > > > > > > > On Fri, Feb 6, 2015 at 9:00 AM, Michael Osipov <1983-01...@gmx.net> > > wrote: > > > > > > > >> Hi folks, > > > >> > > > >> I am developing a session pool for an HTTP backend which is > requested > > with > > > >> the fabulous HttpClient. > > > >> > > > >> The session object is this: > > > >> > > > >> public class RawSession { > > > >> > > > >> private CookieStore cookieStore; > > > >> private String logId; > > > >> private MutableInt requestId; > > > >> private String clientId; > > > >> private String serverId; > > > >> > > > >> } > > > >> > > > >> There won't be any setters but as you see, the cookie store and > > mutable > > > >> int might change. > > > >> Additionally, I did not implement any custom equals and hashCode > > methods. > > > >> > > > >> I have searched the docs and the found and did not find any clear > > answer > > > >> which says > > > >> that pooled objects have to be immutable. Though, I have found > > POOL-283 > > > >> and POOL-284 which > > > >> led me to the conclusion that this is a problem because the objects > > are > > > >> stored in a map > > > >> which relies on equals and hashCode. > > > >> > > > >> Does this ultimately mean that I have to override equals and > hashCode > > and > > > >> provide some internal, > > > >> immutable value something like a UUID? Alternatively, I could > > retrieve the > > > >> JSESSIONID from the > > > >> cookie store and use this as a unique value. > > > >> > > > >> Thanks, > > > >> > > > >> Michael > > > >> > > > >> > - > > > >> 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 > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > > For additional commands, e-mail: user-h...@commons.apache.org > > > > >
Re: [JCS] Version 2 release
OK, when I get some more time, I'll try to do that. Is there a version 2 of the documentation anywhere? At the moment, most pages seem to apply to version 1. On 8 Feb 2014 16:44, "Thomas Vandahl" wrote: > Gary, > > On 08.02.14 17:34, Gary Gregory wrote: > > Mat, > > > > I would suggest getting familiar with the code base in trunk. Can the > code > > be released as is or are there problems? Should some issues in Jira be > > fixed for this release? > > > > Major releases like a 2.0 from 1.x are the only time APIs can break > binary > > compatibility which means that the package name must change and the Maven > > coords as well. > > > > Does the current code even warrant the 2.0 label or would a 1.x dump be a > > better representation of what is in trunk? > > Rest assured that all these things have been taken care of. The API > *has* changed and the modifications *are* substantial. A look into the > commits of the last two years should show that. > > Mat, > > if you want to help, please check that the build and all tests are > working fine for you. Note that some tests are disabled in the POM as > they seem to be timing sensitive. I did my best to fix these problems, > however. The documentation does not yet reflect the recent API changes. > I'll fix this as soon as I can. > > Bye, Thomas. > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > >
Re: [JCS] Version 2 release
Well I don't have experience with Apache but if you want me to help with testing, I'm happy to do what I can. What would be most helpful? Mat. On 8 Feb 2014 11:38, "Thomas Vandahl" wrote: > On 04.02.14 16:52, Gary Gregory wrote: > > I think the biggest hurdle to releasing [JCS] 2.0 is finding a [Commons] > > committer willing to put in the time to go over the component and act as > > the release manager. > > Well, I'm actually doing what I can. My hesitation partly comes from the > fact that the test results within the Continuum build are not in line > with mine. Any help will be appreciated as this is going to be my first > release within Apache Commons. > > Bye, Thomas. > > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > >
Re: [JCS] Version 2 release
I can't actually see any relevant issues in JIRA. They all seem to either relate to 1.3, be improvements rather than bugs or be an issue with Maven testing rather than the product. Are there any blocking issues or is it just testing time that's preventing 2.0 being released? On 4 February 2014 15:16, Gary Gregory wrote: > I do not think we have a schedule for 2.0. If you want to help push it > out, I suggest you go through the Jira issues and see what you Figo should > be addressed. You can post your ideas here. If you want to provide > patches, make sure you patch trunk and attach different files to Jira > issues. > > Gary > > ---- Original message > From: Mat Jaggard > Date:02/04/2014 06:16 (GMT-05:00) > To: Commons Users List > Subject: [JCS] Version 2 release > > Hi, > Can you tell me when version 2.0 of JCS is likely to be released? What are > the blocking issues? Is there anything I can do to help? > > The main problem for me is using concurrent instead of the Java 5 > equivalent. > > Many thanks, > Mat. >
Re: [JCS] Version 2 release
I can't actually see any relevant issues in JIRA. They all seem to either relate to 1.3, be improvements rather than bugs or be an issue with Maven testing rather than the product. Are there any blocking issues or is it just testing time that's preventing 2.0 being released? On 4 February 2014 15:16, Gary Gregory wrote: > I do not think we have a schedule for 2.0. If you want to help push it > out, I suggest you go through the Jira issues and see what you Figo should > be addressed. You can post your ideas here. If you want to provide > patches, make sure you patch trunk and attach different files to Jira > issues. > > Gary > > ---- Original message > From: Mat Jaggard > Date:02/04/2014 06:16 (GMT-05:00) > To: Commons Users List > Subject: [JCS] Version 2 release > > Hi, > Can you tell me when version 2.0 of JCS is likely to be released? What are > the blocking issues? Is there anything I can do to help? > > The main problem for me is using concurrent instead of the Java 5 > equivalent. > > Many thanks, > Mat. >
[JCS] Version 2 release
Hi, Can you tell me when version 2.0 of JCS is likely to be released? What are the blocking issues? Is there anything I can do to help? The main problem for me is using concurrent instead of the Java 5 equivalent. Many thanks, Mat.
Re: [math] Help, how to compile? Thanks a huge
You need to use -classpath when you run java as well as when you run javac. Also, you need to include [math] on your subject line when posting about that module to this list. On 7 January 2013 08:29, George Xu wrote: > Hi, > > Anyone can help? I am new and has difficulty in compiling with the .jar > files. > > I downloaded the .zip file, unzipped and put the 4 .jar files at > c:\Users\herehere. > I wrote a simple test code at the same directory(the current directory, as > above. > .(current directory) is at Environmental Variable, CLASSPATH. But it does > not > compile simply by .>Javac Test.java. > > I compiled with > .>javac -CLASSPATH c:\Users\herehere\xxx.jar Test.java (I explicitly spell > out > xxx and tried all four). The compike passed. But cannot .>java Test, and it > complains java.lang.NoClassDefFoundError. > > Help please, > > > > import > java.util.*; > import > org.apache.commons.math3.*; > public > class Test { > public static void main(String[] args) { > System.out.println( > "Hello World!"); // Display the string. > Vector v= > new Vector(); > v.add( > "1");v.add("2");v.add("3");v.add("4");v.add("5"); > v.insertElementAt(v.remove(v.size()-1),0); > int i=0; > while(i System.out.println( > "E @ i:\t"+v.get(i)); > i++; > Acosh a= > new Acosh(); > System.out.println( > "acosh:\t"+a.value(2.5)); > } > } > } >
Re: [Math] Unable to fit a polynomial to data points correctly.
OK, I'm an idiot, please ignore this thread. I will try to plot y = f(x) next time instead of y = f(y') Thank you Gilles for your help. Mat. On 8 August 2012 13:50, Mat Jaggard wrote: > Really? I think I must be missing something. When I plot them in excel > I get the attached results... > > > On 8 August 2012 13:23, Gilles Sadowski wrote: >> On Tue, Aug 07, 2012 at 11:59:09PM +0100, Mat Jaggard wrote: >>> I have tried to create a polynomial that fits some data using the >>> following code: >>> >>> PolynomialFitter fitter = new PolynomialFitter(14, new >>> GaussNewtonOptimizer()); >>> for (int i = 0; i < numValues; i++) >>> { >>> fitter.addObservedPoint(xValues[i], yValues[i]); >>> } >>> return new PolynomialFunction(fitter.fit()); >>> >>> I've also tried using a degree of 4. In both cases and using both a >>> GaussNewtonOptimizer and a LevenbergMarquardtOptimizer, I'm able to >>> get a straight line to be fitted correctly, but the following data >>> results with a constant value but very small multipliers for x, and >>> higher orders. >>> >>> Is anyone able to let me know why this is happening and what I can do about >>> it? >>> >>> Many thanks, >>> Mat. >>> >>> The result I get is... >>> y = 110.281064 + 0.002316943x - 3.86E-09x^2 + 4.01E-15x^3 - 1.58E-21x^4 >>> >>> From this data: >>> >>> [...] >> >> Plotting those data, and the above polynomial shows that Commons Math did a >> decent job. What led you to think that the fit is not correct? >> [Maybe the data could be better fitted with another function...] >> >> >> Regards, >> Gilles >> >> - >> 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
Re: [Math] Unable to fit a polynomial to data points correctly.
Really? I think I must be missing something. When I plot them in excel I get the attached results... On 8 August 2012 13:23, Gilles Sadowski wrote: > On Tue, Aug 07, 2012 at 11:59:09PM +0100, Mat Jaggard wrote: >> I have tried to create a polynomial that fits some data using the >> following code: >> >> PolynomialFitter fitter = new PolynomialFitter(14, new >> GaussNewtonOptimizer()); >> for (int i = 0; i < numValues; i++) >> { >> fitter.addObservedPoint(xValues[i], yValues[i]); >> } >> return new PolynomialFunction(fitter.fit()); >> >> I've also tried using a degree of 4. In both cases and using both a >> GaussNewtonOptimizer and a LevenbergMarquardtOptimizer, I'm able to >> get a straight line to be fitted correctly, but the following data >> results with a constant value but very small multipliers for x, and >> higher orders. >> >> Is anyone able to let me know why this is happening and what I can do about >> it? >> >> Many thanks, >> Mat. >> >> The result I get is... >> y = 110.281064 + 0.002316943x - 3.86E-09x^2 + 4.01E-15x^3 - 1.58E-21x^4 >> >> From this data: >> >> [...] > > Plotting those data, and the above polynomial shows that Commons Math did a > decent job. What led you to think that the fit is not correct? > [Maybe the data could be better fitted with another function...] > > > Regards, > Gilles > > - > 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
[Math] Unable to fit a polynomial to data points correctly.
I have tried to create a polynomial that fits some data using the following code: PolynomialFitter fitter = new PolynomialFitter(14, new GaussNewtonOptimizer()); for (int i = 0; i < numValues; i++) { fitter.addObservedPoint(xValues[i], yValues[i]); } return new PolynomialFunction(fitter.fit()); I've also tried using a degree of 4. In both cases and using both a GaussNewtonOptimizer and a LevenbergMarquardtOptimizer, I'm able to get a straight line to be fitted correctly, but the following data results with a constant value but very small multipliers for x, and higher orders. Is anyone able to let me know why this is happening and what I can do about it? Many thanks, Mat. The result I get is... y = 110.281064 + 0.002316943x - 3.86E-09x^2 + 4.01E-15x^3 - 1.58E-21x^4 >From this data: 1 100 2 142 3 174 4 200 5 224 6 245 7 265 8 283 9 300 10 317 11 332 12 347 13 361 14 375 15 388 16 400 17 413 18 425 19 436 20 448 21 459 22 470 23 480 24 490 25 500 26 510 27 520 28 530 29 539 30 548 31 557 32 566 33 575 34 584 35 592 36 600 37 609 38 617 39 625 40 633 41 641 42 649 43 656 44 664 45 671 46 679 47 686 48 693 49 700 50 708 51 715 52 722 53 729 54 735 55 742 56 749 57 755 58 762 59 769 60 775 61 782 62 788 63 794 64 800 65 807 66 813 67 819 68 825 69 831 70 837 71 843 72 849 73 855 74 861 75 867 76 872 77 878 78 884 79 889 80 895 81 900 82 906 83 912 84 917 85 922 86 928 87 933 88 939 89 944 90 949 91 954 92 960 93 965 94 970 95 975 96 980 97 985 98 990 99 995 100 1000