Hi Tim, Thanks for that - I don't seem to be getting Bamboo emails any more, should they still be coming to dspace-devel?
I'll get this fixed today - actually I'll need to fix the test, as the error message is now more useful stating which row in the CSV is causing the problem, and the test will need to be updated to expect this. Thanks, Stuart On 6/07/2011, at 2:38 AM, Tim Donohue wrote: > Stuart, > > Just an FYI. Looks like your fix to DS-834 caused a Unit Test to fail on > Trunk: > > https://bamboo.duraspace.org/browse/DST-TRUNK-359/ > > The failure is in DSpaceCSVTest.testDSpaceCSV(): > > java.lang.AssertionError: testDSpaceCSV Bad heading CSV Expected: "Unknown > metadata element in heading: dc.contributor.foobar" got: "Unknown > metadata element in row 4: dc.contributor.foobar" > java.lang.AssertionError: testDSpaceCSV Bad heading CSV > Expected: "Unknown metadata element in heading: dc.contributor.foobar" > got: "Unknown metadata element in row 4: dc.contributor.foobar" > > at > org.dspace.app.bulkedit.DSpaceCSVTest.testDSpaceCSV(DSpaceCSVTest.java:123) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at java.lang.reflect.Method.invoke(Method.java:597) > (8 more lines...) > > Likely this is something small / easy to fix, but wanted to forward this on > in case you missed the response from Bamboo. > > - Tim > > On 7/4/2011 9:12 PM, Stuart Lewis (DuraSpace JIRA) wrote: >> >> [ >> https://jira.duraspace.org/browse/DS-834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel >> ] >> >> Stuart Lewis updated DS-834: >> ---------------------------- >> >> Attachment: >> [DS-834]_CSV_import_dialog_doesn_t_handle_csv_errors_gracefully.patch >> >> Patch attached. Also fixes an issue where no header is given, but there is >> data in that column. Adds better log4j logging too to help debugging. >> >>> CSV import dialog doesn't handle csv errors gracefully >>> ------------------------------------------------------ >>> >>> Key: DS-834 >>> URL: https://jira.duraspace.org/browse/DS-834 >>> Project: DSpace >>> Issue Type: Bug >>> Components: XMLUI >>> Affects Versions: 1.6.2 >>> Reporter: Timo Aalto >>> Assignee: Stuart Lewis >>> Attachments: >>> [DS-834]_CSV_import_dialog_doesn_t_handle_csv_errors_gracefully.patch >>> >>> >>> I was trying to upload a csv containing some metadata changes. In the >>> upload dialog I all got was "no changes were detected" splash. It turned >>> out that I had accidentally left some completely empty columns in the >>> middle of the CSV file. Luckily I had a ssh screen running and it showed >>> the stack trace below. >>> It would be good to catch that exception and provide some guidance for the >>> poor dspace admin trying to figure out what went wrong. >>> java.lang.ArrayIndexOutOfBoundsException: 1 >>> at >>> org.dspace.app.bulkedit.MetadataImport.compare(MetadataImport.java:345) >>> at >>> org.dspace.app.bulkedit.MetadataImport.runImport(MetadataImport.java:154) >>> at >>> org.dspace.app.xmlui.aspect.administrative.FlowMetadataImportUtils.processUploadCSV(FlowMetadataImportUtils.java:178) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:585) >>> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) >>> at >>> org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243) >>> at >>> org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) >>> at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) >>> at >>> org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) >>> at >>> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) >>> at >>> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) >>> at >>> org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:160) >>> at org.mozilla.javascript.Context.call(Context.java:538) >>> at >>> org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1833) >>> at >>> org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1803) >>> at >>> org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:698) >>> at >>> org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:94) >>> at >>> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55) >>> at >>> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87) >>> at >>> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55) >>> at >>> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87) >> Stuart Lewis Digital Development Manager Te Tumu Herenga The University of Auckland Library Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand Ph: +64 (0)9 373 7599 x81928 ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Dspace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-devel
