-
Notifications
You must be signed in to change notification settings - Fork 9
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
jscripts/java/PEWO_java/dist/PEWO.jar raises java.io.InvalidClassException #10
Comments
Hi, the following line shows that the java version that you used to compile PEWO and on the machine where you run PEWO are different. Basically, a
More generally, I invite you to find threads related to this error to find what is wrong in your java configuration. https://stackoverflow.com/questions/10378855/java-io-invalidclassexception-local-class-incompatible
|
What had happened was shell commands in snakemake workflows did not inherit PEWO conda environment. So any shell command such as "java" or "raxmlHPC-SSE3" in the workflow failed. The first one that failed was "java" because the it called the java command that is not in PEWO conda environment, which has a different version. I fixed this issue with an ad-hoc solution, I added Do you know how to make sure shell calls in snakemake runs on PEWO conda environment ? |
Hi, Do not set an Each time you want to use PEWO, you have to call
This is the basic idea behind virtual environments. You activate/deactivate them to your needs, BEFORE launching an particular pipeline or analysis that requires a particular set or libraries / commands. If you are not familiar with python virtual environments in particular, I recommend this 20 minutes lecture. |
I call snakemake after calling |
In theory snakemake see the same context as those loaded via conda before its execution. Could you try from a fresh conda install ? To verify what goes wrong, you could try the following rapid test. First build a toy example of conda environment.
Then build a very simple rule, paste the following in
And execute in your PEWO environment:
PEWO environment is using python 3, python --version should return python 3.
Now let's see from inside snakemake, targetting specifically the conda 2.7 environment.
I get this:
So my conda install is correct:
Do you manage to reproduce this toy example ? |
Thanks for the example I think we are close to get to the bottom of this.
I am sure in your machine, you would see |
Hi,
The following job fails:
java -cp scripts/java/PEWO_java/dist/PEWO.jar DistanceGenerator_LITE2 /home/balaban/PEWO/examples/1_fast_test_of_accuracy_procedure/run RAPPAS,EPANG,PPLACER &> /home/balaban/PEWO/examples/1_fast_test_of_accuracy_procedure/run/logs/compute_nd.log
with the following exception:
"~/PEWO/examples/1_fast_test_of_accuracy_procedure/run/logs/compute_nd.log" 34L, 2389C 2,1 Top
ARGS: workDir [list_of_tested_software_directories,comma-separated]
example: /path/to/pewo_workdir EPANG,RAPPAS,PPLACER
scripts/java/PEWO_java/dist/PEWO.jar
workDir: /home/balaban/PEWO/examples/1_fast_test_of_accuracy_procedure/run
Loading /home/balaban/PEWO/examples/1_fast_test_of_accuracy_procedure/run/expected_placements.bin
Loading NxIndex
Loading pruningIndex
Loading expected placements
Loading trees
Jan 14, 2021 8:45:06 AM DistanceGenerator_LITE2 main
SEVERE: null
java.io.InvalidClassException: javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = 3742318830738515599, local class serialVersionUID = 4588530037560142483
at java.base/java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:689)
at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1903)
at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1772)
at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1903)
at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1772)
at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1903)
at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1772)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2060)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1594)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:430)
at java.base/java.util.ArrayList.readObject(ArrayList.java:928)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1160)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2216)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2087)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1594)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:430)
at DistanceGenerator_LITE2.main(Unknown Source)
I tried reinstalling PEWO and rebuilding the jar file but it didn't resolve the issue.
The text was updated successfully, but these errors were encountered: