question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException in getProtocol

See original GitHub issue

Building https://github.com/square/okhttp/pull/3262 on OSX with Java 8

Failing due to JVM exit on requestBodyFailHttp2OverHttps(okhttp3.EventListenerTest)

mvn -Pconscrypt test

java.lang.NullPointerException: ssl == null
	at org.conscrypt.NativeCrypto.SSL_get_version(Native Method)
	at org.conscrypt.SslWrapper.getVersion(SslWrapper.java:257)
	at org.conscrypt.ActiveSession.getProtocol(ActiveSession.java:290)
	at org.conscrypt.Java7SessionWrapper.getProtocol(Java7SessionWrapper.java:178)
	at okhttp3.mockwebserver.RecordedRequest.<init>(RecordedRequest.java:49)
	at okhttp3.mockwebserver.MockWebServer$Http2SocketHandler.readRequest(MockWebServer.java:922)
	at okhttp3.mockwebserver.MockWebServer$Http2SocketHandler.onStream(MockWebServer.java:851)
	at okhttp3.internal.http2.Http2Connection$ReaderRunnable$1.execute(Http2Connection.java:628)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nmittlercommented, Dec 4, 2017

Based on a discussion with @flooey, I’ve put together #383 as an alternative implementation.

@yschimke would you mind giving it a try to see if it resolves your issue?

1reaction
flooeycommented, Nov 30, 2017

I put together #381 to address this, I think it should do the trick.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NullPointerException While Harvesting Artifacts Using MDS
java.lang.NullPointerException at com.oracle.oer.sync.plugin.artifact.wsdl.WSDLIntrospector.getProtocol(WSDLIntrospector.java:1411)
Read more >
java.lang.NullPointerException: Cannot invoke "java.net.URL ...
In your Intellij IDEA: File | Settings | Build, Execution, Deployment | Compiler | user-local build process vm options. set this value :...
Read more >
42444 – Potential NullPointerException in org.apache.catalina ...
In the class AccessLogValve.RequestElement in the method addElement there is an access of the form: request.getProtocol(), even though the ...
Read more >
Example usage for java.lang NullPointerException getMessage
getProtocol ", e.getMessage(), e); log.debug("digirmetadatahandler.default.getProtocol", protocol); } finally { if (is != null) { try { is.close(); } catch ...
Read more >
NullPointerException while attempting passive or active scan ...
getProtocol (); String host = httpService.getHost(); int port = httpService.getPort(); byte[] request = messageInfo.getRequest(); byte[] response ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found