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

Getting a java.lang.NullPointerException when running searchGUI in a container #362

Closed
steve-lefever opened this issue Oct 4, 2023 · 8 comments
Assignees

Comments

@steve-lefever
Copy link

I'm trying to run searchGUI in a docker container on AWS. Since some files need to be written in the searchGUI root folder, searchGUI is intalled in /var/tmp, along side all needed input files:

$ls -l /var/tmp
drwxr-xr-x 2 root root      4096 Oct  4 14:30 19CPTAC_HNSCC_Proteome_JHU_20191003
drwxrwxrwx 4 root root        99 Sep 28 11:45 SearchGUI-4.3.0

$ls -l /var/tmp/19CPTAC_HNSCC_Proteome_JHU_2019100
-rw-r--r-- 1 root root 501859117 Oct  4 10:15 19CPTAC_HNSCC_W_JHU_20191003_LUMOS_f09.mzML
-rw-r--r-- 1 root root 525866806 Oct  4 10:15 19CPTAC_HNSCC_W_JHU_20191003_LUMOS_f10.mzML
-rw-r--r-- 1 root root  38983135 Oct  2 14:32 homo_sapiens_GRCh38.uniprot_smorfeome.fasta
-rw-r--r-- 1 root root     24228 Oct  4 09:28 parameters.par

However, when running the following command from the /var/tmp/SearchGUI-4.3.0 folder

java -cp SearchGUI-4.3.0.jar -Djava.awt.headless=true eu.isas.searchgui.cmd.SearchCLI -spectrum_files /var/tmp/19CPTAC_HNSCC_Proteome_JHU_20191003/ -fasta_file /var/tmp/19CPTAC_HNSCC_Proteome_JHU_20191003/homo_sapiens_GRCh38.uniprot_smorfeome.fasta -output_folder /var/tmp/19CPTAC_HNSCC_Proteome_JHU_20191003/ -id_params /var/tmp/19CPTAC_HNSCC_Proteome_JHU_20191003/parameters.par -comet 1 -msgf 1 -threads 1

I'm getting the following error message

....
[0.250s][info][class,load] java.io.FileWriter source: jrt:/java.base
[0.251s][info][class,load] com.compomics.util.parameters.tools.ProcessingParameters source: file:/var/tmp/SearchGUI-4.3.0/lib/utilities-5.1.3.jar
[0.251s][info][class,load] com.compomics.util.parameters.tools.ProcessingParameters$ProcessingType source: file:/var/tmp/SearchGUI-4.3.0/lib/utilities-5.1.3.jar
[0.251s][info][class,load] com.compomics.util.experiment.identification.identification_parameters.IdentificationParametersFactory source: file:/var/tmp/SearchGUI-4.3.0/lib/utilities-5.1.3.jar
[0.252s][info][class,load] java.lang.Throwable$PrintStreamOrWriter source: jrt:/java.base
[0.252s][info][class,load] java.lang.Throwable$WrappedPrintStream source: jrt:/java.base
java.lang.NullPointerException
        at eu.isas.searchgui.cmd.SearchCLI.<init>(SearchCLI.java:124)
        at eu.isas.searchgui.cmd.SearchCLI.main(SearchCLI.java:314)
[0.252s][info][class,load] java.util.IdentityHashMap$IdentityHashMapIterator source: jrt:/java.base
[0.252s][info][class,load] java.util.IdentityHashMap$KeyIterator source: jrt:/java.base
[0.252s][info][class,load] java.lang.Shutdown source: jrt:/java.base
[0.252s][info][class,load] java.lang.Shutdown$Lock source: jrt:/java.base

I can't seem to find what is causing the error. Any help in trying to resolve it would be greatly appreciated!

Kind regards,
Steve

@hbarsnes hbarsnes self-assigned this Oct 4, 2023
@hbarsnes
Copy link
Member

hbarsnes commented Oct 4, 2023

Hi Steve,

I cannot yet tell you what the underlying problem is, however I found the source of the null pointer (related to the error handling) and have just deployed a new SearchGUI version (v4.3.1) that should fix that specific issue.

So while this new version will not fix the underlying problem, it should at least give you more information about the real source of the problem.

Best regards,
Harald

@steve-lefever
Copy link
Author

Hi Harald,

Thanks! It indeed explains better what the specific problem is. It seems to be related to the config folder. But I saw another issue that might be related to this one (#349), I'll check if that beta version of searchGUI fixes my problem as well.

Kind regards,
Steve

@hbarsnes
Copy link
Member

hbarsnes commented Oct 5, 2023

Hi Steve,

But I saw another issue that might be related to this one (#349), I'll check if that beta version of searchGUI fixes my problem as well.

Note that the most recent release is newer than that particular beta version and thus already includes the given fix.

However, using the Generic temporary folder settings is worth a try. You can use these directly on your SearchCLI command line.

The config_folder option may also help, but as mentioned in the original issue the temp_folder option should be enough.

Best regards,
Harald

@steve-lefever
Copy link
Author

Hi Harald,

Setting the temporary folder doesn't seem to fix the problem.

Am I setting it correctly like this:

        java -Xmx250G -Xms50G -verbose -cp SearchGUI-4.3.1.jar \
        -Djava.awt.headless=true eu.isas.searchgui.cmd.SearchCLI \
        -spectrum_files /var/tmp/{wildcards.sample}/19CPTAC_HNSCC_W_JHU_20191003_LUMOS_f09.mzML \
        -fasta_file  /var/tmp/{wildcards.sample}/homo_sapiens_GRCh38.uniprot_smorfeome.fasta \
        -output_folder /var/tmp/{wildcards.sample}/ \
        -id_params /var/tmp/{wildcards.sample}/parameters.par \
        -comet 1 -msgf 1 \
        -threads 1 \
        -temp_folder /var/tmp/{wildcards.sample}/temp/

@steve-lefever
Copy link
Author

Hi Harald,

Where can I find the searchGUI log file? Is that still in resources/SearchGUI.log in this new version?

Kind regards,
Steve

@hbarsnes
Copy link
Member

hbarsnes commented Oct 5, 2023

Am I setting it correctly like this: [...]

Yes, that looks correct.

Where can I find the searchGUI log file? Is that still in resources/SearchGUI.log in this new version?

Yes, but this should be changed to "/var/tmp/{wildcards.sample}/temp/" if you are using the -temp_folder option as indicated above.

You can also try adding -use_log_folder 0, which would result in the logs and errors simply being written to the standard output.

BTW, what is the current error you are getting after updating to the most recent release and adding the temp_folder option?

@steve-lefever
Copy link
Author

Hi Harald,

I've indeed used -use_log_folder 0, and it seems to run to completion now!

Thanks for all the help,
Steve

@hbarsnes
Copy link
Member

hbarsnes commented Oct 5, 2023

Hi Steve,

Great! I will then close the issue, but please don't hesitate to open a new one if you come across other problems.

Best regards,
Harald

@hbarsnes hbarsnes closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants