[ 
https://jira.duraspace.org/browse/DS-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=23641#comment-23641
 ] 

Robin Taylor commented on DS-1090:
----------------------------------

I think I am right in saying that this has been applied to 1.8.1 but not to 
trunk ?

Cheers, Robin.

                
> CC license process fails with java.lang.NegativeArraySizeException.
> -------------------------------------------------------------------
>
>                 Key: DS-1090
>                 URL: https://jira.duraspace.org/browse/DS-1090
>             Project: DSpace
>          Issue Type: Bug
>          Components: JSPUI, XMLUI
>    Affects Versions: 1.7.0, 1.7.1, 1.7.2, 1.8.0
>            Reporter: Dan Ishimitsu
>            Assignee: Peter Dietz
>             Fix For: 1.8.1
>
>         Attachments: cc-license-url.patch
>
>
> version 1.8.0 has no error, but fails silently.
> version 1.7.X gives an error and cannot continue.
> When adding CC license to a submission, we get the following error
> Exception:
> java.lang.NegativeArraySizeException
> at org.dspace.license.CreativeCommons.fetchURL(CreativeCommons.java:393)
> at 
> org.dspace.license.CreativeCommons.fetchLicenseText(CreativeCommons.java:268)
> at org.dspace.license.CreativeCommons.setLicense(CreativeCommons.java:130)
> at 
> org.dspace.app.webui.servlet.admin.EditItemServlet.showEditForm(EditItemServlet.java:379)
> at 
> org.dspace.app.webui.servlet.admin.EditItemServlet.doDSGet(EditItemServlet.java:135)
> ...
> The line 
> byte[] bytes = new byte[connection.getContentLength()]; 
> fails because it presumably can't get the content-length of the license 
> upfront.
> Possible Workaround:
> Add to the imports...
> import java.io.BufferedReader;
> import java.io.InputStreamReader;
> Replace everything in the try{} block with...
> String line = "";
> URL url = new URL(url_string);
> URLConnection connection = url.openConnection();
> InputStream inputStream = connection.getInputStream();
> BufferedReader reader = new BufferedReader(new 
> InputStreamReader(inputStream)); 
> StringBuilder sb = new StringBuilder();
> while ((line = reader.readLine()) != null) 
>     sb.append(line); 
> return sb.toString().getBytes();

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel
  • [Dspace-devel] [DuraSpace JIRA] ... Robin Taylor (Commented) (DuraSpace JIRA)

Reply via email to