Closed DLotts closed 10 years ago
Stack trace please.
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)
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.
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.
Thanks WY! I had also fixed this in master branch sometime ago--revision 2f6156f2d97ba.
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.
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.
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.