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

Can't execute programme, error with Java #10

Open
jonoave opened this issue Aug 17, 2023 · 4 comments
Open

Can't execute programme, error with Java #10

jonoave opened this issue Aug 17, 2023 · 4 comments

Comments

@jonoave
Copy link

jonoave commented Aug 17, 2023

Hello,

I'm having some trouble trying to execute the wrapper.

I installed mirtrace with mamba (similar to conda) on the cluster, which went fine.

micromamba install -c bioconda mirtrace 

However when I try to run it, I get the following error:

(test_trim_smrnaseq) bash-4.4$ mirtrace
Exception in thread "main" java.lang.NumberFormatException: For input string: "20-internal"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Integer.parseInt(Integer.java:665)
        at java.base/java.lang.Integer.parseInt(Integer.java:781)
        at se.scilifelab.mirtrace.MiRTrace.testJVMVersionOK(MiRTrace.java:119)
        at se.scilifelab.mirtrace.MiRTrace.main(MiRTrace.java:104)

# Java version
(test_trim_smrnaseq) bash-4.4$ java -version
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc..src)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc..src, mixed mode, sharing)

Here's the infomation on the OS of the cluster:

(test_trim_smrnaseq) bash-4.4$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.6 (Ootpa)"

I also tried to install it in my Mac with mamba. Installation went fine, but I still encounter the following error:

(test_mirtrace) junhoe@ddo_evol scrna-denbi % mirtrace                                                               
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at se.scilifelab.mirtrace.MiRTrace.testJVMVersionOK(MiRTrace.java:120)
	at se.scilifelab.mirtrace.MiRTrace.main(MiRTrace.java:104)
	
(test_mirtrace) junhoe@ddo_evol scrna-denbi % java -version
openjdk version "20" 2023-03-21
OpenJDK Runtime Environment Zulu20.28+85-CA (build 20+36)
OpenJDK 64-Bit Server VM Zulu20.28+85-CA (build 20+36, mixed mode, sharing)

This was on MacOS Monterey version 12.6.8

Any idea on the cause of this error or how to resolve it? Thanks!

@kubu4
Copy link

kubu4 commented Oct 26, 2023

Also encountering this same error as @jonoave on Ubuntu 18.04LTS (haven't tested other OS's):

(test_trim_smrnaseq) bash-4.4$ mirtrace
Exception in thread "main" java.lang.NumberFormatException: For input string: "20-internal"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Integer.parseInt(Integer.java:665)
        at java.base/java.lang.Integer.parseInt(Integer.java:781)
        at se.scilifelab.mirtrace.MiRTrace.testJVMVersionOK(MiRTrace.java:119)
        at se.scilifelab.mirtrace.MiRTrace.main(MiRTrace.java:104)

# Java version
(test_trim_smrnaseq) bash-4.4$ java -version
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc..src)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc..src, mixed mode, sharing)

@kubu4
Copy link

kubu4 commented Oct 26, 2023

Ah! Figured it out! The solution is to not activate the conda environment.

Use mirtrace by calling the program directly!

@jonoave
Copy link
Author

jonoave commented Oct 31, 2023

Hi @kubu4 , could you give a bit more details or example on how you got it to work?

If i do not turn on the micromamba environment, it won't even find the executing program.

junhoe@ddo_evol Mancuso_2019 % mirtrace
zsh: command not found: mirtrace

# use which mirtrace, and find the executing program
junhoe@ddo_evol Mancuso_2019 % /Users/junhoe/micromamba/envs/test_mirtrace/bin/mirtrace 
env: python: No such file or directory

Thanks in advance.

@kubu4
Copy link

kubu4 commented Oct 31, 2023

I think the issue you're currently having (env: python: No such file or directory) is related to your system not being able to find Python.

Activate the base conda environment (conda activate) and then try to run mirtrace:

/Users/junhoe/micromamba/envs/test_mirtrace/bin/mirtrace

This post on StackOverflow provides some more insight on how to resolve the problem, if the base conda environment doesn't fix thing...

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

2 participants