Duplicate assessment throws an error when assessment's title is too long
Activity
Show:

Hudson CI Server November 12, 2015 at 8:15 PM
SUCCESS: Integrated in sakai-10-java-1.7 #240 (See http://builds.sakaiproject.org:8080/job/sakai-10-java-1.7/240/)
https://sakaiproject.atlassian.net/browse/SAM-2571#icft=SAM-2571 merge PR 1094 from git (enietzel@anisakai.com: rev 321817)

Valerio Cerni Conde October 14, 2015 at 10:13 AM
Tested successfully on
Rev.40650 - 10-14-2015 08:18 - Sakai 11-SNAPSHOT) - Server sakai-test

Raúl Sánchez Vegas September 16, 2015 at 11:26 AM
Verified in http://sakai-trunk.atica.um.es/portal.
Fixed
Created May 28, 2015 at 9:50 AM
Updated April 17, 2018 at 8:25 AM
Resolved October 1, 2015 at 8:23 AM
Steps to reproduce the issue:
1. Create an assessment which title has 255 characters.
2. Try to duplicate the assessment by clicking the "Duplicate" option. The duplication fails and that stack trace is shown:
Caused by: java.lang.RuntimeException: org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into SAM_ASSESSMENTBASE_T (PARENTID, TITLE, DESCRIPTION, COMMENTS, TYPEID, INSTRUCTORNOTIFICATION, TESTEENOTIFICATION, MULTIPARTALLOWED, STATUS, CREATEDBY, CREATEDDATE, LASTMODIFIEDBY, LASTMODIFIEDDATE, ASSESSMENTTEMPLATEID, isTemplate, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '0', ?)]; SQL state [72000]; error code [12899]; Could not execute JDBC batch update; nested exception is org.hibernate.QueryTimeoutException: Could not execute JDBC batch update
at org.sakaiproject.tool.assessment.services.assessment.AssessmentService.copyAssessment(AssessmentService.java:1036)
at org.sakaiproject.tool.assessment.ui.listener.author.CopyAssessmentListener.processAction(CopyAssessmentListener.java:23)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:774)