Hi,
I'm working on
Java application that uses apache-spark library. When running a module in the application that uses this library the application throws an error:
"[24.02.20 09:55:06:769 MEZ] 00000100 SystemOut O 2020-02-24 09:55:06 [ERROR] SparkContext Error initializing SparkContext.
java.lang.Exception: Could not find resource path for Web UI: org/apache/spark/ui/static
at org.apache.spark.ui.JettyUtils$.createStaticHandler(JettyUtils.scala:197) ~[spark-core_2.11-2.3.0.jar:2.3.0]
at org.apache.spark.ui.SparkUI.initialize(SparkUI.scala:68) ~[spark-core_2.11-2.3.0.jar:2.3.0]
at org.apache.spark.ui.SparkUI.<init>(SparkUI.scala:80) ~[spark-core_2.11-2.3.0.jar:2.3.0]"
This happens only when the application is running in WebSphere environment. On
Tomcat it works fine.
By debugging JettyUtils.class (JettyUtils.scala) i realized that the problem is in the class loading because it fails at:
Option var6 = scala.Option..MODULE$.apply(org.apache.spark.util.Utils..MODULE$.getSparkClassLoader().getResource(resourceBase));
Actually it fails to return appropriate class type for var6:
if (var6 instanceof Some) {
...
} else if (scala.None..MODULE$.equals(var6)) {
throw new Exception((new StringBuilder()).append("Could not find resource path for Web UI: ").append(resourceBase).toString());
}
Could someone explain how could i overcome these class-loading issues in WebSphere?
The version i use is 9.0.0.x.
Thanks