2

A similar problem as in Compatibility Issue of ASM 3.1 and HIbernate and JAX-RS seems to have hit me: my Jersey / JPA based rest application which also uses jersey-moxy (version 1.15 of jersey) throws an error:

Caused by: java.lang.NoSuchMethodError: org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(Lorg/eclipse/persistence/internal/libraries/asm/ClassVisitor;[Lorg/eclipse/persistence/internal/libraries/asm/Attribute;Z)V

My maven dependency list shows:

  • asm-3.1.jar
  • jersey-moxy-1.15.jar
  • org.eclipse.persistence.asm-2.3.2.jar

if i remove jersey-moxy 1.15 from the dependency the problem goes away but then I can't use the extra MOXy features.

If exclude the org.eclipse.persistence.asm dependency i get:

Internal Exception: java.lang.SecurityException: class "org.eclipse.persistence.sessions.factories.SessionManager"'s signer information does not match signer information of other classes in the same package

What would be a solution to this situation?

Community
  • 1
  • 1
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
  • try to use [maven-duplicate-finder-plugin](https://github.com/ning/maven-duplicate-finder-plugin) to detect duplicates in your WAR, maybe will help – yegor256 Dec 23 '12 at 10:33

1 Answers1

1

This issue isn't the same as Compatibility Issue of ASM 3.1 and HIbernate and JAX-RS. EclipseLink specifically ships a repackaged version of ASM to specifically avoid this issue.

I'm not familiar with the jersey-moxy-1.15.jar (could you provide additional info on this one?). MOXy requires the following bundles:

  • org.eclipse.persistence.moxy_2.4.1.v20121003-ad44345.jar
  • org.eclipse.persistence.core_2.4.1.v20121003-ad44345.jar
  • org.eclipse.persistence.asm_3.3.1.v201206041142.jar

If you are using MOXy for JSON binding (see http://blog.bdoughan.com/2012/05/moxy-as-your-jax-rs-json-provider.html), then you also require the following bundle:

  • org.eclipse.persistence.antlr_3.2.0.v201206041011.jar
Community
  • 1
  • 1
bdoughan
  • 147,609
  • 23
  • 300
  • 400
  • I'd love to accept this answer but so far i could not get MOXy to work. I tried several times but there have always been strange incomprehensible issues. I'll post when I start another try. – Wolfgang Fahl Feb 14 '13 at 22:41