java.lang.NullPointerException HTTPClientRequestExecuter.java:355 #7

Closed
DLotts opened this Issue Mar 25, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@DLotts

DLotts commented Mar 25, 2014

I ran it for the first time, configured my URL, method=post, and body, clicked the arrow at the upper right, and got a popup error.
Deleting the body (none) makes no difference, still the same error.

@subwiz

This comment has been minimized.

Show comment
Hide comment
@subwiz

subwiz Mar 26, 2014

Member

Stack trace please.

Member

subwiz commented Mar 26, 2014

Stack trace please.

@DLotts

This comment has been minimized.

Show comment
Hide comment
@DLotts

DLotts Mar 26, 2014

restclient-ui-3.3-jar-with-dependencies.jar

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

I can reproduce the error by Edit > reset all, then only URL=https://example.com
no headers, no body, nothing else. Click the arrow "Go!" button.

Seems to have something to do with SSL/TLS. If I switch from https to http, the error changes to a time out.
If I use http://examplesss.com (note, not https): "java.net.UnknownHostException: examplesss.com".

Contents of pop up error for any https URL:

null
java.lang.NullPointerException
    at org.wiztools.restclient.HTTPClientRequestExecuter.execute(HTTPClientRequestExecuter.java:355)
    at org.wiztools.restclient.ui.RESTViewImpl$2.run(RESTViewImpl.java:323)

DLotts commented Mar 26, 2014

restclient-ui-3.3-jar-with-dependencies.jar

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

I can reproduce the error by Edit > reset all, then only URL=https://example.com
no headers, no body, nothing else. Click the arrow "Go!" button.

Seems to have something to do with SSL/TLS. If I switch from https to http, the error changes to a time out.
If I use http://examplesss.com (note, not https): "java.net.UnknownHostException: examplesss.com".

Contents of pop up error for any https URL:

null
java.lang.NullPointerException
    at org.wiztools.restclient.HTTPClientRequestExecuter.execute(HTTPClientRequestExecuter.java:355)
    at org.wiztools.restclient.ui.RESTViewImpl$2.run(RESTViewImpl.java:323)
@DLotts

This comment has been minimized.

Show comment
Hide comment
@DLotts

DLotts Mar 26, 2014

Same error on my home Linux machine. I tried under both Java 6 and 7.
I downloaded the older version, 3.2.2. It does not have this error, I tried both Windows and Linux machines. My Linux machine does not have the timeout that my windows PC has. That looks like independent issue.

DLotts commented Mar 26, 2014

Same error on my home Linux machine. I tried under both Java 6 and 7.
I downloaded the older version, 3.2.2. It does not have this error, I tried both Windows and Linux machines. My Linux machine does not have the timeout that my windows PC has. That looks like independent issue.

@hiwylee

This comment has been minimized.

Show comment
Hide comment
@hiwylee

hiwylee Mar 26, 2014

I fixed it.

change code org.wiztools.restclient.HTTPClientRequestExecuter.java

before
line 355 final String trustStorePath = sslReq.getTrustStore().getAbsolutePath();
line 356 final String keyStorePath = sslReq.getKeyStore().getAbsolutePath();

after
line 355 final String trustStorePath = sslReq.getTrustStore()== null ? null : sslReq.getTrustStore().getAbsolutePath();
line 366 final String keyStorePath = sslReq.getKeyStore() == null ? null: sslReq.getKeyStore().getAbsolutePath();

This exception occur when you use https without keystore or trusted keystore file.

thanks.

WY.

hiwylee commented Mar 26, 2014

I fixed it.

change code org.wiztools.restclient.HTTPClientRequestExecuter.java

before
line 355 final String trustStorePath = sslReq.getTrustStore().getAbsolutePath();
line 356 final String keyStorePath = sslReq.getKeyStore().getAbsolutePath();

after
line 355 final String trustStorePath = sslReq.getTrustStore()== null ? null : sslReq.getTrustStore().getAbsolutePath();
line 366 final String keyStorePath = sslReq.getKeyStore() == null ? null: sslReq.getKeyStore().getAbsolutePath();

This exception occur when you use https without keystore or trusted keystore file.

thanks.

WY.

@subwiz

This comment has been minimized.

Show comment
Hide comment
@subwiz

subwiz Mar 26, 2014

Member

Thanks WY! I had also fixed this in master branch sometime ago--revision 2f6156f.

Member

subwiz commented Mar 26, 2014

Thanks WY! I had also fixed this in master branch sometime ago--revision 2f6156f.

@subwiz subwiz closed this Mar 26, 2014

@DLotts

This comment has been minimized.

Show comment
Hide comment
@DLotts

DLotts Mar 26, 2014

Thanks guys. Are you going to make me compile a new JAR myself, or can I get it from fosshub anytime soon? I suppose I'm happy using the 3.2.2 version for now.
david.

DLotts commented Mar 26, 2014

Thanks guys. Are you going to make me compile a new JAR myself, or can I get it from fosshub anytime soon? I suppose I'm happy using the 3.2.2 version for now.
david.

@subwiz

This comment has been minimized.

Show comment
Hide comment
@subwiz

subwiz Mar 26, 2014

Member

Get the latest build from: https://dl.dropboxusercontent.com/u/2505020/restclient-ui-3.3.1-SNAPSHOT-jar-with-dependencies.jar

Note, this build has latest developments besides this fix, and could have more bugs.

Thanks for taking time to report the issue.

Member

subwiz commented Mar 26, 2014

Get the latest build from: https://dl.dropboxusercontent.com/u/2505020/restclient-ui-3.3.1-SNAPSHOT-jar-with-dependencies.jar

Note, this build has latest developments besides this fix, and could have more bugs.

Thanks for taking time to report the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment