Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find or load main class coursier.bootstrap.launcher.Launcher #1233

Open
swissarthurfreeman opened this issue Aug 11, 2023 · 2 comments

Comments

@swissarthurfreeman
Copy link

Hello,

I'm trying to setup a test jupyterhub with nbgrader instance that uses a scala kernel.
I've been following the instructions and I can't seem to get it to work.
I'm installing almond with the --global option as if it's ommited jupyter kernelspec list does not find the scala kernel.
The installation steps I followed (after downloading the courier file using curl as per the instructions)

jupyter kernelspec list
Available kernels:
  python3    /usr/local/share/jupyter/kernels/python3
gordon@jupyter-playground:~$ sudo ./coursier launch --fork almond -- --install --global
[sudo] password for gordon: 
Installed scala kernel under /usr/local/share/jupyter/kernels/scala
gordon@jupyter-playground:~$ jupyter kernelspec list
Available kernels:
  python3    /usr/local/share/jupyter/kernels/python3
  scala      /usr/local/share/jupyter/kernels/scala

Upon launching a jupyter notebook instance, I do indeed see the scala kernel
image
But after a couple of seconds, I it gets disconnected, the Scala icon disappears and the text goes to 'No Kernel'

Jupyter notebook console I get the error :

[I 2023-08-11 13:00:14.872 ServerApp] 200 GET /user/instructor1/api/sessions?1691751614855 (instructor1@::ffff:127.0.0.1) 2.65ms
[I 2023-08-11 13:00:14.888 ServerApp] 200 GET /user/instructor1/api/kernelspecs?1691751614877 (instructor1@::ffff:127.0.0.1) 3.40ms
Error: Could not find or load main class coursier.bootstrap.launcher.Launcher
Caused by: java.lang.ClassNotFoundException: coursier.bootstrap.launcher.Launcher

Followed by multiple retries until a "Kernel Does not Exist" error is thrown.
I've tried with almond kernel 0.10.0 but had a similar error, instead it was a 'Class almond.ScalaKernel not found' error.

My java version output is :

java -version
openjdk version "11.0.20" 2023-07-18
OpenJDK Runtime Environment (build 11.0.20+8-post-Ubuntu-1ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.20+8-post-Ubuntu-1ubuntu122.04, mixed mode, sharing)

I'm at a loss as to what to do here, any help or ideas would be appreciated.

@octavd
Copy link

octavd commented Sep 8, 2023

Hello,

I am having the same issue here.

LE: @swissarthurfreeman, for me it worked with the following versions of almond 0.13.3 and scala 2.13.10

./coursier launch --fork almond:0.13.3 --scala 2.13.10 -- --install --global
openjdk 17.0.4 2022-07-19
OpenJDK Runtime Environment (build 17.0.4+8-Ubuntu-122.04)
OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-122.04, mixed mode, sharing)

@coreyoconnor
Copy link
Contributor

This is mentioned somewhere but the short version is: Gotta make sure the notebook can actually find the coursier cache.

I used

ENV COURSIER_CACHE=/usr/share/coursier/cache

in a dockerfile to set this.

See related issue: #729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants