• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

WebSphere class loading problems for Java application

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic