Issues
- Importing grades spreadsheet into Gradebook 2 results in "constraint violation" errorGRBK-1354Resolved issue: GRBK-1354
- check the cache synchronized code for cross gradebook performanceGRBK-1350
- R-Click on item in Unassigned>Add Item does not work initially (all fields grayed out), but can click on item in category and New Item Frame entry fields "unlock," but if create multiple items by clickng Save, ony the last item is savedGRBK-1000
- ALL GB2s in dev are locked, even a brand new one (05-26-11-LOCKED GB?); I have not submitted grades for any of the other onesGRBK-999Resolved issue: GRBK-999
- Unable to view Grade Scale and Grade Distribution after submitting final grades.GRBK-998Resolved issue: GRBK-998
- Unable to export grades & structure after final grades submittedGRBK-997Resolved issue: GRBK-997
- Unable to view grade history after final grades submittedGRBK-996Resolved issue: GRBK-996
Importing grades spreadsheet into Gradebook 2 results in "constraint violation" error
Description
Attachments
Activity
Thomas AmslerNovember 2, 2012 at 9:18 AM
The duplicate student entry in the upload spreadsheet error is fixed in Gradebook2 v1.8.0. The relevant JIRA is:
Zhen QianNovember 2, 2012 at 8:57 AM
It turns out the CTOOLS_USER.SYS_C0039128 is an unique constraint of 'GRADABLE_OBJECT_ID' and 'STUDENT_ID' columns on GB_GRADE_RECORD_T table.
select *
from all_cons_columns
where constraint_name='SYS_C0039128'
CTOOLS_USER SYS_C0039128 GB_GRADE_RECORD_T GRADABLE_OBJECT_ID 1
CTOOLS_USER SYS_C0039128 GB_GRADE_RECORD_T STUDENT_ID 2
So it is violated whenever there are duplicate entries inside the spreadsheet being uploaded. Removing the duplicates should solved the problem.
Further fix on GB2 side might be:
1) make instruction text change in the upload screen, to warn user not to include duplicate grade items;
2) filter out the possible duplicates inside spreadsheet before inserting into db. Give user errors;
Zhen QianNovember 2, 2012 at 8:51 AM
Here is the relevant stack trace from log file:
2012-11-01 14:01:48,630 [TP-Processor321] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000
2012-11-01 14:01:48,630 [TP-Processor321] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (CTOOLS_USER.SYS_C0039128) violated
2012-11-01 14:01:48,630 [TP-Processor321] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
....
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (CTOOLS_USER.SYS_C0039128) violated
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10296)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:216)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247)
... 109 more
Jeff A ZieglerNovember 2, 2012 at 8:26 AM
The timestamp on the original screenshot was "2012-11-01 at 2.01.51 PM".
Support has received two reports of instructors getting an error when attempting to upload grades into Gradebook 2; "ERROR: Database constraint violation occurred. : 500" (see attached screenshot).
In both cases, I was able to replicate the error and, after some effort, eventually complete a successful upload. It is unclear what is triggering the error. In the first reported case, simply reducing the number of students in the file to <500 allowed the upload, however the file in the second case uploaded with over 600 students once I removed duplicate uniqnames and added missing uniqnames to the file. The files in question are attached to the respective FootPrints tickets.
Incident details:
Ticket 211859 = BIO171 F12 (leidieti) d0557774-48c7-424c-a6bf-7789a284bdaf
Ticket 213265 = BIOLOGY 172 001 F12 (dspill) e211df5f-7d7c-4338-9e8a-b3cefdaf56ff
Filing as a UMICH Jira as there is no QA server (of which I am aware) that is running GB2 so unable to test outside of our local instances.