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

Atmosphere causes java.lang.Linkage error if included in basic vert.x Maven project #6

Open
lonerzzz opened this issue Aug 12, 2013 · 0 comments

Comments

@lonerzzz
Copy link

If the atmosphere vert.x plugin is listed as a dependency in a basic vert.x project created using the vertx archetype from eclipse, then the basic installed code gets a Linkage error when the unit tests are run:

java.lang.LinkageError: loader constraint violation: loader (instance of org/vertx/java/platform/impl/ModuleClassLoader) previously initiated loading for a different type with name "org/vertx/java/core/Vertx"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.vertx.java.platform.impl.ModuleClassLoader.doLoadClass(ModuleClassLoader.java:77)
at org.vertx.java.platform.impl.ModuleClassLoader.loadClass(ModuleClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com..PingVerticle.start(PingVerticle.java:32)
at org.vertx.java.platform.Verticle.start(Verticle.java:82)
at org.vertx.java.platform.impl.DefaultPlatformManager$18.run(DefaultPlatformManager.java:1278)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:171)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:353)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:724)

Steps to reproduce:

  1. Create vertx maven project using vertx archetype available in eclipse Juno
  2. Edit pom file to add dependency for atmosphere in project
  3. Run unit tests with 'maven install' command
  4. Boom
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