Hello, 

I've been working on a modification of the code provided by Donald and I 
finally found the solution. I tried it numerous times and working properly.

Environment:

- Red Hat 6
- Tomcat 7.0.65
- Postgresql 9.4
- Java JDK 8.0.60
- Dspace 5.4

The code provided by Donald is a good job to fix the error, but as Mike has 
said, there is a problem: all the descriptions are recorded in the first 
bitstream.

The change on the code of Donald definitely solves the problem is:

280            if (subInfo.getBitstream() == null)
281             {
282                 if (item != null)
283                 {
284                     Bundle[] bundle = item.getBundles("ORIGINAL");
285                     if (bundle.length!=0)
286                     {
287                             Bitstream[] bitstreams = 
bundle[0].getBitstreams();
288                             if (bitstreams.length > 0) {
289                                     if (bitstreams[bitstreams.length-1] 
!=null) subInfo.setBitstream(bitstreams[bitstreams.length-1]);
290                             }
291                     }
292                 }
293             }

Sorry for my poor english. I hope this will be useful for all.

Bye.

*Francisco M. Alcántara Checa *       *E-mail*:   [email protected]
                                                         *Tlf:*        +34 
953 21 18 54


*UNIVERSIDAD DE JAÉN*
*Servicio de Informática**Unidad de Redes, Comunicaciones y Servicios 
Telemáticos*

Edificio Zabaleta (D1) - Planta Baja
Campus Las Lagunillas s/n
CP: 23071 - Jaén
SPAIN



