ebean-orm-tools / ebean-eclipse-enhancer

Eclipse plugin for Ebean ORM enhancement
3 stars 7 forks source link

plugin tries to enhance classes that aren't entities, fails using java 8 #2

Closed jgangemi closed 9 years ago

jgangemi commented 9 years ago

i have two classes in a package, one has @Table and @Entity annotations, the other is just a regular pojo. it looks like the enhancer is trying to enhance the pojo along side the annotated class which results in an exception under java 8.

java.lang.ArrayIndexOutOfBoundsException: 4162
    at com.avaje.ebean.enhance.asm.ClassReader.readClass(ClassReader.java:1976)
    at com.avaje.ebean.enhance.asm.ClassReader.accept(ClassReader.java:464)
    at com.avaje.ebean.enhance.asm.ClassReader.accept(ClassReader.java:420)
    at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder$DetermineClass.getClassName(EnhanceBuilder.java:155)
    at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder.checkResource(EnhanceBuilder.java:75)
    at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder.access$0(EnhanceBuilder.java:61)
    at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder$DeltaVisitor.visit(EnhanceBuilder.java:221)

compiling via maven doesn't produce this problem.

i wouldn't label this urgent, just more of an annoyance and something that could be potentially confusing to others.

rbygrave commented 9 years ago

I'm unable to reproduce this. I'm using java 8 with a pojo and enhancing all fine - no errors in the eclipse log or enhance.log.

Those line numbers in the stack trace don't actually look right. It almost looks like that is the old agent and not the new one - could that be the case?

Cheers, Rob.

On 29 October 2014 14:19, Jae Gangemi notifications@github.com wrote:

i have two classes in a package, one has @Table and @Entity annotations, the other is just a regular pojo. it looks like the enhancer is trying to enhance the pojo along side the annotated class which results in an exception under java 8.

java.lang.ArrayIndexOutOfBoundsException: 4162 at com.avaje.ebean.enhance.asm.ClassReader.readClass(ClassReader.java:1976) at com.avaje.ebean.enhance.asm.ClassReader.accept(ClassReader.java:464) at com.avaje.ebean.enhance.asm.ClassReader.accept(ClassReader.java:420) at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder$DetermineClass.getClassName(EnhanceBuilder.java:155) at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder.checkResource(EnhanceBuilder.java:75) at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder.access$0(EnhanceBuilder.java:61) at com.avaje.ebean.eclipse.internal.enhancer.builder.EnhanceBuilder$DeltaVisitor.visit(EnhanceBuilder.java:221)

compiling via maven doesn't produce this problem.

i wouldn't label this urgent, just more of an annoyance and something that could be potentially confusing to others.

— Reply to this email directly or view it on GitHub https://github.com/ebean-orm/avaje-ebeanorm-eclipse/issues/2.

jgangemi commented 9 years ago

yeah - i installed 4.0.1 before i realized i didn't flip over the version to use in the manifest (sorry about missing that) and then it looks like eclipse wasn't fully uninstalling it for some reason. manually deleting the jar and then installing worked.

thanks!