Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

DLotts opened this issue Mar 25, 2014 · 7 comments
Assignees

Comments

@DLotts
Copy link

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
Copy link
Member

subwiz commented Mar 26, 2014

Stack trace please.

@DLotts
Copy link
Author

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
Copy link
Author

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
Copy link

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
Copy link
Member

subwiz commented Mar 26, 2014

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

@subwiz subwiz closed this as completed Mar 26, 2014
@DLotts
Copy link
Author

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
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants