Netty problem when making https request with Play WS

369 views
Skip to first unread message

Kevin Letupe

unread,
Jul 13, 2016, 3:23:23 PM7/13/16
to play-framework
Hello everybody.

I'm getting an error with Play WS while making https request (to foursquare API). My message error is :

Caused by: java.lang.NoSuchMethodError: org.jboss.netty.handler.ssl.SslHandler.<init>(Ljavax/net/ssl/SSLEngine;Lorg/jboss/netty/handler/ssl/SslBufferPool;ZLorg/jboss/netty/util/Timer;J)V
    at com
.ning.http.client.providers.netty.channel.ChannelManager.createSslHandler(ChannelManager.java:400)
    at com
.ning.http.client.providers.netty.channel.SslInitializer.connectRequested(SslInitializer.java:44)
    at org
.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)
    at org
.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:97)
    at org
.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:109)
    at org
.jboss.netty.channel.Channels.connect(Channels.java:634)
    at org
.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207)
    at org
.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229)
    at org
.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182)
    at com
.ning.http.client.providers.netty.request.NettyRequestSender.connect(NettyRequestSender.java:378)
    at com
.ning.http.client.providers.netty.request.NettyRequestSender.sendRequestWithNewChannel(NettyRequestSender.java:282)
    at com
.ning.http.client.providers.netty.request.NettyRequestSender.sendRequestWithCertainForceConnect(NettyRequestSender.java:140)
    at com
.ning.http.client.providers.netty.request.NettyRequestSender.sendRequest(NettyRequestSender.java:115)
    at com
.ning.http.client.providers.netty.request.NettyRequestSender.sendNextRequest(NettyRequestSender.java:494)
    at com
.ning.http.client.providers.netty.handler.Protocol.exitAfterHandlingRedirect(Protocol.java:172)
    at com
.ning.http.client.providers.netty.handler.HttpProtocol.handleHttpResponse(HttpProtocol.java:423)
    at com
.ning.http.client.providers.netty.handler.HttpProtocol.handle(HttpProtocol.java:470)
    at com
.ning.http.client.providers.netty.handler.Processor.messageReceived(Processor.java:88)
    at org
.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:142)
    at org
.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:108)
    at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org
.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
    at org
.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
    at org
.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
    at org
.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:92)
    at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org
.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
    at org
.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
    at org
.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
    at org
.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
    at org
.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)

I don't understand this error message... After some research, it seems like an netty versions incompatibility. I'm using spark too and i don't know if the problem come from here.
Or maybe the problem come from the https request. I'm lost ...

I use Play-ws version 2.4.6 and scala 2.10.6

I already thank you for your answers !

Greg Methvin

unread,
Jul 13, 2016, 6:10:32 PM7/13/16
to play-framework
It would probably help you to know which version of spark you are using and which version of netty that is pulling in. Then you can decide if there is some way to address the issue with a version override.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/5e73a727-3fbd-4d17-a55b-45f7cb89a600%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Senior Software Engineer

ScalaUser

unread,
Aug 16, 2016, 7:40:05 AM8/16/16
to play-framework
Using Play 2.5.4, play ws 2.5.4, I have seen the following.

Doing a simple get request of the test url in the browser works, at the same time Play WS is throwing below exceptions(while it works without any problems sometimes), this is making us to restart the play server once in 2-3 days.




play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[ConnectException: connection timed out: myserver.com/54.221.252.53:443]]

        at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:280)

        at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:206)

        at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:100)

        at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:99)

        at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:346)

        at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:345)

        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)

        at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70)

        at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40)

        at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248)

Caused by: java.net.ConnectException: connection timed out: 42matters.com/54.221.252.53:443

        at org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:138)

        at org.asynchttpclient.netty.request.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:106)

        at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28)

        at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20)

        at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:683)

        at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:604)

        at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:564)

        at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:425)

        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:222)

        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)

Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: 42matters.com/54.221.252.53:443

        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:220)

        ... 7 common frames omitted


Reply all
Reply to author
Forward
0 new messages