Skip to content

IRSA-964: TimeSeries tool: downloading images from selected rows is broken #491

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

Merged
merged 2 commits into from
Nov 13, 2017

Conversation

loitly
Copy link
Contributor

@loitly loitly commented Nov 6, 2017

Additional changes are in ife and firefly_test_data under the same branch.

To test:
http://localhost:8080/firefly/ts.html

  • upload a file to view its time series data.
  • select multiple rows then select "Prepare Download"
  • the images from the selected rows should be downloaded.
    This was not working prior to this PR.

…roken

- Converted code relying on an ipac table file as source of the table data.
- Added unit testing for EmbeddedDbUtil
@loitly loitly requested a review from ejoliet November 6, 2017 23:41
Copy link
Contributor

@ejoliet ejoliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried WISE in Firefly and looks correct.
I've tried WISE in IRSAViewer and same, seems ok.

I've tried PTF and i got an error. PTF needs a 'pfilename' that it gets by calling a IBE search specific for that. I can explain to you. You might want to test and see the error logs in the server.

@ejoliet
Copy link
Contributor

ejoliet commented Nov 8, 2017

Error copied here:

org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select "oid","pfilename","fid","pid","ccdid","ra","dec","ROW_NUM" from data_d61d172152cff0a35c536a80cb9ccf0a where ROW_NUM in (0, 1, 2, 3, 4, 5)]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: pfilename
	at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:111)
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
	at edu.caltech.ipac.firefly.server.db.EmbeddedDbUtil.execQuery(EmbeddedDbUtil.java:181)
	at edu.caltech.ipac.firefly.server.db.EmbeddedDbUtil.getSelectedData(EmbeddedDbUtil.java:242)
	at edu.caltech.ipac.firefly.server.db.EmbeddedDbUtil.getSelectedMappedData(EmbeddedDbUtil.java:262)
	at edu.caltech.ipac.firefly.server.query.lc.PtfFileGroupsProcessor.computeFileGroup(PtfFileGroupsProcessor.java:68)
	at edu.caltech.ipac.firefly.server.query.lc.PtfFileGroupsProcessor.loadData(PtfFileGroupsProcessor.java:42)
	at edu.caltech.ipac.firefly.server.query.FileGroupsProcessor.getData(FileGroupsProcessor.java:48)
	at edu.caltech.ipac.firefly.server.query.FileGroupsProcessor.getData(FileGroupsProcessor.java:33)
	at edu.caltech.ipac.firefly.server.packagedata.PackageMaster$PackagingWorker.work(PackageMaster.java:229)
	at edu.caltech.ipac.firefly.server.query.BackgroundEnv$BackgroundProcessor.run(BackgroundEnv.java:532)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: pfilename
	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
	at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
	at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:443)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
	... 11 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: pfilename
	at org.hsqldb.error.Error.error(Unknown Source)
	at org.hsqldb.error.Error.error(Unknown Source)
	at org.hsqldb.ExpressionColumn.checkColumnsResolved(Unknown Source)
	at org.hsqldb.QueryExpression.resolve(Unknown Source)
	at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
	at org.hsqldb.ParserCommand.compilePart(Unknown Source)
	at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
	at org.hsqldb.Session.executeDirectStatement(Unknown Source)
	at org.hsqldb.Session.execute(Unknown Source)
	... 15 more

@loitly
Copy link
Contributor Author

loitly commented Nov 9, 2017

@ejoliet , fixed PTF download problem. Let me know if this PR is good to merge.

@ejoliet
Copy link
Contributor

ejoliet commented Nov 10, 2017

looks good! Thanks!

@loitly loitly merged commit 238c6fa into dev Nov 13, 2017
@loitly loitly deleted the IRSA-964_download_selected_row branch November 13, 2017 17:04
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

Successfully merging this pull request may close these issues.

2 participants