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

com.sun.tools.javac.code.Symbol$VarSymbol cannot be cast to javax.lang.model.element.ExecutableElement #30

Closed
iNoles opened this issue Jun 3, 2016 · 4 comments

Comments

@iNoles
Copy link
Contributor

iNoles commented Jun 3, 2016

Caused by: java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$VarSymbol cannot be cast to javax.lang.model.element.ExecutableElement
21:21:46.218 [ERROR] [org.gradle.BuildExceptionReporter]    at com.tickaroo.tikxml.processor.scanning.FieldScanner.doScan(FieldScanner.kt:87)
21:21:46.218 [ERROR] [org.gradle.BuildExceptionReporter]    at com.tickaroo.tikxml.processor.scanning.FieldScanner.scan(FieldScanner.kt:53)
21:21:46.218 [ERROR] [org.gradle.BuildExceptionReporter]    at com.tickaroo.tikxml.processor.XmlProcessor.process(XmlProcessor.java:147)
21:21:46.218 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
21:21:46.218 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
21:21:46.220 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
21:21:46.222 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
21:21:46.222 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
21:21:46.222 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
21:21:46.222 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
21:21:46.222 [ERROR] [org.gradle.BuildExceptionReporter]    at com.sun.tools.javac.main.Main.compile(Main.java:523)
@FabianTerhorst
Copy link
Contributor

I think scan mode default is not working, use annotations only mode instead.

@sockeqwe
Copy link
Contributor

sockeqwe commented Jun 3, 2016

Yes, there is a known bug with scanmode default, not sure if this is the
issue or not. Could you give me a little bit more information: do you know
which class is throws this error and could you post the code of this class?

Fabian Terhorst notifications@github.com schrieb am Fr., 3. Juni 2016,
09:40:

I think scan mode default is not working, use annotations only mode
instead.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#30 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAjnrn9X1qDwa4gksZZmN-TP3TLDuI_Uks5qH8xVgaJpZM4ItIG6
.

@iNoles
Copy link
Contributor Author

iNoles commented Jun 4, 2016

@Xml(name = "rosterEntry")
class Rosters {
    String firstName;
    String lastName;
    String position;
    String isCoach;
}

@sockeqwe
Copy link
Contributor

sockeqwe commented Jun 5, 2016

Thanks for reporting. I have fixed that. The problem was the "is" Prefix of isCoach.

A new snapshot 0.5.2-SNAPSHOT containing this fix is available.

Btw. you can make boolean isCoach and TikXml will automatically convert String "true" to boolean value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants