-
Bug
-
Resolution: Done
-
Major
-
8.2.1.Final
-
None
-
Workaround Exists
-
When trying to execute a script over hotrod-client, which puts some data to the cache and returns it, the test fails with the following exception:
java.lang.ClassCastException: [B cannot be cast to java.lang.String at org.infinispan.client.hotrod.ExecTest.testRemoteScriptRemoteExecution(ExecTest.java:122) ...
The test code and javascript code are:
@Test public void testRemoteScriptRemoteExecution() throws IOException { String cacheName = "testRemoteScriptRemoteExecution_REPL_SYNC"; ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); builder.dataContainer().keyEquivalence(new AnyServerEquivalence()).valueEquivalence(new AnyServerEquivalence()).compatibility().enable().marshaller(new GenericJBossMarshaller()); defineInAll(cacheName, builder); try (InputStream is = this.getClass().getResourceAsStream("/test1.js")) { String script = TestingUtil.loadFileAsString(is); clients.get(0).getCache(SCRIPT_CACHE).put("testRemoteScriptRemoteExecution.js", script); } Map<String, String> params = new HashMap<>(); String result = clients.get(0).getCache(cacheName).execute("testRemoteScriptRemoteExecution.js", params); //<- The exception is thrown here while casting to String assertEquals("hoptimus prime", result); assertEquals("hoptimus prime", clients.get(0).getCache(cacheName).get("a")); } //test1.js // mode=local,language=javascript cache.put("a", "hoptimus prime"); cache.get("a");
- is caused by
-
ISPN-6307 Add datatype metadata script parameter for dealing with UTF-8 Strings
-
- Closed
-
- is related to
-
ISPN-6307 Add datatype metadata script parameter for dealing with UTF-8 Strings
-
- Closed
-
- relates to
-
JDG-92 Marshalled value is returned while executing javascript and returning value from cache over HotRod client
-
- Closed
-