File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/process Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,13 @@ private var idCounter: Long = 0
74
74
private fun EngineProcessModel.setup (kryoHelper : KryoHelper , watchdog : IdleWatchdog , realProtocol : IProtocol ) {
75
75
val model = this
76
76
watchdog.measureTimeForActiveCall(setupUtContext, " UtContext setup" ) { params ->
77
- // we use parent classloader with null to disable autoload classes from system classloader
77
+ // - We use `ClassLoader.getSystemClassLoader().parent` as parent to let
78
+ // classes like `javax.sql.DataSource` load from URLs like `jrt:/java.sql`.
79
+ // - We do not use `ClassLoader.getSystemClassLoader()` itself to avoid utbot dependencies like Jackson
80
+ // being used instead of user's dependencies, which is important, since they may have different versions.
78
81
UtContext .setUtContext(UtContext (URLClassLoader (params.classpathForUrlsClassloader.map {
79
82
File (it).toURI().toURL()
80
- }.toTypedArray(), null )))
83
+ }.toTypedArray(), ClassLoader .getSystemClassLoader().parent )))
81
84
}
82
85
watchdog.measureTimeForActiveCall(getSpringBeanDefinitions, " Getting Spring bean definitions" ) { params ->
83
86
try {
You can’t perform that action at this time.
0 commit comments