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

JDK9+ Support #44

Open
aclowkey opened this issue Jun 14, 2018 · 12 comments
Open

JDK9+ Support #44

aclowkey opened this issue Jun 14, 2018 · 12 comments

Comments

@aclowkey
Copy link

We're attempting to upgrade to JDK10, and encountred this issue with OkHttp.

Seems like OkHttp 3.10.0 has support for Java9, but the call to one of the methods results in an
UnsupportedOperationException.

Stacktrace:

Jun 14, 2018 9:36:46 AM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.UnsupportedOperationException: clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 9+
java.lang.UnsupportedOperationException: clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 9+
at okhttp3.internal.platform.Jdk9Platform.trustManager(Jdk9Platform.java:81)
at okhttp3.internal.platform.Platform.buildCertificateChainCleaner(Platform.java:176)
at okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.java:673)
at com.clevertap.apns.clients.SyncOkHttpApnsClient.(SyncOkHttpApnsClient.java:144)
at com.clevertap.apns.clients.ApnsClientBuilder.build(ApnsClientBuilder.java:172)
at co.zeekit.server.module.notification.Push.configure(Push.java:24)
at org.jooby.Jooby.install(Jooby.java:3421)
at org.jooby.Jooby.lambda$bindService$50(Jooby.java:3082)
at org.jooby.funzy.Throwing$Consumer.lambda$accept$0(Throwing.java:273)
at org.jooby.funzy.Throwing.runAction(Throwing.java:2415)
at org.jooby.funzy.Throwing.access$000(Throwing.java:39)
at org.jooby.funzy.Throwing$Consumer.accept(Throwing.java:273)
at org.jooby.Jooby.lambda$null$44(Jooby.java:2932)
at org.jooby.funzy.Throwing.runAction(Throwing.java:2415)
at org.jooby.funzy.Throwing.access$000(Throwing.java:39)
at org.jooby.funzy.Throwing$Runnable.run(Throwing.java:86)
at org.jooby.funzy.Try.run(Try.java:729)
at org.jooby.Jooby.lambda$bootstrap$47(Jooby.java:2919)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:84)
at org.jooby.Jooby.lambda$new$0(Jooby.java:882)
at org.jooby.Jooby.bootstrap(Jooby.java:2996)
at org.jooby.Jooby.start(Jooby.java:2195)
at org.jooby.Jooby.start(Jooby.java:2176)
at org.jooby.Jooby.start(Jooby.java:2165)
at co.zeekit.server.ServerResource.before(ServerResource.java:82)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

@aclowkey
Copy link
Author

aclowkey commented Jun 14, 2018

Actually I'm not sure if this is a apns issue.
EDIT:
Just this call breaks code:

builder.sslSocketFactory(sslSocketFactory);

@judepereira
Copy link
Member

@aclowkey JDK 9 will not be supported. See https://github.com/CleverTap/apns-http2/wiki/Running-on-Java-9.

There's no way for us to set the authorization header, and Oracle won't back port the fix.

@aclowkey
Copy link
Author

@judepereira Oh okay, thanks.

@aclowkey
Copy link
Author

@judepereira This library uses Ok Http which says it supports HTTP2+, can't we use these implementation rather than Oracles?

@judepereira
Copy link
Member

@aclowkey Ah yes! My bad. Yes, we can continue using HTTP/2 support from OkHttp.

Have you been able to get it working? Does it still require Jetty's ALPN library?

@judepereira judepereira reopened this Jun 14, 2018
@aclowkey
Copy link
Author

@judepereira
I've been able to compile it successfully but didn't actually test the functionality. I didn't need to use ALPN.

We're using APN as legacy support, now my task is to see if we actually need this support at all.

@judepereira
Copy link
Member

Can you run a quick test on it?

@aclowkey
Copy link
Author

aclowkey commented Jun 15, 2018 via email

@aclowkey
Copy link
Author

@judepereira We have decided to deprecate the APNS use since we don't have any users subscribed to it.

I would be happy to help in testing, however, I don't have the means an (IOS device ,etc)

@kungfoo
Copy link

kungfoo commented Mar 31, 2019

This seems to still be the case on jdk-11.

@DziubaR
Copy link

DziubaR commented Mar 15, 2021

@judepereira Can you take a look on this pr? 👆🏼

@judepereira
Copy link
Member

@DziubaR On it :)

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

4 participants