This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!

Konstantin Dzekov

Greenhorn
+ Follow
since Feb 27, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Konstantin Dzekov

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


1 month ago