run groovy example error

83 views
Skip to first unread message

expert china

unread,
Apr 28, 2012, 11:39:27 AM4/28/12
to ve...@googlegroups.com
I try to run groovy examples,some work well,but other error
  
for examle:  /RouteMatchServer
D:\dev\git\vertx\src\examples\groovy>vertx run route_match/RouteMatchServer.groovy
四月 28, 2012 11:28:10 下午 org.vertx.java.core.logging.impl.JULLogDelegate error
严重: Exception in Groovy verticle
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.vertx
.groovy.core.http.HttpServerResponse.writeBuffer(Lorg/vertx/groovy/core/buffer/Buffer;)V" the class loader (instance of
groovy/lang/GroovyClassLoader$InnerLoader) of the current class, org/vertx/groovy/core/http/HttpServerResponse, and the
class loader (instance of sun/misc/Launcher$AppClassLoader) for interface org/vertx/groovy/core/streams/WriteStream have
 different Class objects for the type ertx/groovy/core/buffer/Buffer;)V used in the signature
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at org.vertx.groovy.core.http.HttpServerRequest.class$(HttpServerRequest.groovy)
        at org.vertx.groovy.core.http.HttpServerRequest.$get$$class$org$vertx$groovy$core$http$HttpServerResponse(HttpSe
rverRequest.groovy)
        at org.vertx.groovy.core.http.HttpServerRequest.<init>(HttpServerRequest.groovy:46)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
        at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(Construc
torSite.java:102)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
        at org.vertx.groovy.core.http.RouteMatcher$_wrapHandler_closure2.doCall(RouteMatcher.groovy:244)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)


and webapp can not work too!

Thanks!

expert china

unread,
Apr 28, 2012, 11:43:55 AM4/28/12
to ve...@googlegroups.com
WebApp  error msg:

D:\dev\git\vertx\src\examples\groovy\webapp>vertx run App.groovy
四月 28, 2012 11:40:18 下午 org.vertx.java.core.logging.impl.JULLogDelegate error
严重: 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:86)
        at org.vertx.java.deploy.impl.VerticleManager$2.run(VerticleManager.java:295)
        at org.vertx.java.core.impl.DefaultVertx$2.run(DefaultVertx.java:251)
        at org.vertx.java.core.impl.Context$2.run(Context.java:114)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processEventQueue(AbstractNioWorker.java:352)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:236)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:38)
        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: groovy.lang.MissingMethodException: No signature of method: org.vertx.groovy.deploy.Container.deployVerticle(
) is applicable for argument types: (java.lang.String, webapp.App$_run_closure1_closure2) values: [mongo-persistor, weba
pp.App$_run_closure1_closure2@49cd367c]
Possible solutions: deployVerticle(java.lang.String), deployVerticle(java.lang.String, int), deployVerticle(java.lang.St
ring, java.util.Map), deployVerticle(java.lang.String, java.util.Map, int), deployVerticle(java.lang.String, java.util.M
ap, int, groovy.lang.Closure), undeployVerticle(java.lang.String)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
        at webapp.App$_run_closure1.doCall(App.groovy:65)

Tim Fox

unread,
Apr 29, 2012, 3:07:19 AM4/29/12
to ve...@googlegroups.com
Are you using a binary version? If so, which one?

Tim Fox

unread,
Apr 29, 2012, 3:21:16 AM4/29/12
to ve...@googlegroups.com
Ok.... I can tell from your stack trace you must have built from master.

Master is the current state of development and we don't make any guarantees as to whether it works or not. I'm currently preparing for a release on Monday, and the errors you see refer to changes I have yet to make.

If you want a stable release, use a binary, or build from a tag :)


On 28/04/2012 16:43, expert china wrote:
Reply all
Reply to author
Forward
0 new messages