Artur Konczak created DS-1425:
---------------------------------
Summary: DSpace OAI - Oracle DB issues
Key: DS-1425
URL: https://jira.duraspace.org/browse/DS-1425
Project: DSpace
Issue Type: Bug
Components: OAI-PMH
Affects Versions: 3.0
Reporter: Artur Konczak
Priority: Critical
Current implementation of OAI doesn't support Oracle db fully.
(ORA-00904: "TRUE": invalid identifier)
How to replicate that issue:
Call from a command line: ./dspace oai import -o -v -c
Solution:
Queries from org/dspace/xoai/app/XOAI.java
line 181 and 197 should have a own implementation for Oracle dialect.
Current queries:
SELECT item_id FROM item WHERE in_archive=TRUE AND last_modified > ?
and
SELECT item_id FROM item WHERE in_archive=TRUE
Substitute for Oracle:
SELECT item_id FROM item WHERE in_archive=1 AND last_modified > ?
and
SELECT item_id FROM item WHERE in_archive=1
ORA-00923: FROM keyword not found where expected
How to replicate that issue:
Go to url : oai/request?verb=ListSets
Solution:
org/dspace/xoai/data/DSpaceSetRepository.java
Line 93 and 135, ln both cases we need to replace current pagination
"SELECT *, ROWNUM r FROM (" + query + ") WHERE r BETWEEN ? AND ?";
by
SELECT * FROM (SELECT /*+ FIRST_ROWS(n) */ rec.*, ROWNUM rnum FROM (XXXXXXX)
rec WHERE rownum <= ? ) WHERE rnum> ?
Duplicated code
In each of the selected classes (BrowseDAOOracle, EPerson, Group,
XmlWorkflowtem) we have a duplicated code for a pagnation(Oracle/Postgres)
We can create a static method in DatabaseManage and move code there.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel