[infinispan-issues] [JBoss JIRA] (ISPN-6303) Exception while executing Map/Reduce task over JavaScript which is called from Jar (Server Task)

Anna Manukyan (JIRA) issues at jboss.org
Wed May 11 10:56:00 EDT 2016


     [ https://issues.jboss.org/browse/ISPN-6303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anna Manukyan updated ISPN-6303:
--------------------------------
    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:

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

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

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

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



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



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list