Open pjagielski opened 11 years ago
May I ask you which version of vertx the vertx-gradle-template
use?
Now, mod-socket-io
uses vertx 2.0.0-final.
Therefore, I think, It can be one of the reason of the problem that two version(2.0.0-final and another) of vertx loaded by it and the VertxFactory
's casting was failed.
Can you give me more error stack and some way that I can reproduce the error?
Thanks
And I also want to know how did you get and which version of the mod-socket-io
and put it in to your application.
Thanks
Sorry for late reply, I didn't receive any email with your questions. I managed to reproduce this by:
SampleVertice
to sources and mark it as main in mod.jsonorg.vertx.java.platform.impl.java.JavaVerticleFactory cannot be cast to org.vertx.java.platform.VerticleFactory
OMG;; I didn't know that you comment too.
It looks like this issue is related with this, https://groups.google.com/forum/#!topic/vertx/S946Jr0igQM.
Hmm.. I had to use Vert.x's core and platform dependency as a compile time scope when I was developing the module but It seems make sense to remove those dependencies when other modules uses it, because the other modules will be provided those dependencies by the Vert.x
So, there are some options to this problem.
I will try the first solution but I'm not sure when I can finish it, so you can try the second one. I will let you know when I'm done the first one by new comment on this thread.
Anyway, you can use the latest version of the module, which is 1.0.2.
<dependecy>
<groupId>com.nhncorp</groupId>
<artifactId>mod-socket-io</artifactId>
<version>1.0.2</version>
</dependency>
Thanks,
Keesun
Running mod-socket-io in project cloned from https://github.com/vert-x/vertx-gradle-template throws this exception:
Caused by: java.lang.ClassCastException: org.vertx.java.platform.impl.java.JavaVerticleFactory cannot be cast to org.vertx.java.platform.VerticleFactory
Possible classloading problem.