Skip to content

Commit 413cc7b

Browse files
committed
[proxima-direct-core] set classloader to thread pool
1 parent 846fc1a commit 413cc7b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

core/src/main/java/cz/o2/proxima/core/util/Classpath.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ public static <T> Class<? extends T> findClass(String name, Class<T> superClass)
6060
}
6161
throw new RuntimeException(
6262
String.format(
63-
"Cannot find class %s using %s", name, Thread.currentThread().getContextClassLoader()));
63+
"Cannot find class %s using %s in thread %s",
64+
name,
65+
Thread.currentThread().getContextClassLoader(),
66+
Thread.currentThread().getName()));
6467
}
6568

6669
@SuppressWarnings("unchecked")

direct/core/src/main/java/cz/o2/proxima/direct/core/DirectDataOperator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ private static Factory<ExecutorService> createExecutorFactory() {
9393
"Error running task in thread {}, bailing out...", thr.getName(), exc);
9494
Runtime.getRuntime().exit(1);
9595
});
96+
t.setContextClassLoader(DirectDataOperator.class.getClassLoader());
9697
return t;
9798
});
9899
}

0 commit comments

Comments
 (0)