IGNITE-2965
Failed to read class name from file on deserialization
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index 32156de..2023a58 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -177,9 +177,9 @@
}
}
catch (IOException e) {
- throw new IgniteCheckedException("Class definition not found. " +
- "Failed to read class name from file [id=" + id +
- ", file=" + file.getAbsolutePath() + ']', e);
+ throw new IgniteCheckedException("Class definition was not found " +
+ "at marshaller cache and local file. " +
+ "[id=" + id + ", file=" + file.getAbsolutePath() + ']');
}
}
finally {
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java
index 482edee..c7aecb4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java
@@ -17,7 +17,7 @@
package org.apache.ignite.internal.processors.cache;
-import java.io.File;
+import java.io.Serializable;
import java.util.concurrent.Callable;
import org.apache.ignite.Ignite;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -141,7 +141,7 @@
static class Job1 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job2();
+ return new Class1();
}
}
@@ -151,7 +151,7 @@
static class Job2 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job3();
+ return new Class2();
}
}
@@ -161,7 +161,7 @@
static class Job3 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job4();
+ return new Class3();
}
}
@@ -171,7 +171,7 @@
static class Job4 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job5();
+ return new Class4();
}
}
@@ -181,7 +181,7 @@
static class Job5 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job6();
+ return new Class5();
}
}
@@ -191,7 +191,7 @@
static class Job6 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job7();
+ return new Class6();
}
}
@@ -201,7 +201,7 @@
static class Job7 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job8();
+ return new Class7();
}
}
@@ -211,7 +211,7 @@
static class Job8 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job9();
+ return new Class8();
}
}
@@ -221,7 +221,7 @@
static class Job9 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job10();
+ return new Class9();
}
}
@@ -231,7 +231,77 @@
static class Job10 implements IgniteCallable {
/** {@inheritDoc} */
@Override public Object call() throws Exception {
- return new Job1();
+ return new Class10();
}
}
+
+ /**
+ *
+ */
+ static class Class1 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class2 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class3 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class4 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class5 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class6 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class7 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class8 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class9 implements Serializable {
+ // No-op.
+ }
+
+ /**
+ *
+ */
+ static class Class10 implements Serializable {
+ // No-op.
+ }
}
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index facdc4f..094558d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -87,6 +87,7 @@
import org.apache.ignite.internal.processors.cache.IgniteStartCacheInTransactionAtomicSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteStartCacheInTransactionSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteSystemCacheOnClientTest;
+import org.apache.ignite.internal.processors.cache.MarshallerCacheJobRunNodeRestartTest;
import org.apache.ignite.internal.processors.cache.distributed.CacheAffinityEarlyTest;
import org.apache.ignite.internal.processors.cache.distributed.CacheGetFutureHangsSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.CacheNoValueClassOnServerNodeTest;
@@ -318,6 +319,8 @@
suite.addTestSuite(IgniteTxCachePrimarySyncTest.class);
suite.addTestSuite(IgniteTxCacheWriteSynchronizationModesMultithreadedTest.class);
+ suite.addTestSuite(MarshallerCacheJobRunNodeRestartTest.class);
+
return suite;
}
}
\ No newline at end of file