scalaxb 1.2.1 - ConnectException: Worker has already been shutdown

75 views
Skip to first unread message

alboko

unread,
Jul 22, 2014, 1:20:20 PM7/22/14
to sca...@googlegroups.com
Hi Eugene and everyone,

I need a bit of your wisdom (or at least a hint) to help me understand where a problem is:

I updated my SOAP client Scala code to scalaxb (1.2.1) and switched to Features. But now I'm getting a ConnectException: Worker has already been shutdown when making a simple SOAP request:

val service = (new aw.ServicesSOAPBindings with Soap11ClientsAsync with scalaxb.DispatchHttpClientsAsync {}).service

// list providers
service.listProviders(4) onComplete { 
  case Success(respond) => 
    println(s"Respond: code ${respond.ErrorCode}, messsage: ${respond.ErrorMessage}, Providers: ${respond.Providers.size}")
    if (!respond.Providers.isEmpty)
      listKnownProviders(respond.Providers)

  case Failure(failure) => println("Failure I : " + failure.printStackTrace())
}
The service used to work with scalaxb 1.1.2. Am I missing any Netty/Dispatch configuration steps?

Here is the stacktrace:

java.util.concurrent.ExecutionException: java.net.ConnectException: Worker has already been shutdown to https://service.xxxxxxx.com/wsdl/v4/
    at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:342)
    at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:107)
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)
    at org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:145)
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1136)
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:937)
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.nextRequest(NettyAsyncHttpProvider.java:1397)
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.nextRequest(NettyAsyncHttpProvider.java:1393)
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.remotelyClosed(NettyAsyncHttpProvider.java:1514)
    at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:95)
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:418)
    at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380)
    at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$1.operationComplete(NioClientSocketPipelineSink.java:115)
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)
    at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:413)
    at org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:362)
    at org.jboss.netty.channel.AbstractChannel$ChannelCloseFuture.setClosed(AbstractChannel.java:355)
    at org.jboss.netty.channel.AbstractChannel.setClosed(AbstractChannel.java:185)
    at org.jboss.netty.channel.socket.nio.AbstractNioChannel.setClosed(AbstractNioChannel.java:197)
    at org.jboss.netty.channel.socket.nio.NioSocketChannel.setClosed(NioSocketChannel.java:84)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:356)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.close(NioClientBoss.java:167)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:306)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
Thank you in advance,
Alex

eugene yokota

unread,
Jul 22, 2014, 1:31:43 PM7/22/14
to sca...@googlegroups.com
Hi Alex,

I'm not super familiar with this myself, but here's what I think is happening.
I'm guessing that you have declared val service in some method as a local field and by the time the future completes
val service has gone out of scope, and http has been shutdown.

Try keeping the val service around longer, or block on future to see if that works.

-eugene





--
You received this message because you are subscribed to the Google Groups "scalaxb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaxb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Kogan

unread,
Jul 22, 2014, 3:03:53 PM7/22/14
to sca...@googlegroups.com
Eugene, thanks for the hint!

That seems to be the case - I got a different exception now ;o)

Thanks a lot!
Alex

P.S. Thank you for the fix for #245 - it works now!

You received this message because you are subscribed to a topic in the Google Groups "scalaxb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalaxb/-dUkkae9h5M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalaxb+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages