This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Unexpected error #392
Copy link
Copy link
Closed
Description
Since upgrading from AA 2.6 to 2.7, I have this error.
So the _ classes are no more generated in .apt.
The line the error occurs changes at each compilation time.
I run Eclipse 4.2.1.
Thanks !
Unexpected error. Please report an issue on AndroidAnnotations, with the following content: java.lang.reflect.UndeclaredThrowableException
at $Proxy20.value(Unknown Source)
at com.googlecode.androidannotations.processing.rest.RestProcessor.process(RestProcessor.java:84)
at com.googlecode.androidannotations.processing.ModelProcessor.process(ModelProcessor.java:47)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processAnnotations(AndroidAnnotationProcessor.java:472)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processThrowing(AndroidAnnotationProcessor.java:343)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.process(AndroidAnnotationProcessor.java:318)
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:820)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.NoSuchMethodException: method value() does not exist on annotation@com.googlecode.androidannotations.annotations.rest.Rest
at org.eclipse.jdt.internal.compiler.apt.model.AnnotationMirrorImpl.invoke(AnnotationMirrorImpl.java:205)
... 30 more
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
DayS commentedon Nov 9, 2012
Since the 2.7,
value()attribute of@Restannotation has been renamed inrootUrl(). This is explained on issue #377Just update this on your code and it should works fine.
mathieuboniface commentedon Nov 9, 2012
Hi Calexo,
AndroidAnnotations needs two jars :
androidannotations.jarandandroidannotations-api.jarCould you check these two jars are in the same version ?
For more informations, see #392, #378 and Configuring eclipse section
I think you are mixing
androidannotation.jar:2.7andandroidannotation-api.jar:2.6calexo commentedon Nov 9, 2012
@DayS Thanks, but I already updated my code...
More, issues are for example on :
@UiThread
public void startUI()
And, not on Rest concerned classes or functions.
@mathieuboniface Yes, I have androidannotations-2.7.jar in ext-libs/ and androidannotations-api-2.7.jar in libs/
calexo commentedon Nov 9, 2012
@mathieuboniface #392 is this issue ;-)
#378 doesn't solve my issue, since the two jars come from the released zip...
DayS commentedon Nov 9, 2012
Hum.
Line 84 in RestProcessor.java is pointing on an empty line for AA 2.7.
However, for AA 2.6, this line is the following
defaultConstructor.body().assign(holder.rootUrlField, JExpr.lit(typeElement.getAnnotation(Rest.class).value()));. It's seems to fit with the stacktrace.Make sure to verify the project configuration. Then try to clean it to force an update and recompilation.
As @mathieuboniface said, the api and implementation seems to be mixed up for Eclipse cache :)
calexo commentedon Nov 9, 2012
Well, of course, you're right... 👍
Sorry...
A strange link to the 2.6 in another directory was existing in factorypath :-(
Removing that reference, and now everythings OK !
Thanks a lot for your quick support !
DayS commentedon Nov 9, 2012
You're welcome :) I'm closing this issue.