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

Eclipse Mars Integration error #68

Closed
JeffLeFoll opened this Issue Nov 18, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@JeffLeFoll

JeffLeFoll commented Nov 18, 2015

Hello Séven,

I'm new to Selma and Annotation Processing and 'im tring to get it working on my project.
We use Eclipse Mars and the jdk 1.8.0_45.

I have put the 3 jars (selma, selma-processor and javawriter in the Annotation processor's Factory Path configuration).

I have tried with Selma 0.12 and a 0.13 localy build with the jdk 1.8.0_45.

When trying to build I have the following error appearing in the Eclipse Mars' log :

!ENTRY org.eclipse.jdt.apt.pluggable.core 4 1 2015-11-18 10:49:50.829
!MESSAGE Exception thrown by Java annotation processor fr.xebia.extras.selma.codegen.MapperProcessor@5008f9
!STACK 0
java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.apt.model.AnnotationValueImpl cannot be cast to javax.lang.model.element.AnnotationMirror
at fr.xebia.extras.selma.codegen.AnnotationWrapper.getAsAnnotationWrapper(AnnotationWrapper.java:98)
at fr.xebia.extras.selma.codegen.FieldsWrapper.processFieldsFromMapper(FieldsWrapper.java:70)
at fr.xebia.extras.selma.codegen.FieldsWrapper.(FieldsWrapper.java:63)
at fr.xebia.extras.selma.codegen.MapperWrapper.(MapperWrapper.java:88)
at fr.xebia.extras.selma.codegen.MapperClassGenerator.(MapperClassGenerator.java:56)
at fr.xebia.extras.selma.codegen.MapperProcessor.generateMappingClassses(MapperProcessor.java:87)
at fr.xebia.extras.selma.codegen.MapperProcessor.process(MapperProcessor.java:73)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:909)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:367)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:179)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:304)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:61)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I don't know if I miss someting during the setup of Eclipse. I will try with an old version of Eclipse (Luna) to check.

Thank you for your tool :)

@slemesle

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Nov 18, 2015

Hi,

I tried a fix on the AnnotationWrapper it was casting as AnnotationMirror the wrong object value instead of value.getValue().

It should be fixed in snapshot build could you give it a try and let me know ?

slemesle commented Nov 18, 2015

Hi,

I tried a fix on the AnnotationWrapper it was casting as AnnotationMirror the wrong object value instead of value.getValue().

It should be fixed in snapshot build could you give it a try and let me know ?

@JeffLeFoll

This comment has been minimized.

Show comment
Hide comment
@JeffLeFoll

JeffLeFoll Nov 18, 2015

Great! It's working like a charm.

Thanks for your rapidity (and sorry to not had time to make a pull request).

JeffLeFoll commented Nov 18, 2015

Great! It's working like a charm.

Thanks for your rapidity (and sorry to not had time to make a pull request).

@slemesle

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Nov 18, 2015

The bug was easy to solve.

You're welcome ...

slemesle commented Nov 18, 2015

The bug was easy to solve.

You're welcome ...

@slemesle slemesle added this to the 0.13 milestone Nov 18, 2015

@slemesle slemesle added the bug label Nov 18, 2015

@slemesle slemesle closed this Nov 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment