[JBoss JIRA] (ISPN-6408) ClassCastException while executed javascript returns Integer to js-client
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-6408?page=com.atlassian.jira.plugin.... ]
Work on ISPN-6408 started by Galder Zamarreño.
----------------------------------------------
> ClassCastException while executed javascript returns Integer to js-client
> -------------------------------------------------------------------------
>
> Key: ISPN-6408
> URL: https://issues.jboss.org/browse/ISPN-6408
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Reporter: Anna Manukyan
> Assignee: Galder Zamarreño
> Fix For: 9.0.0.Alpha2, 9.0.0.Final
>
>
> In case if the javascript returns number, the execution of it over js-client, returns the following error:
> {code}
> Message:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> Stacktrace:
> undefined
> The code is:
> // mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.size()
> The verifying test is:
> it('can execute a script remotely to get node address from cacheManager', function(done) {
> Promise.all([client, readFile('spec/utils/test-cacheManager.js')])
> .then(function(vals) {
> var c = vals[0];
> return c.addScript('test-cacheManager.js', vals[1].toString())
> .then(function() { return c; } );
> })
> .then(t.assert(t.exec('test-cacheManager.js'),
> t.toBe(0)))
> .catch(failed(done)).finally(done);
> });
> {code}
> There is no exception on server side. Also please find below the log of the node.js execution:
> {code}
> [2016-03-18 18:10:53.848] [DEBUG] connection - Connecting to 127.0.0.1:11222
> [2016-03-18 18:10:53.849] [DEBUG] connection - Connected to 127.0.0.1:11222
> [2016-03-18 18:10:53.849] [DEBUG] client - Invoke ping(msgId=186)
> [2016-03-18 18:10:53.849] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.849] [TRACE] transport - Write buffer(msgId=186) to 127.0.0.1:11222
> [2016-03-18 18:10:53.852] [TRACE] decoder - Read header(msgId=186): opCode=24, status=6, hasNewTopology=0
> [2016-03-18 18:10:53.852] [TRACE] decoder - Call decode for request(msgId=186)
> [2016-03-18 18:10:53.852] [TRACE] connection - After decoding request(msgId=186), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.852] [TRACE] connection - Complete success for request(msgId=186) with undefined
> [2016-03-18 18:10:53.852] [DEBUG] client - Invoke put(msgId=187,key=>test-cacheManager.js,value=>S// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.size(),opts=undefined)
> [2016-03-18 18:10:53.853] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.853] [TRACE] transport - Write buffer(msgId=187) to 127.0.0.1:11222
> [2016-03-18 18:10:53.854] [TRACE] decoder - Read header(msgId=187): opCode=2, status=6, hasNewTopology=0
> [2016-03-18 18:10:53.854] [TRACE] decoder - Call decode for request(msgId=187)
> [2016-03-18 18:10:53.854] [TRACE] connection - After decoding request(msgId=187), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.854] [TRACE] connection - Complete success for request(msgId=187) with undefined
> [2016-03-18 18:10:53.854] [DEBUG] client - Invoke execute(msgId=188,scriptName=test-cacheManager.js,params=undefined)
> [2016-03-18 18:10:53.855] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.855] [TRACE] transport - Write buffer(msgId=188) to 127.0.0.1:11222
> [2016-03-18 18:10:53.855] [DEBUG] connection - Disconnected from 127.0.0.1:11222
> [2016-03-18 18:10:53.858] [TRACE] decoder - Read header(msgId=188): opCode=80, status=133, hasNewTopology=0
> [2016-03-18 18:10:53.858] [ERROR] decoder - Error decoding body of request(msgId=188): java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> [2016-03-18 18:10:53.859] [TRACE] connection - After decoding request(msgId=188), buffer size is 75, and offset 75
> [2016-03-18 18:10:53.859] [TRACE] connection - Complete failure for request(msgId=188) with java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> [2016-03-18 18:10:53.869] [DEBUG] client - Invoke clear(msgId=189)
> [2016-03-18 18:10:53.869] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.869] [TRACE] transport - Write buffer(msgId=189) to 127.0.0.1:11222
> [2016-03-18 18:10:53.869] [TRACE] decoder - Read header(msgId=189): opCode=20, status=0, hasNewTopology=0
> [2016-03-18 18:10:53.869] [TRACE] decoder - Call decode for request(msgId=189)
> [2016-03-18 18:10:53.869] [TRACE] connection - After decoding request(msgId=189), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.869] [TRACE] connection - Complete success for request(msgId=189) with undefined
> [2016-03-18 18:10:53.878] [DEBUG] connection - Disconnected from 127.0.0.1:11222
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (ISPN-6408) ClassCastException while executed javascript returns Integer to js-client
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-6408?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-6408:
-----------------------------------
Fix Version/s: 9.0.0.Alpha2
9.0.0.Final
> ClassCastException while executed javascript returns Integer to js-client
> -------------------------------------------------------------------------
>
> Key: ISPN-6408
> URL: https://issues.jboss.org/browse/ISPN-6408
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Reporter: Anna Manukyan
> Assignee: Galder Zamarreño
> Fix For: 9.0.0.Alpha2, 9.0.0.Final
>
>
> In case if the javascript returns number, the execution of it over js-client, returns the following error:
> {code}
> Message:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> Stacktrace:
> undefined
> The code is:
> // mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.size()
> The verifying test is:
> it('can execute a script remotely to get node address from cacheManager', function(done) {
> Promise.all([client, readFile('spec/utils/test-cacheManager.js')])
> .then(function(vals) {
> var c = vals[0];
> return c.addScript('test-cacheManager.js', vals[1].toString())
> .then(function() { return c; } );
> })
> .then(t.assert(t.exec('test-cacheManager.js'),
> t.toBe(0)))
> .catch(failed(done)).finally(done);
> });
> {code}
> There is no exception on server side. Also please find below the log of the node.js execution:
> {code}
> [2016-03-18 18:10:53.848] [DEBUG] connection - Connecting to 127.0.0.1:11222
> [2016-03-18 18:10:53.849] [DEBUG] connection - Connected to 127.0.0.1:11222
> [2016-03-18 18:10:53.849] [DEBUG] client - Invoke ping(msgId=186)
> [2016-03-18 18:10:53.849] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.849] [TRACE] transport - Write buffer(msgId=186) to 127.0.0.1:11222
> [2016-03-18 18:10:53.852] [TRACE] decoder - Read header(msgId=186): opCode=24, status=6, hasNewTopology=0
> [2016-03-18 18:10:53.852] [TRACE] decoder - Call decode for request(msgId=186)
> [2016-03-18 18:10:53.852] [TRACE] connection - After decoding request(msgId=186), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.852] [TRACE] connection - Complete success for request(msgId=186) with undefined
> [2016-03-18 18:10:53.852] [DEBUG] client - Invoke put(msgId=187,key=>test-cacheManager.js,value=>S// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.size(),opts=undefined)
> [2016-03-18 18:10:53.853] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.853] [TRACE] transport - Write buffer(msgId=187) to 127.0.0.1:11222
> [2016-03-18 18:10:53.854] [TRACE] decoder - Read header(msgId=187): opCode=2, status=6, hasNewTopology=0
> [2016-03-18 18:10:53.854] [TRACE] decoder - Call decode for request(msgId=187)
> [2016-03-18 18:10:53.854] [TRACE] connection - After decoding request(msgId=187), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.854] [TRACE] connection - Complete success for request(msgId=187) with undefined
> [2016-03-18 18:10:53.854] [DEBUG] client - Invoke execute(msgId=188,scriptName=test-cacheManager.js,params=undefined)
> [2016-03-18 18:10:53.855] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.855] [TRACE] transport - Write buffer(msgId=188) to 127.0.0.1:11222
> [2016-03-18 18:10:53.855] [DEBUG] connection - Disconnected from 127.0.0.1:11222
> [2016-03-18 18:10:53.858] [TRACE] decoder - Read header(msgId=188): opCode=80, status=133, hasNewTopology=0
> [2016-03-18 18:10:53.858] [ERROR] decoder - Error decoding body of request(msgId=188): java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> [2016-03-18 18:10:53.859] [TRACE] connection - After decoding request(msgId=188), buffer size is 75, and offset 75
> [2016-03-18 18:10:53.859] [TRACE] connection - Complete failure for request(msgId=188) with java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> [2016-03-18 18:10:53.869] [DEBUG] client - Invoke clear(msgId=189)
> [2016-03-18 18:10:53.869] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.869] [TRACE] transport - Write buffer(msgId=189) to 127.0.0.1:11222
> [2016-03-18 18:10:53.869] [TRACE] decoder - Read header(msgId=189): opCode=20, status=0, hasNewTopology=0
> [2016-03-18 18:10:53.869] [TRACE] decoder - Call decode for request(msgId=189)
> [2016-03-18 18:10:53.869] [TRACE] connection - After decoding request(msgId=189), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.869] [TRACE] connection - Complete success for request(msgId=189) with undefined
> [2016-03-18 18:10:53.878] [DEBUG] connection - Disconnected from 127.0.0.1:11222
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (ISPN-6507) When Infinispan runs with JCache, CacheLoader does not work even read through is true
by Wayne Wayne (JIRA)
Wayne Wayne created ISPN-6507:
---------------------------------
Summary: When Infinispan runs with JCache, CacheLoader does not work even read through is true
Key: ISPN-6507
URL: https://issues.jboss.org/browse/ISPN-6507
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 7.2.5.Final
Reporter: Wayne Wayne
Fix For: 7.2.6.Final
When Infinispan runs with JCache, we can set read through to true so that the value can be loaded by cache loader. But when the data is loaded and verified expiration, it's always treated as expired.
org.infinispan.persistence.PersistenceUtil.loadAndCheckExpiration:
if (metadata != null && metadata.isExpired(timeService.wallClockTime())) { ...
org.infinispan.jcache.embedded.JCacheInternalMetadata:
public boolean isExpired(long now) {
return expiry > -1 && expiry <= now;
}
Here, the *expiry* is the expiry duration, and *now* is current timestamp. Method *isExpired* always return true.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (ISPN-6504) Try to use the index even if the query matches all entries
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-6504?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-6504:
--------------------------------
Fix Version/s: 9.0.0.Final
> Try to use the index even if the query matches all entries
> ----------------------------------------------------------
>
> Key: ISPN-6504
> URL: https://issues.jboss.org/browse/ISPN-6504
> Project: Infinispan
> Issue Type: Enhancement
> Components: Embedded Querying, Remote Querying
> Affects Versions: 8.2.1.Final, 9.0.0.Alpha1
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 9.0.0.Alpha2, 8.2.2.Final, 9.0.0.Final
>
>
> A DSL query with no filter clauses will match all entries. In this case we currently run a non-indexed query even if the cache is indexed.
> Performance could be improved a bit by using the index if the query has sorting or projections. This should be treated as a special case.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months