I am also getting the error `ScriptEngineManager p...
# datascience
f
I am also getting the error
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider org.jetbrains.kotlin.mainKts.jsr223.KotlinJsr223MainKtsScriptEngineFactory could not be instantiated
in the kernel output which is fairly vague. Is there a way to get a more concrete error?
i
Could you please share a small repro project? It is very likely to be a classpath/shadowing issue, but I don't fully understand how you are trying to use kernel code.
f
Ok, I will do that. Is just the code enough for you or do you need to be able to run the project to test it yourself? The latter requires a bit more work on my side, because my setup for the actual application is also somewhat hacked together
i
I want to see your Gradle/Maven configuration. Runnability will be a good option
Thanks :)
f
Will probably only get around to cleaning this up tomorrow, but I think reducing it to a minimal example that reproduces my expectations should already be helpful for me to understand it. Will poke you when I am done 🙂
I have a minimal setup to illustrate what I would like to support, any preferred way to share?
i
Nice! I think, Github will be OK, maybe private repo, if you wish. My nickname is
ileasile
f
ok, you got an invite
there are some leftover code snippets that aren't necessary, but I think the README should describe everything relevant to reproduce the behavior I would like to change
i
Got your invite, thanks! I'll look at it.
f
I am digging through the kotlin-jupyter right now and I think I have an idea why this is happening if I understand this correctly: The static variables are only set on the class in the context of a specific class loader and the jupyter kernel uses a separate class loader?
The repo I sent you is obsolete now, it was the issue with the class loader after all. I created the PR and would like to discuss merging these or other changes to accommodate this use case
i
Ok, I'll look at this PR later. Thanks 🙂
f
Thank you for your help so far 🙂 The first PoC for what I wanted already works quite well. The actual PR is just ~5-10 lines changed in total, but I have no idea if this is the proper way to do it.
I am currently refactoring this and finding more and more things that will absolutely come back to bite me if I don't do it properly now. So I am still thankful if you checkout the PR later to get a general idea of what I am doing, but I am now fairly sure that the current version is not something I actually want to be merged 😅