• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

WebSphere class loading problems for Java application

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic