saalfeldlab / paintera

GNU General Public License v2.0
99 stars 17 forks source link

NoClassDefFoundError in paintera from conda #398

Closed funkey closed 1 year ago

funkey commented 4 years ago

The current version of paintera in conda (0.23.3) does not seem to work:

~> paintera                                                                                               
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class org.janelia.saalfeldlab.paintera.Paintera2
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

Steps to reproduce:

conda create -n paintera
conda activate paintera
conda install  -c conda-forge paintera
paintera

This is on a Ubuntu 19.10, with the following dependencies already taken care of:

sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
sudo apt-mark hold openjfx libopenjfx-java libopenjfx-jni
igorpisarev commented 4 years ago

This is most likely because of running newer Java (Paintera currently works only with Java 8). @funkey What is your output of java -version? If you have multiple versions of Java installed, please try setting Java 8 as default with sudo update-alternatives --config java.

funkey commented 4 years ago

I was indeed using Java 11. However, even after switching to Java 8 the error persists:

~> java -version                                                                                          
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~19.10-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
~> paintera                                                                                               
Error: Could not find or load main class org.janelia.saalfeldlab.paintera.Paintera2
igorpisarev commented 4 years ago

This seems to be a different error, and I'm not sure what could be wrong here now. Could you try updating Paintera to 0.24.0 that was released just this week? The entry point has changed there, so if the error still persists it would be a bit easier to debug on the most recent release.

cmhulbert commented 2 years ago

@funkey please let me know if this issue persists with the current version. Paintera has changed a lot in terms of how it provides the version of Java that it needs. If it's no longer a problem, I'd love to close this issue.