java - ClassNotFoundException: stream class checksum mismatch -
my remote (linux) , local (windows) node both use same jdk version 1.7.0_45 , gridgain 6.0.3 , peer-class loading enabled. folowing:
caused by: java.lang.classnotfoundexception: optimized stream class checksum mismatch (is same version of marshalled class present on nodes?) [expected=-3449, actual=7739, cls=class java.io.filedescriptor] @ org.gridgain.grid.marshaller.optimized.gridoptimizedclassresolver.readclass(gridoptimizedclassresolver.java:345) local node console has log:
visor> [20:50:12] local node's library list differs remote node's [20:50:12] <commons-lang-2.6.jar> vs. <not jar or zip file> [20:50:12] <guava-14.0.1.jar> vs. <guava-15.0.jar> [20:50:12] <javax.servlet-api-3.0.1.jar> vs. <servlet-api-2.4.jar> [20:50:12] <jcommander-1.30.jar> vs. <jcommander-1.27.jar> [20:50:12] <log4j-1.2.16.jar> vs. <log4j.jar> [20:50:12] code
public final class gg_helloworld { public static class gridcmd extends command<gridevt> { @override protected void executeimpl() throws commandexception, interruptedexception { final gridconfiguration config = getevent().getconfig(); // task gridcomputetask<string, integer> task = new gridcomputetasksplitadapter<string, integer>() { @notnull @override protected collection<? extends gridcomputejob> split(int gridsize, @notnull string arg) { collection<gridcomputejob> jobs = new linkedlist<>(); (final string word : arg.split(" ")) { jobs.add(new gridcomputejobadapter() { @nullable @override public object execute() { x.println(">>>"); x.println(">>> printing '" + word + "' on node grid job."); x.println(">>>"); // return number of letters in word. return word.length(); } }); } return jobs; } @nullable @override public integer reduce(@notnull list<gridcomputejobresult> results) { return results.size() - 1 + f.sumint(f.<integer>jobresults(results)); } }; try (grid g = g.start(config)) { gridcomputetaskfuture<integer> fut = g.compute().execute(task, "hello grid enabled world!"); // wait task completion. int phraselen = fut.get(); x.println(">>>"); x.println(">>> finished executing grid \"hello world\" example custom task."); x.println(">>> total number of characters in phrase '" + phraselen + "'."); x.println(">>> check nodes output (this node part of grid)."); x.println(">>>"); } catch (gridexception e) { throw new commandexception(e); } } } } the file related code called master node.
looks trying (intentionally or not) send java.io.filedescriptor on network. cannot confirm right now, believe class may platform-specific, checksum mismatch.
on other hand, deserialized file descriptor not valid on remote computer anyway because contains operating system file descriptors/handles. think solution here make sure instances of java.io.filedescriptor not sent remote nodes.
if sending anonymous compute closure, try make static , pass required arguments constructor parameters. way make sure no local variables captured java compiler class.
Comments
Post a Comment