El miércoles, 26 de agosto de 2015, 19:59:31 (UTC+2), Donald I Macdonald 
escribió:
>
> Hi there,
>
> I’ve recently installed DSpace 5.0 (built from source) running on Tomcat 
> 8. I can create collections without any problems, but every time I try to 
> upload a file the upload proceeds successfully — progress bar goes to 100% 
> — but when I press the “next” button I get this message:
>
> System Error: Malformed Request
>
> There was an inconsistency in the data received from your browser. This 
> may be due to one of several things:
>
>    - Sometimes, if you used your browser's "back" button during an 
>    operation like a submission, clicking on a button may try and do something 
>    that's already been done, such as commit the submission to the archive. 
>    Clicking your browsers "reload" or "refresh" button may have similar 
>    results. 
>    - If you got here by following a link or bookmark provided by someone 
>    else, the link may be incorrect or you mistyped the link. Please check the 
>    link and try again. 
>    - If you have more than one browser window open with DSpace, this can 
>    cause a similar problem whereby a button clicked in one window may make a 
>    button click in the other window invalid. 
>    - Of course, you may have uncovered a problem with the system! All of 
>    these errors are logged, and we'll be checking them regularly to see if 
>    there is a problem. 
>
> If the problem persists, please contact the DSpace site administrators:
>
>
> The item *has* been uploaded successfully however, and if I resume the 
> submission process from where the error happened I can publish it without 
> further problems.
>
> Enabling the debug option in log4j.properties and extracting what I assume 
> to be the relevant portion of the dspace log I get the following data:
>
>
> 2015-02-05 19:17:30,675 DEBUG org.dspace.event.BasicDispatcher @ Sending 
> event to "discovery": org.dspace.event.Event(eventType=MODIFY, 
> SubjectType=ITEM, SubjectID=7, ObjectType=(Unknown), ObjectID=-1, 
> TimeStamp=1423163850650, dispatcher=1544803905, detail=[null], 
> transactionID="TX17691018349440117399952904257090806638")
> 2015-02-05 19:17:30,676 DEBUG org.dspace.discovery.IndexEventConsumer @ 
> consume() adding event to update queue: 
> org.dspace.event.Event(eventType=MODIFY, SubjectType=ITEM, SubjectID=7, 
> ObjectType=(Unknown), ObjectID=-1, TimeStamp=1423163850650, 
> dispatcher=1544803905, detail=[null], 
> transactionID="TX17691018349440117399952904257090806638")
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.Event @ Filtering event: 
> eventType=2, subjectType=4, result=false
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.Event @ Filtering event: 
> eventType=2, subjectType=4, result=false
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "versioning"
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "discovery"
> 2015-02-05 19:17:30,676 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND 
> resource_id = ?"  with parameters: 2,7
> 2015-02-05 19:17:30,677 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "eperson"
> 2015-02-05 19:17:30,677 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "harvester"
> 2015-02-05 19:17:40,632 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from eperson where eperson_id = ? "  with 
> parameters: 1
> 2015-02-05 19:17:40,633 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM epersongroup2eperson WHERE eperson_id= ?" 
>  with parameters: 1
> 2015-02-05 19:17:40,634 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM group2groupcache WHERE child_id= ?  OR 
> child_id= ?  OR child_id= ? "  with parameters: 0,1,4
> 2015-02-05 19:17:40,634 DEBUG org.dspace.app.webui.servlet.DSpaceServlet @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:http_request:--
>  
> URL Was: http://dspace.storlann.co.uk/jspui/submit
> -- Method: POST
> -- Parameters were:
>
> 2015-02-05 19:17:40,646 DEBUG 
> org.dspace.app.webui.servlet.SubmissionController @ Did not recoginze 
> resumable upload, falling back to simple upload.
>
> 2015-02-05 19:17:40,646 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from workspaceitem where workspace_item_id = ? " 
>  with parameters: 7
> 2015-02-05 19:17:40,646 DEBUG org.dspace.content.WorkspaceItem @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:find_workspace_item:workspace_item_id=7
> 2015-02-05 19:17:40,646 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from item where item_id = ? "  with parameters: 7
> 2015-02-05 19:17:40,647 DEBUG org.dspace.content.Item @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:find_item:item_id=7
>
>
> 2015-02-05 19:17:40,647 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND 
> resource_id = ?"  with parameters: 2,7
>
>
> 2015-02-05 19:17:40,647 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from collection where collection_id = ? "  with 
> parameters: 2
> 2015-02-05 19:17:40,648 DEBUG org.dspace.content.Collection @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:find_collection:collection_id=2
> 2015-02-05 19:17:40,648 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from epersongroup where eperson_group_id = ? " 
>  with parameters: 4
> 2015-02-05 19:17:40,648 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND 
> resource_id = ?"  with parameters: 3,2
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Loading 
> Submission Config information
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Found 
> Submission Config in session cache!
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Loading 
> Progress Bar Info
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Found 
> Progress Bar Info in cache: 6 pages to display in progress bar
> 2015-02-05 19:17:40,649 DEBUG 
> org.dspace.app.webui.servlet.SubmissionController @ Calling Step Class: 
> 'org.dspace.submit.step.UploadStep'
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.webui.submit.JSPStepManager @ 
> Calling processing for step org.dspace.app.webui.submit.JSPStepManager
> 2015-02-05 19:17:40,650 DEBUG org.dspace.app.webui.submit.JSPStepManager @ 
> Calling post-processing for step org.dspace.app.webui.submit.JSPStepManager
> 2015-02-05 19:17:40,650 WARN 
>  org.dspace.app.webui.submit.step.JSPUploadStep @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:integrity_error:--
>  
> URL Was: http://dspace.storlann.co.uk/jspui/submit
> -- Method: POST
> -- Parameters were:
> -- workspace_item_id: "7"
> -- jsp: "/submit/choose-file.jsp"
> -- page: "1"
> -- ajaxUpload: "false"
> -- description: "Am Poileagan"
> -- file: ""
> -- submit_upload: "Next >"
> -- step: “3"
>
>
>
> Anyone know what’s going on? I’m assuming I broke something during the 
> install, but I’d like to understand what...
>
>
>
>
>
El miércoles, 26 de agosto de 2015, 19:59:31 (UTC+2), Donald I Macdonald 
escribió:
>
> Hi there,
>
> I’ve recently installed DSpace 5.0 (built from source) running on Tomcat 
> 8. I can create collections without any problems, but every time I try to 
> upload a file the upload proceeds successfully — progress bar goes to 100% 
> — but when I press the “next” button I get this message:
>
> System Error: Malformed Request
>
> There was an inconsistency in the data received from your browser. This 
> may be due to one of several things:
>
>    - Sometimes, if you used your browser's "back" button during an 
>    operation like a submission, clicking on a button may try and do something 
>    that's already been done, such as commit the submission to the archive. 
>    Clicking your browsers "reload" or "refresh" button may have similar 
>    results. 
>    - If you got here by following a link or bookmark provided by someone 
>    else, the link may be incorrect or you mistyped the link. Please check the 
>    link and try again. 
>    - If you have more than one browser window open with DSpace, this can 
>    cause a similar problem whereby a button clicked in one window may make a 
>    button click in the other window invalid. 
>    - Of course, you may have uncovered a problem with the system! All of 
>    these errors are logged, and we'll be checking them regularly to see if 
>    there is a problem. 
>
> If the problem persists, please contact the DSpace site administrators:
>
>
> The item *has* been uploaded successfully however, and if I resume the 
> submission process from where the error happened I can publish it without 
> further problems.
>
> Enabling the debug option in log4j.properties and extracting what I assume 
> to be the relevant portion of the dspace log I get the following data:
>
>
> 2015-02-05 19:17:30,675 DEBUG org.dspace.event.BasicDispatcher @ Sending 
> event to "discovery": org.dspace.event.Event(eventType=MODIFY, 
> SubjectType=ITEM, SubjectID=7, ObjectType=(Unknown), ObjectID=-1, 
> TimeStamp=1423163850650, dispatcher=1544803905, detail=[null], 
> transactionID="TX17691018349440117399952904257090806638")
> 2015-02-05 19:17:30,676 DEBUG org.dspace.discovery.IndexEventConsumer @ 
> consume() adding event to update queue: 
> org.dspace.event.Event(eventType=MODIFY, SubjectType=ITEM, SubjectID=7, 
> ObjectType=(Unknown), ObjectID=-1, TimeStamp=1423163850650, 
> dispatcher=1544803905, detail=[null], 
> transactionID="TX17691018349440117399952904257090806638")
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.Event @ Filtering event: 
> eventType=2, subjectType=4, result=false
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.Event @ Filtering event: 
> eventType=2, subjectType=4, result=false
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "versioning"
> 2015-02-05 19:17:30,676 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "discovery"
> 2015-02-05 19:17:30,676 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND 
> resource_id = ?"  with parameters: 2,7
> 2015-02-05 19:17:30,677 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "eperson"
> 2015-02-05 19:17:30,677 DEBUG org.dspace.event.BasicDispatcher @ Calling 
> end for consumer "harvester"
> 2015-02-05 19:17:40,632 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from eperson where eperson_id = ? "  with 
> parameters: 1
> 2015-02-05 19:17:40,633 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM epersongroup2eperson WHERE eperson_id= ?" 
>  with parameters: 1
> 2015-02-05 19:17:40,634 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM group2groupcache WHERE child_id= ?  OR 
> child_id= ?  OR child_id= ? "  with parameters: 0,1,4
> 2015-02-05 19:17:40,634 DEBUG org.dspace.app.webui.servlet.DSpaceServlet @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:http_request:--
>  
> URL Was: http://dspace.storlann.co.uk/jspui/submit
> -- Method: POST
> -- Parameters were:
>
> 2015-02-05 19:17:40,646 DEBUG 
> org.dspace.app.webui.servlet.SubmissionController @ Did not recoginze 
> resumable upload, falling back to simple upload.
>
> 2015-02-05 19:17:40,646 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from workspaceitem where workspace_item_id = ? " 
>  with parameters: 7
> 2015-02-05 19:17:40,646 DEBUG org.dspace.content.WorkspaceItem @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:find_workspace_item:workspace_item_id=7
> 2015-02-05 19:17:40,646 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from item where item_id = ? "  with parameters: 7
> 2015-02-05 19:17:40,647 DEBUG org.dspace.content.Item @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:find_item:item_id=7
>
>
> 2015-02-05 19:17:40,647 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND 
> resource_id = ?"  with parameters: 2,7
>
>
> 2015-02-05 19:17:40,647 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from collection where collection_id = ? "  with 
> parameters: 2
> 2015-02-05 19:17:40,648 DEBUG org.dspace.content.Collection @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:find_collection:collection_id=2
> 2015-02-05 19:17:40,648 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "select * from epersongroup where eperson_group_id = ? " 
>  with parameters: 4
> 2015-02-05 19:17:40,648 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
> Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND 
> resource_id = ?"  with parameters: 3,2
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Loading 
> Submission Config information
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Found 
> Submission Config in session cache!
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Loading 
> Progress Bar Info
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.util.SubmissionInfo @ Found 
> Progress Bar Info in cache: 6 pages to display in progress bar
> 2015-02-05 19:17:40,649 DEBUG 
> org.dspace.app.webui.servlet.SubmissionController @ Calling Step Class: 
> 'org.dspace.submit.step.UploadStep'
> 2015-02-05 19:17:40,649 DEBUG org.dspace.app.webui.submit.JSPStepManager @ 
> Calling processing for step org.dspace.app.webui.submit.JSPStepManager
> 2015-02-05 19:17:40,650 DEBUG org.dspace.app.webui.submit.JSPStepManager @ 
> Calling post-processing for step org.dspace.app.webui.submit.JSPStepManager
> 2015-02-05 19:17:40,650 WARN 
>  org.dspace.app.webui.submit.step.JSPUploadStep @ 
> [email protected]:session_id=A11D0688E9D480CB47FA1F4572AA2742:ip_addr=217.43.66.136:integrity_error:--
>  
> URL Was: http://dspace.storlann.co.uk/jspui/submit
> -- Method: POST
> -- Parameters were:
> -- workspace_item_id: "7"
> -- jsp: "/submit/choose-file.jsp"
> -- page: "1"
> -- ajaxUpload: "false"
> -- description: "Am Poileagan"
> -- file: ""
> -- submit_upload: "Next >"
> -- step: “3"
>
>
>
> Anyone know what’s going on? I’m assuming I broke something during the 
> install, but I’d like to understand what...
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to