ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dma...@apache.org
Subject ignite git commit: ignite-1272: fixing new bugs
Date Wed, 23 Sep 2015 13:53:07 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1272 70b8d3d74 -> 1e8e162e0


ignite-1272: fixing new bugs


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1e8e162e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1e8e162e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1e8e162e

Branch: refs/heads/ignite-1272
Commit: 1e8e162e0e3066fda126d7ca8cfe13c74efad914
Parents: 70b8d3d
Author: Denis Magda <dmagda@gridgain.com>
Authored: Wed Sep 23 16:50:33 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Wed Sep 23 16:50:33 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/PortableContext.java       | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1e8e162e/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index c6b9b51..c7ad2d4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -482,6 +482,25 @@ public class PortableContext implements Externalizable {
             desc = descByCls.get(cls);
         }
         catch (ClassNotFoundException e) {
+            if (userType && !ldr.equals(IgniteUtils.gridClassLoader())) {
+                // Type name can be not registered in a system cache. Try to get from local
map.
+                desc = userTypesMap(ldr).get(typeId);
+
+                if (desc != null)
+                    return desc;
+
+                // Class might have been loaded by default class loader.
+                desc = userTypesMap(IgniteUtils.gridClassLoader()).get(typeId);
+
+                if (desc != null) {
+                    U.log(null, "Unable to load type's class with required class loader.
Using type's class " +
+                        "loaded by system class loader [typeId=" + typeId + ", ldr=" + ldr
+ ", cls=" +
+                        desc.describedClass().getName());
+
+                    return desc;
+                }
+            }
+
             throw new PortableInvalidClassException(e);
         }
         catch (IgniteCheckedException e) {


Mime
View raw message