Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java =================================================================== diff -u -r5a56024b9d5241a08dd08252c5be795a3a024912 -r6c7287d8b8db1612f4e3e189c6fbe1bf2bd2cb81 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 5a56024b9d5241a08dd08252c5be795a3a024912) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 6c7287d8b8db1612f4e3e189c6fbe1bf2bd2cb81) @@ -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");