0

This error:

java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter

while running Hibernate mostly occurs when the asm jar is not updated to the latest, and well be resolved by upgrading the asm jar version. That's not my question.

As well explained in this SO : Error : java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V

ie: by excluding current usage

<exclusion>
    <groupId>asm</groupId>
    <artifactId>asm</artifactId>
</exclusion>
<exclusion>
    <groupId>asm</groupId>
    <artifactId>asm-attrs</artifactId>
</exclusion>

and include

<dependency>
    <groupId>asm</groupId>
    <artifactId>asm</artifactId>
    <version>3.1</version>
</dependency>

My specific question/looking for some kind of confirmation:

I created a maven project with Spring, Hibernate

Spring: 3.2.2.RELEASE, Hibernate: 3.2.7.ga [The asm jar version resolved by Maven is asm1.5.3]

This is running good, no issues.

Recently another person reported an error on the same project with the same dependencies with the error stating 'java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter'

I understand, upgrading the asm version to the latest version might address this issue. But since we have the same project and dependencies, what else could be the trigger for this issue?

Note: AFAIK there are no new dependencies in the other workspace, other than may be a higher JRE (mine is 1.6)

Community
  • 1
  • 1
spiderman
  • 10,892
  • 12
  • 50
  • 84

1 Answers1

1

Try to ask him clean local maven repo. Maybe there is some conflicts in dependencies versions.

Evgeny Makarov
  • 1,417
  • 1
  • 21
  • 41