We have a situation where we have deployed GridGain 6 as a custom module within our JBoss 7.1.1-Final application server. When run locally, the configuration appears to work and grid jobs are executed by the local node, but when a job is executed on a remote node we get a ClassNotFoundException which appears to indicate that the module code cannot find a class that is contained within the EAR file that is deployed in that instance of JBoss.
Caused by: java.lang.ClassNotFoundException: com.our.company.CustomGridJob from [Module "com.gridgain:main" from local module loader @5e48a0e1 (roots: /path/to/jboss/modules)]
It looks like the GridGain module is attempting to un-marshal the serialized message it receives from the network and is looking for the class to construct to initiate the job that it was sent. When executed locally we assume the serialization/un-marshalling part doesn't happen, so that works.
The class it is looking for is present in the EAR deployed to the server so it would appear to be a classloading visibility issue. Is it possible to make modules 'aware' of code that is deployed to the container? If so, how?
If this isn't possible (and judging by what I've read, I doubt that it is) are there any other alternatives to simply packing GridGain with our EAR deployment in the /lib directory? (Which would really bloat the deployment).
Any advice appreciated.
We eventually resolved this by placing all the GridGain jars in the EAR/lib - the most straightforward deployment, though not the most efficient. When I get some more time I may re-visit re-packing this another way to reduce the size of the deployed application.