Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6303

ClassNotFoundException while executing Map/Reduce task over JavaScript which is called from Jar (Server Task)

    XMLWordPrintable

Details

    Description

      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:

      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)
      

      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/testsuite/src/test/java/org/infinispan/server/test/task/DistributedServerTaskIT.java#L187

      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/testsuite/src/test/java/org/infinispan/server/test/task/LocalServerTaskIT.java#L105

      Attachments

        Issue Links

          Activity

            People

              rh-ee-galder Galder ZamarreƱo
              amanukya@redhat.com Anna Manukyan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: