Permalink
Browse files

explicitly specify parent classloader when loading application

  • Loading branch information...
1 parent 14eea46 commit 91340482d384a9cfb018c217350c01d74e9c8717 @jonnyzzz jonnyzzz committed Mar 13, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/KaraExec/src/server/AppLoader.kt
@@ -64,7 +64,9 @@ class AppLoader(val appConfig : AppConfig) : FileWatchListener {
synchronized(appLock) {
// load the application class
- classLoader = URLClassLoader(buildClasspath())
+ val cp = buildClasspath()
+ logger.debug("Application classpath: " + cp)
+ classLoader = URLClassLoader(cp, javaClass.getClassLoader())
val appClassObject = classLoader?.loadClass("${appConfig.appPackage}.Application")
if (appClassObject == null)
throw RuntimeException("Expected class ${appConfig.appPackage}.Application to be defined")

0 comments on commit 9134048

Please sign in to comment.