[Dspace-devel] [DuraSpace JIRA] Commented: (DS-796) Adding a Community throws ORA-0001 error
[ https://jira.duraspace.org/browse/DS-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=18618#action_18618 ] Bert Lensch commented on DS-796: Thanks for the comment Graham. It seems I posted the comment too early based on my DBA's initial comment back to me. He came to the same conclusion after looking at the problem more closely. It appears the handle_seq got out of sync after we installed the Handles server on top of an existing DSpace installation. Since I am new to both DSpace Handles, is there a way to force the Handles server to index what is on our DSpace installation and correct the handle_seq? Or what would I need to do to get the handle_seq corrected/recreated? Thanks for all your help so far. Adding a Community throws ORA-0001 error Key: DS-796 URL: https://jira.duraspace.org/browse/DS-796 Project: DSpace Issue Type: Bug Affects Versions: 1.6.2 Environment: Red Hat Enterprise 5 Oracle 11g Reporter: Bert Lensch While trying to add a top-level community, or a sub-community to our DSpace community, we received an Internal Server Error. Looking through the logs, I noticed that trying to add a community causes Oracle to throw a ORA-0001 error: 2011-01-07 09:14:32,848 WARN org.dspace.app.webui.servlet.DSpaceServlet @ blen...@georgiasouthern.edu:session_id=1232A007BC7400C3524C38F490C87A6B:ip_addr=141.x.x.x:database_error:java.sql.SQLException\colon; ORA-1\colon; unique constraint (DSPACE_USER.SYS_C007905) violated java.sql.SQLException: ORA-1: unique constraint (DSPACE_USER.SYS_C007905) violated at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1429) at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java:781) at org.dspace.handle.HandleManager.createHandle(HandleManager.java:172) at org.dspace.content.Community.create(Community.java:205) at org.dspace.content.Community.createSubcommunity(Community.java:845) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.processConfirmEditCommunity(EditCommunitiesServlet.java:520) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.doDSPost(EditCommunitiesServlet.java:237) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at
[Dspace-devel] [DuraSpace JIRA] Commented: (DS-796) Adding a Community throws ORA-0001 error
[ https://jira.duraspace.org/browse/DS-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=18619#action_18619 ] Graham Triggs commented on DS-796: -- No, the handle server doesn't manage the assignment or indexing of handles. It simply matches against the contents of the handle table, and the assignment is driven by handle_seq which is internal to DSpace. Simplest way of correcting the problem is to drop the sequence, and recreate it with a STARTING WITH clause greater than any of your existing handle [suffixes]. Adding a Community throws ORA-0001 error Key: DS-796 URL: https://jira.duraspace.org/browse/DS-796 Project: DSpace Issue Type: Bug Affects Versions: 1.6.2 Environment: Red Hat Enterprise 5 Oracle 11g Reporter: Bert Lensch While trying to add a top-level community, or a sub-community to our DSpace community, we received an Internal Server Error. Looking through the logs, I noticed that trying to add a community causes Oracle to throw a ORA-0001 error: 2011-01-07 09:14:32,848 WARN org.dspace.app.webui.servlet.DSpaceServlet @ blen...@georgiasouthern.edu:session_id=1232A007BC7400C3524C38F490C87A6B:ip_addr=141.x.x.x:database_error:java.sql.SQLException\colon; ORA-1\colon; unique constraint (DSPACE_USER.SYS_C007905) violated java.sql.SQLException: ORA-1: unique constraint (DSPACE_USER.SYS_C007905) violated at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1429) at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java:781) at org.dspace.handle.HandleManager.createHandle(HandleManager.java:172) at org.dspace.content.Community.create(Community.java:205) at org.dspace.content.Community.createSubcommunity(Community.java:845) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.processConfirmEditCommunity(EditCommunitiesServlet.java:520) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.doDSPost(EditCommunitiesServlet.java:237) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at
[Dspace-devel] [DuraSpace JIRA] Commented: (DS-796) Adding a Community throws ORA-0001 error
[ https://jira.duraspace.org/browse/DS-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=18597#action_18597 ] Bert Lensch commented on DS-796: According to one of our Oracle DBA's, trying to add a new community or sub-community tries to add a duplicate user to the DSPACE_USER.SYS table which is causing the constraint violation. In what situation would this workflow occur? And how can we fix this problem? Adding a Community throws ORA-0001 error Key: DS-796 URL: https://jira.duraspace.org/browse/DS-796 Project: DSpace Issue Type: Bug Affects Versions: 1.6.2 Environment: Red Hat Enterprise 5 Oracle 11g Reporter: Bert Lensch While trying to add a top-level community, or a sub-community to our DSpace community, we received an Internal Server Error. Looking through the logs, I noticed that trying to add a community causes Oracle to throw a ORA-0001 error: 2011-01-07 09:14:32,848 WARN org.dspace.app.webui.servlet.DSpaceServlet @ blen...@georgiasouthern.edu:session_id=1232A007BC7400C3524C38F490C87A6B:ip_addr=141.x.x.x:database_error:java.sql.SQLException\colon; ORA-1\colon; unique constraint (DSPACE_USER.SYS_C007905) violated java.sql.SQLException: ORA-1: unique constraint (DSPACE_USER.SYS_C007905) violated at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1429) at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java:781) at org.dspace.handle.HandleManager.createHandle(HandleManager.java:172) at org.dspace.content.Community.create(Community.java:205) at org.dspace.content.Community.createSubcommunity(Community.java:845) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.processConfirmEditCommunity(EditCommunitiesServlet.java:520) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.doDSPost(EditCommunitiesServlet.java:237) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at
[Dspace-devel] [DuraSpace JIRA] Commented: (DS-796) Adding a Community throws ORA-0001 error
[ https://jira.duraspace.org/browse/DS-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=18602#action_18602 ] Graham Triggs commented on DS-796: -- I wouldn't want to contradict your DBA, but that description doesn't make any sense. DSPACE_USER is the login / schema that you are using for the database, and SYS_C007905 is the name of the constraint, which you would need to look up in the data dictionary to see what it is operating on. ie: select UCC.CONSTRAINT_NAME, UCC.COLUMN_NAME, UC.CONSTRAINT_TYPE, UC.SEARCH_CONDITION, UC2.TABLE_NAME as REFERENCES_TABLE from USER_CONS_COLUMNS UCC, USER_CONSTRAINTS UC, USER_CONSTRAINTS UC2 where UCC.CONSTRAINT_NAME = UC.CONSTRAINT_NAME and UC.R_CONSTRAINT_NAME = UC2.CONSTRAINT_NAME(+) and UCC.CONSTRAINT_NAME='SYS_C007905' However, looking at your stack trace, the constraint appears to be violated whilst processing HandleManager.createHandle() - which is assigning a handle (prefix + next value in handle sequence) to the community. This would occur if you already have handles in the handle table, but the sequence is not set to provide the next value as being at least one higher than the largest suffix of your already allocated handles. If you recreate handle_seq to start with a value that avoids collisions, you should get past this error. Adding a Community throws ORA-0001 error Key: DS-796 URL: https://jira.duraspace.org/browse/DS-796 Project: DSpace Issue Type: Bug Affects Versions: 1.6.2 Environment: Red Hat Enterprise 5 Oracle 11g Reporter: Bert Lensch While trying to add a top-level community, or a sub-community to our DSpace community, we received an Internal Server Error. Looking through the logs, I noticed that trying to add a community causes Oracle to throw a ORA-0001 error: 2011-01-07 09:14:32,848 WARN org.dspace.app.webui.servlet.DSpaceServlet @ blen...@georgiasouthern.edu:session_id=1232A007BC7400C3524C38F490C87A6B:ip_addr=141.x.x.x:database_error:java.sql.SQLException\colon; ORA-1\colon; unique constraint (DSPACE_USER.SYS_C007905) violated java.sql.SQLException: ORA-1: unique constraint (DSPACE_USER.SYS_C007905) violated at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1429) at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java:781) at org.dspace.handle.HandleManager.createHandle(HandleManager.java:172) at org.dspace.content.Community.create(Community.java:205) at org.dspace.content.Community.createSubcommunity(Community.java:845) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.processConfirmEditCommunity(EditCommunitiesServlet.java:520) at org.dspace.app.webui.servlet.admin.EditCommunitiesServlet.doDSPost(EditCommunitiesServlet.java:237) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:112) at