Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java,v diff -u -r1.37 -r1.38 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java 13 Dec 2013 16:22:23 -0000 1.37 +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java 13 Dec 2013 18:49:29 -0000 1.38 @@ -1923,6 +1923,17 @@ toolContentObj.setToolContentHandler(null); toolContentObj.setOfflineFileList(null); toolContentObj.setOnlineFileList(null); + + // wipe out the links from ScratchieAnswer back to ScratchieItem, or it will try to + // include the hibernate object version of the ScratchieItem within the XML + Set items = toolContentObj.getScratchieItems(); + for (ScratchieItem item : items) { + Set answers = item.getAnswers(); + for (ScratchieAnswer answer : answers) { + answer.setScratchieItem(null); + } + } + try { exportContentService.registerFileClassForExport(ScratchieAttachment.class.getName(), "fileUuid", "fileVersionId");