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

statically compiled verticles that subclass org.vertx.groovy.platform.Verticle fail #15

Open
RichardWarburton opened this issue Jul 22, 2013 · 3 comments
Assignees

Comments

@RichardWarburton
Copy link

If my groovy verticle (ReportAggregator) is loaded as a class, eg using "groovy:org.jclarity.jpdm.reporting.verticles.ReportAggregator" and it subclasses the Java Verticle class then it gets correctly loaded, if it subclasses the Groovy Verticle class then the error at the end of this issue occurs.

I suspect its because in this commit:
63e3ed7
you're loading the 'Verticle' class from a different class loader to the user's custom Verticle class, so the if statement on line 112 can never pass.

1170 [vert.x-eventloop-thread-3] ERROR c.j.j.r.ReportingAgentTestBase - Cannot cast object 'org.jclarity.jpdm.reporting.verticles.ReportAggregator@1f109723' with class 'org.jclarity.jpdm.reporting.verticles.ReportAggregator' to class 'org.vertx.java.platform.Verticle'
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.jclarity.jpdm.reporting.verticles.ReportAggregator@1f109723' with class 'org.jclarity.jpdm.reporting.verticles.ReportAggregator' to class 'org.vertx.java.platform.Verticle'
    at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:360) ~[groovy-all-2.1.5.jar:2.1.5]
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599) ~[groovy-all-2.1.5.jar:2.1.5]
    at org.vertx.groovy.platform.impl.GroovyVerticleFactory.createVerticle(GroovyVerticleFactory.groovy:119) ~[lang-groovy-2.0.0-final.jar:na]
    at org.vertx.java.platform.impl.DefaultPlatformManager$18.run(DefaultPlatformManager.java:1269) ~[vertx-platform-2.0.0-final.jar:na]
    at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:171) [vertx-core-2.0.0-final.jar:na]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:353) [netty-all-4.0.2.Final.jar:na]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366) [netty-all-4.0.2.Final.jar:na]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.2.Final.jar:na]
    at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03]
@ghost ghost assigned LostInBrittany Jan 13, 2014
@LostInBrittany
Copy link
Contributor

Is this still an issue? It it hasn't be corrected, I'll look at it this week.

@senagbe
Copy link

senagbe commented Mar 1, 2016

Is this still an issue? I seem to be getting the same problem with 3.2.1

@pmlopes
Copy link

pmlopes commented Mar 4, 2016

@senagbe please report 3.x issues to https://github.com/vert-x3/vertx-lang-python since its where development happens!

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

4 participants