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

println "hello" ... in web-console causes unhandled exception on the server side #10

Open
paul-hammant opened this issue Mar 6, 2016 · 0 comments

Comments

@paul-hammant
Copy link

Groovy 2.4.5, JDK 9-ea, Gradle 2.11

[ratpack-compute-1-1] ERROR ratpack.error.internal.DefaultDevelopmentErrorHandler - exception thrown for request to /execute
ratpack.render.RendererException: Renderer 'ratpack.example.groovywebconsole.ScriptResultRenderer@3b9f982' failed to render 'ratpack.example.groovywebconsole.ScriptResult@5ed2929f'
    at ratpack.render.internal.DefaultRenderController.doRender(DefaultRenderController.java:71)
    at ratpack.render.internal.DefaultRenderController.doRender(DefaultRenderController.java:58)
    at ratpack.render.internal.DefaultRenderController.render(DefaultRenderController.java:43)
    at ratpack.handling.internal.DefaultContext.render(DefaultContext.java:270)
    at ratpack.groovy.handling.internal.DefaultGroovyContext.render(DefaultGroovyContext.java:161)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:520)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:382)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:163)
    at ratpack$_run_closure1$_closure3$_closure6$_closure9.doCall(ratpack.groovy:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:520)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
    at groovy.lang.Closure.call(Closure.java:423)
    at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedCjava:51)
    at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:103)
    at com.sun.proxy.$Proxy14.execute(Unknown Source)
    at ratpack.exec.internal.DefaultPromise$1.success(DefaultPromise.java:42)
    at ratpack.exec.Promise.lambda$null$33(Promise.java:239)
    at ratpack.exec.Downstream$1.success(Downstream.java:72)
    at ratpack.exec.internal.DefaultExecution$2.lambda$success$128(DefaultExecution.java:174)
    at ratpack.exec.internal.DefaultExecution$StreamHandle.lambda$complete$132(DefaultExecution.java:224)
    at ratpack.exec.internal.DefaultExecution.intercept(DefaultExecution.java:359)
    at ratpack.exec.internal.DefaultExecution.intercept(DefaultExecution.java:331)
    at ratpack.exec.internal.DefaultExecution.drain(DefaultExecution.java:300)
    at ratpack.exec.internal.DefaultExecution.<init>(DefaultExecution.java:103)
    at ratpack.exec.internal.DefaultExecController$1.start(DefaultExecController.java:178)
    at ratpack.handling.internal.DefaultContext.start(DefaultContext.java:159)
    at ratpack.server.internal.NettyHandlerAdapter.channelRead0(NettyHandlerAdapter.java:131)
    at ratpack.server.internal.NettyHandlerAdapter.channelRead0(NettyHandlerAdapter.java:53)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
    at ratpack.server.internal.NettyHandlerAdapter.channelRead(NettyHandlerAdapter.java:85)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:83)
    at io.netty.channel.DefaultChannelHandlerInvoker$7.run(DefaultChannelHandlerInvoker.java:158)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:322)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:356)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:703)
    at ratpack.exec.internal.DefaultExecController$ExecControllerBindingThreadFactory.lambda$newThread$139(DefaultExecController.java:116)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDr.run(DefaultThreadFactory.java:137)
    at java.lang.Thread.run(Thread.java:804)
Caused by: java.lang.ClassCastException: [B cannot be cast to [C
    at groovy.json.internal.FastStringUtils$StringImplementation$1.toCharArray(FastStringUtils.java:89)
    at groovy.json.internal.FastStringUtils.toCharArray(FastStringUtils.java:174)
    at groovy.json.internal.CharBuf.addJsonFieldName(CharBuf.java:515)
    at groovy.json.JsonOutput.writeMap(JsonOutput.java:420)
    at groovy.json.JsonOutput.writeObject(JsonOutput.java:291)
    at groovy.json.JsonOutput.toJson(JsonOutput.java:184)
    at ratpack.example.groovywebconsole.ScriptResultRenderer$_render_closure1$_closure2.doCall(ScriptResultRenderer.groovy:16)
    at ratpack.example.groovywebconsole.ScriptResultRenderer$_render_closure1$_closure2.doCall(ScriptResultRenderer.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:520)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
    at groovy.lang.Closure.call(Closure.java:423)
    at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:51)
    at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:103)
    at com.sun.proxy.$Proxy32.execute(Unknown Source)
    at ratpack.handling.internal.ContentNegotiationHandler.handle(ContentNegotiationHandler.java:61)
    at ratpack.handling.internal.DefaultContext.byContent(DefaultContext.java:421)
    at ratpack.groovy.handling.internal.DefaultGroovyContext.byContent(DefaultGroovyContext.java:79)
    at ratpack.example.groovywebconsole.ScriptResultRenderer.render(ScriptResultRenderer.groovy:14)
    at ratpack.example.groovywebconsole.ScriptResultRenderer.render(ScriptResultRenderer.groovy)
    at ratpack.groovy.render.GroovyRendererSupport.render(GroovyRendererSupport.java:39)
    at ratpack.render.internal.DefaultRenderController.doRender(DefaultRenderController.java:68)
    ... 50 more

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

1 participant