]
Pedro Ruivo updated ISPN-6303:
------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
ClassNotFoundException while executing Map/Reduce task over
JavaScript which is called from Jar (Server Task)
-------------------------------------------------------------------------------------------------------------
Key: ISPN-6303
URL:
https://issues.jboss.org/browse/ISPN-6303
Project: Infinispan
Issue Type: Bug
Components: Server, Tasks, Test Suite - Server
Affects Versions: 8.1.2.Final
Reporter: Anna Manukyan
Assignee: Galder ZamarreƱo
Fix For: 9.0.0.Alpha3, 9.0.0.Final
When trying to execute Map/Reduce task over JavaScript which is called from the Jar Task
deployed on infinispan-server, the following exception is thrown:
{code}
java.lang.ClassNotFoundException: org.infinispan.scripting.utils.JSArrays from [Module
"org.jgroups.extension:main" from local module loader @33e5ccce (finder: local
module finder @5a42bbf4 (roots: /home/amanukya/Documents/Red Hat
Workspace/infinispan/server/integration/testsuite/target/server/node2/modules,/home/amanukya/Documents/Red
Hat
Workspace/infinispan/server/integration/testsuite/target/server/node2/modules/system/layers/base))]
at
org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:343)
at
org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:132)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:118)
at
org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
at
org.infinispan.client.hotrod.impl.operations.ExecuteOperation.executeOperation(ExecuteOperation.java:49)
at
org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.execute(RemoteCacheImpl.java:703)
at
org.infinispan.server.test.task.DistributedServerTaskIT.shouldExecuteMapReduceViaJavaScriptInTask(DistributedServerTaskIT.java:182)
{code}
The thing is that, the org.infinispan.scripting and org.infinispan modules are added as a
dependency to the jar in MANIFEST.MF class, but still it looks for that in
org.jgroups.extension:main module.
If I am adding the infinispan module dependencies in
org.jgroups.extension:main:module.xml , then test passes.
You can find the test here (remove @Ignore annotation):
https://github.com/infinispan/infinispan/blob/master/server/integration/t...
UPDATE:
The exception is thrown in case of 2 node deployment with clustered caches. For 1 node
deployment with local cache, the test passes properly.
The same passing test for LOCAL cache usage is:
https://github.com/infinispan/infinispan/blob/master/server/integration/t...