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

Archive fails with error "java.sql.SQLException: Result set after last row" when processing Type #108

Open
joelthill opened this issue Sep 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@joelthill
Copy link

I am trying to archive an oracle database. Processing fails with the following error message:

	  Routine: APLKN_ARCHV_ANLUX.FK_ASLH_PRFG_VE_INHLT_MUSS
	  Type: APLKN_ARCHV_ANLUX.TBS_VRZNG_ENHT
	ERROR [main] 17:24:04,312 ch.admin.bar.siard2.cmd.SiardFromDb Exception while downloading SIARD archive
	java.sql.SQLException: Result set after last row
	        at oracle.jdbc.driver.GeneratedScrollableResultSet.getString(GeneratedScrollableResultSet.java:879) ~[ojdbc6.jar:12.1.0.1.0]
	        at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:1460) ~[ojdbc6.jar:12.1.0.1.0]
	        at ch.admin.bar.siard2.cmd.MetaDataFromDb.createType(MetaDataFromDb.java:366) ~[siardcmd.jar:2.2.13]
	        at ch.admin.bar.siard2.cmd.MetaDataFromDb.getProcedureParameters(MetaDataFromDb.java:443) ~[siardcmd.jar:2.2.13]
	        at ch.admin.bar.siard2.cmd.MetaDataFromDb.getRoutines(MetaDataFromDb.java:865) ~[siardcmd.jar:2.2.13]
	        at ch.admin.bar.siard2.cmd.MetaDataFromDb.getSchemaMetaData(MetaDataFromDb.java:1150) ~[siardcmd.jar:2.2.13]
	        at ch.admin.bar.siard2.cmd.MetaDataFromDb.download(MetaDataFromDb.java:1254) ~[siardcmd.jar:2.2.13]
	        at ch.admin.bar.siard2.cmd.SiardFromDb.<init>(SiardFromDb.java:302) ~[siardcmd.jar:2.2.13]
	        at ch.admin.bar.siard2.cmd.SiardFromDb.main(SiardFromDb.java:371) [siardcmd.jar:2.2.13]
	  java.sql.SQLException: Result set after last row

A quick review of the context (the line starting with "Routine:") revealed that FK_ASLH_PRFG_VE_INHLT_MUSS is declared as:

CREATE OR REPLACE FUNCTION APLKN_ARCHV_ANLUX.FK_ASLH_PRFG_VE_INHLT_MUSS (
   pr_vrzng_enht IN TBS_VRZNG_ENHT%ROWTYPE
   )
RETURN INTEGER

My gut feeling tells me that the %ROWTYPE type declaration (line starting with "Type: ") might be the cause of the issue. Other plain vanilla type declarations having been processed without any problems earlier in the process, I am wondering if SIARD is able to handle %ROWTYPE corrrectly?

cheers
j.

@mburri mburri added the bug Something isn't working label Sep 13, 2024
@joelthill
Copy link
Author

Hi Max,
Pls let me know if I can help with logs or samples.
j.

@mburri
Copy link
Collaborator

mburri commented Nov 15, 2024

@joelthill
Sorry for the late response!

It's possible that %rowtype is not supported. We need to check this in detail. It would be really helpful if you could provide some sql to set up a minimal sample database to reproduce the problem.

Regarding Oracle databases: We usually use oracle 18-xe or oracle 21-xe.

Which version are you using?

@joelthill
Copy link
Author

Hi Max,
Let me see what I can come up with as a stripped-down sample.
We're on Oracle Database 19c Enterprise Edition, 19.24 as of today.
j.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants