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

Java 7 compatibility - ASM/ CGLIB upgrade needed #430

Closed
kbachl opened this issue Jun 3, 2013 · 9 comments
Closed

Java 7 compatibility - ASM/ CGLIB upgrade needed #430

kbachl opened this issue Jun 3, 2013 · 9 comments
Milestone

Comments

@kbachl
Copy link

@kbachl kbachl commented Jun 3, 2013

Hi,

currently querydsl uses CGLIB 2.2.2 which in turn uses ASM 3.3.1; It is required to upgrade to upgrade to CGLIB 3.0 that uses ASM 4.0 so querydsl is fully Java 7 comatible.

Currently projects compiled with source=1.7, target=1.7 using queryDSL will produce
"java.lang.VerifyError: Expecting a stackmap frame at branch target 45 in method...." errors on deploy as ASM 3.x doesnt care about the newly introuced Java 7 stackmaps.

While in Java 7 the workaround is "-XX:-UseSplitVerifier" , this switch is deprecated for Java 8 and not existing there anymore.

references see:
http://asm.ow2.org/history.html (e.g.: ASM 4.0 RC -> full support of Java 7)
http://chrononsystems.com/blog/java-7-design-flaw-leads-to-huge-backward-step-for-the-jvm.

timowest added a commit that referenced this issue Jun 8, 2013
@timowest
Copy link
Member

@timowest timowest commented Jun 26, 2013

Released in 3.2.1

@timowest timowest closed this Jun 26, 2013
@timowest timowest reopened this Jun 27, 2013
@timowest
Copy link
Member

@timowest timowest commented Jun 27, 2013

Unfortunately the cglib dependency upgrade was unsuccessful, since querydsl-core used a hardcoded version of cglib.

timowest added a commit that referenced this issue Jul 1, 2013
@timowest
Copy link
Member

@timowest timowest commented Jul 1, 2013

Could you verify the fix also on your side with the latest SNAPSHOT from https://oss.sonatype.org/content/repositories/snapshots/

@timowest
Copy link
Member

@timowest timowest commented Jul 3, 2013

Batoo JPA seems to use an older version of ASM, I will see if a newer version of Batoo would fit better.

@kbachl
Copy link
Author

@kbachl kbachl commented Jul 4, 2013

If I look at the current master pom.xml, its still old:

https://github.com/BatooOrg/BatooJPA/blob/master/pom.xml

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

IMHO thats the problem of using too many - quite unknown - libraries. Especially if you take in mind that this is a incompatibility to Java 7, the current version for over 2 years and that Java 6 is completely deprecated by now.

PS: why do you need bato JPA and dont use any of the official ones?

@timowest
Copy link
Member

@timowest timowest commented Jul 4, 2013

The Batoo JPA dependency is used for testing. Hibernate, EclipseLink and OpenJPA are also used as dependencies.

@kbachl
Copy link
Author

@kbachl kbachl commented Jul 5, 2013

well, batto-jpa is scoped as test, so AFAIK this should not go into the compile.....

@timowest
Copy link
Member

@timowest timowest commented Jul 5, 2013

Yes, but there is still a conflict.

@timowest
Copy link
Member

@timowest timowest commented Jul 21, 2013

I can't yet upgrade Cglib to 3.0 because of the Batoo conflict. Querydsl is though compatible with Cglib 3.0 and ASM 4.0.

Excluding Cglib from Querydsl and adding the following dependencies will fix your setup

<dependency>
  <groupId>cglib</groupId>
  <artifactId>cglib</artifactId>
  <version>3.0</version>
</dependency>
<dependency>
  <groupId>org.ow2.asm</groupId>
  <artifactId>asm-util</artifactId>
  <version>4.0</version>
</dependency>
@timowest timowest closed this Jul 21, 2013
timowest added a commit that referenced this issue Jul 21, 2013
@timowest timowest added this to the 3.2.1 milestone Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants