JDK-8064462 : Error: java.lang.IllegalArgumentException: white space not allowed
  • Type: Bug
  • Component: deploy
  • Affected Version: 8u25
  • Priority: P3
  • Status: Closed
  • Resolution: Incomplete
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2014-10-21
  • Updated: 2018-06-09
  • Resolved: 2015-01-19
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
Using JRE version 1.8.0_25-b18

ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64 bit

A DESCRIPTION OF THE PROBLEM :
We are getting below mentioned error while uploading any file to cloud storage (using java based upload) with java 8 update 25 with Windows 7.below is the error we are getting:

 Remaining Retries: 3Retry: white space not allowed Byte: 0 Remaining Retries: 3Retry: white space not allowed Byte: 0 Remaining Retries: 3Offset sucessfully sent: 0
java.lang.Exception: java.lang.IllegalArgumentException: white space not allowed
	at Uploader.Upload(Uploader.java:479)
	at Uploader.access$200(Uploader.java:33)
	at Uploader$1.run(Uploader.java:285)
Caused by: java.lang.IllegalArgumentException: white space not allowed
	at java.net.URLPermission.normalizeHeaders(Unknown Source)
	at java.net.URLPermission.init(Unknown Source)
	at java.net.URLPermission.<init>(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at com.nirvanix.sdk.io.internal.UploadSink$httpPartialUpload.connectToStorageNode(UploadSink.java:201)
	at com.nirvanix.sdk.io.internal.UploadSink$httpPartialUpload.writeData(UploadSink.java:250)
	at com.nirvanix.sdk.io.internal.UploadSink.writeData(UploadSink.java:122)
	at com.nirvanix.sdk.io.internal.DataTransferSession.writeDataToSink(DataTransferSession.java:305)
	at com.nirvanix.sdk.io.internal.DataTransferSession.doTransfer(DataTransferSession.java:116)
	at Uploader.Upload(Uploader.java:464)
	... 2 more


REGRESSION.  Last worked in version 7u67

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Upload using java based upload.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Upload should work fine.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
 Remaining Retries: 3Retry: white space not allowed Byte: 0 Remaining Retries: 3Retry: white space not allowed Byte: 0 Remaining Retries: 3Offset sucessfully sent: 0
java.lang.Exception: java.lang.IllegalArgumentException: white space not allowed
	at Uploader.Upload(Uploader.java:479)
	at Uploader.access$200(Uploader.java:33)
	at Uploader$1.run(Uploader.java:285)
Caused by: java.lang.IllegalArgumentException: white space not allowed
	at java.net.URLPermission.normalizeHeaders(Unknown Source)
	at java.net.URLPermission.init(Unknown Source)
	at java.net.URLPermission.<init>(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at com.nirvanix.sdk.io.internal.UploadSink$httpPartialUpload.connectToStorageNode(UploadSink.java:201)
	at com.nirvanix.sdk.io.internal.UploadSink$httpPartialUpload.writeData(UploadSink.java:250)
	at com.nirvanix.sdk.io.internal.UploadSink.writeData(UploadSink.java:122)
	at com.nirvanix.sdk.io.internal.DataTransferSession.writeDataToSink(DataTransferSession.java:305)
	at com.nirvanix.sdk.io.internal.DataTransferSession.doTransfer(DataTransferSession.java:116)
	at Uploader.Upload(Uploader.java:464)
	... 2 more

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
No further response from the submitter.
02-04-2015

Sent an email to the submitter requesting additional information and response to the evaluation: ------------------------------------------------------------------------------------------------------------------------------------------------------ On 2/10/2015 12:30 PM, ..... wrote: > Hi Naveen, > > Can you respond to the bug evaluation at: > https://bugs.openjdk.java.net/browse/jdk-8064462 > > Evaluation by the engineer: > "The test throws IllegalArgumentException with message "white space not allowed" and the spec for URLPermission says that " ... No white-space is permitted in the actions string ... " > > Therefore, the cause of the exception is illegal action string for the URLPermission class. The actions string can be set by HttpURLConnection.setRequestProperty(...) and HttpURLConnection.addRequestProperty(...). > > Based on the stack trace of the exception looks like the call to setRequestProperty/addRequestProperty is done by the code from the "com.nirvanix.sdk.io.internal" package (and it's not a deploy neither a core libs packager). So, I think that the next step for this issue is to review the client code and figure out whether the code from the package sets illegal actions strings or not." > > Also, it would be helpful to know if this bug is reproducible with any older JDK 8 version (Say JDK 8, 8u5, 8u11, and 8u20). Please check for the mentioned versions and respond back. > > Thank You, > Pardeep ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10-02-2015

Complete log with JDK 8u40 b12.
19-01-2015

Log from JDK 8u40 b12
19-01-2015

Re-opening this report as submitter claims - "File download is working fine but upload still has same issue. We are attaching the log for the same. Request you to look into this on priority, as old version has also started causing issues."
19-01-2015

The test throws IllegalArgumentException with message "white space not allowed" and the spec for URLPermission says that " ... No white-space is permitted in the actions string ... " Therefore, the cause of the exception is illegal action string for the URLPermission class. The actions string can be set by HttpURLConnection.setRequestProperty(...) and HttpURLConnection.addRequestProperty(...). Based on the stack trace of the exception looks like the call to setRequestProperty/addRequestProperty is done by the code from the "com.nirvanix.sdk.io.internal" package (and it's not a deploy neither a core libs packager). So, I think that the next step for this issue is to review the client code and figure out whether the code from the package sets illegal actions strings or not.
19-01-2015

please reopen it if it's still reproducible with 8u40 b12
21-11-2014

Looks like it's a dup of JDK-8042622. JDK-8042622 is fixed in 8u40 b12. Could you please try b12 to see if it still exists.
13-11-2014

Update from submitter: Tested the functionality with java 8u40 and getting the same error with this version also. Full log till upload retry ends.
12-11-2014

User is not able to share the applet code/url being internal and so didn't had access to same to test. However, based on his inputs, the application loads fine with 7u72, but fails with 8u25.
10-11-2014