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

Errors not reported if mysql insert script fails #13

Open
sheridancbio opened this issue Jul 26, 2016 · 3 comments
Open

Errors not reported if mysql insert script fails #13

sheridancbio opened this issue Jul 26, 2016 · 3 comments

Comments

@sheridancbio
Copy link
Collaborator

when running the init step (java -jar -Xmx7000m target/pdb-alignment-pipeline-0.1.0.jar init) if the import of alignment records fails (for instance if there is no database present or no tables created or if the data does not properly it into the created table schema) no error report is given.

If import fails, an error message must be returned to the user and the application must exit with a non-0 status code.

@sheridancbio
Copy link
Collaborator Author

The failure was due to incorrect username / password in application.properties. After correction the import succeeded. However, the status code returned from the process execution should be checked, and an error message should be output to the user if the mysql program exits with a non-zero status code. [Or .. we should adjust the code to do true database interactions instead of the external .sql scripts]

@juexinwang
Copy link
Collaborator

I also added the exit status ;)

@sheridancbio sheridancbio changed the title Errors not reported if mysql insert script fails Rev2 : Errors not reported if mysql insert script fails Aug 4, 2016
@sheridancbio sheridancbio self-assigned this Aug 4, 2016
@sheridancbio sheridancbio changed the title Rev2 : Errors not reported if mysql insert script fails Errors not reported if mysql insert script fails Aug 12, 2016
@sheridancbio
Copy link
Collaborator Author

Exit status checks are working, but the program is continuing execution after the error is detected.

I modified the database creation script to have an incorrect fieldname in the pdb_ensembl_alignment table. Then I ran:

java -jar -Xmx7000m pdb-alignment-pipeline/target/pdb-alignment-pipeline-0.1.0.jar init

The output is below. An insert script was generated, failed to execute, an error condition was reported on the console and in the log, but the program continued to execute. If the execution of any insert script execution fails, the program should stop at that point, without deleting the insert script or doing any other processing. It should report that it stopped because of an error during <description_of_stage_of_processing>.


2016-08-12 18:05:32 INFO PdbScriptsPipelineMakeSQL:123 - [BLAST] Insert statements after parsing 0th xml : 26706
2016-08-12 18:05:32 INFO CommandProcessUtil:138 - [MYSQL] Running mysql command insert /Users/sheridar/repos/sheridancbio/pdb-annotation/pdb-alignment-pipeline/src/main/resources/pdb.sql...
2016-08-12 18:05:32 INFO CommandProcessUtil:158 - [SHELL] Command mysql completed
2016-08-12 18:05:32 INFO CommandProcessUtil:138 - [MYSQL] Running mysql command insert /Users/sheridar/repos/sheridancbio/pdb-annotation/gsoc_3d_testing/insert_Ensembl.sql...
2016-08-12 18:05:33 INFO CommandProcessUtil:158 - [SHELL] Command mysql completed
2016-08-12 18:05:33 INFO CommandProcessUtil:138 - [MYSQL] Running mysql command insert /Users/sheridar/repos/sheridancbio/pdb-annotation/gsoc_3d_testing/insert.sql.0...
2016-08-12 18:05:33 ERROR CommandProcessUtil:27 - [Process] Process Error in mysql:java.lang.UNIXProcess@159d944f
2016-08-12 18:05:33 ERROR CommandProcessUtil:33 - [Process] Error: 109 121 115 113 108 58 32 91 87 97 114 110 105 110 103 93 32 85 115 105 110 103 32 97 32 112 97 115 115 119 111 114 100 32 111 110 32 116 104 101 32 99 111 109 109 97 110 100 32 108 105 110 101 32 105 110 116 101 114 102 97 99 101 32 99 97 110 32 98 101 32 105 110 115 101 99 117 114
2016-08-12 18:05:33 INFO CommandProcessUtil:158 - [SHELL] Command mysql completed
2016-08-12 18:05:33 INFO PdbScriptsPipelineRunCommand:171 - [PIPELINE] Start cleaning up in filesystem
2016-08-12 18:05:33 INFO CommandProcessUtil:126 - [SHELL] Gzip file from /Users/sheridar/repos/sheridancbio/pdb-annotation/gsoc_3d_testing/insert_Ensembl.sql ...
2016-08-12 18:05:33 INFO CommandProcessUtil:158 - [SHELL] Command gzip completed
2016-08-12 18:05:33 INFO CommandProcessUtil:126 - [SHELL] Gzip file from /Users/sheridar/repos/sheridancbio/pdb-annotation/gsoc_3d_testing/insert.sql.0 ...
2016-08-12 18:05:33 INFO CommandProcessUtil:158 - [SHELL] Command gzip completed
2016-08-12 18:05:33 INFO CommandProcessUtil:147 - [SHELL] Running rm command at/Users/sheridar/repos/sheridancbio/pdb-annotation/gsoc_3d_testing/pdb_seqres_50000.xml.0...
2016-08-12 18:05:33 INFO CommandProcessUtil:158 - [SHELL] Command rm completed
2016-08-12 18:05:33 INFO PdbScriptsPipelineStarter:85 - [Pipeline] Pipeline Successfully Ended. The Execution time is 382.467 seconds

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

3 participants