JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
June 03, 2023, 03:57:41 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: NonDelegatingClassLoader problem with Jetty  (Read 1663 times)

Ibereth

  • JPPF Padawan
  • *
  • Posts: 11
NonDelegatingClassLoader problem with Jetty
« on: June 11, 2013, 12:59:49 AM »

Hi, I'm having troubles with the way NonDelegatingClassLoader works inside a Jetty application.
Basically in BaseJPPFClientConnection the NonDelegatingClassLoader is constructed using as a parent the Thread.currentThread().getContextClassLoader(). In my particular scenario this turns out to be a WebAppClassLoader (jetty). The problem is that when BaseJPPFClientConnection.makeHelper tries to create a new instance of SerializationHelperImpl the classloader (NonDelegatingClassLoader) do not have any data to get LoggerFactory (dependency of SerializationHelperImpl) class and delegate to its parent (WebAppClassLoader) and this classloader also do not know about this class but do not delegate to its parent (Launcher$AppClassLoader) and so I get a NoClassDefFoundError.
How should I configure JPPF to avoid this situation?
Thanks...
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: NonDelegatingClassLoader problem with Jetty
« Reply #1 on: June 11, 2013, 06:12:25 AM »

Hello,

If the issue is that LoggerFactory is not found, then adding the SLF4J library to your web app's WEB-INF/lib should resolve the problem. The jar file slf4j-api-1.6.1.jar can be found in any JPPF client, server or node distribution for example.

Can you try this and let us know if it resolves the issue?

Thanks,
-Laurent
Logged

Ibereth

  • JPPF Padawan
  • *
  • Posts: 11
Re: NonDelegatingClassLoader problem with Jetty
« Reply #2 on: June 18, 2013, 12:42:51 AM »

I was able to work-around the problem using: webappcontext.setParentLoaderPriority(true);
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads