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

Fix for using tcpkeepalive with groovy netserver #262

Merged
merged 1 commit into from Jul 5, 2012
Merged

Fix for using tcpkeepalive with groovy netserver #262

merged 1 commit into from Jul 5, 2012

Conversation

aurelienmaury
Copy link

A simple verticle like this one, in Groovy :

def server = vertx.createNetServer(TCPKeepAlive: true)

server.connectHandler { sock ->
  println 'Client has connected'
}

server.listen(8080, 'localhost')

leads to :

Exception in Groovy verticle 
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.vertx.java.deploy.impl.groovy.GroovyVerticleFactory$1.start(GroovyVerticleFactory.java:101)
    at org.vertx.java.deploy.impl.VerticleManager$9.run(VerticleManager.java:615)
    at org.vertx.java.core.impl.Context$2.run(Context.java:118)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processEventQueue(AbstractNioWorker.java:360)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:244)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:38)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.vertx.java.core.net.impl.DefaultNetServer@24243e9f' with class 'org.vertx.java.core.net.impl.DefaultNetServer' to class 'org.vertx.groovy.core.net.NetServer'
    at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:360)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599)
    at org.vertx.groovy.core.net.NetServer.setTCPKeepAlive(NetServer.groovy:180)

Fix included.

@purplefox
Copy link
Contributor

thanks

purplefox added a commit that referenced this pull request Jul 5, 2012
…ive_fix

Fix for using tcpkeepalive with groovy netserver
@purplefox purplefox merged commit e8e069a into eclipse-vertx:master Jul 5, 2012
purplefox added a commit that referenced this pull request May 10, 2013
…ive_fix

Fix for using tcpkeepalive with groovy netserver
rmelick pushed a commit to rmelick/vert.x that referenced this pull request Feb 20, 2017
…sbridge-msg-delivery

EventbusBridge sends headers in messages to eventbus js client
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

Successfully merging this pull request may close these issues.

None yet

2 participants