This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EnumConstantNotPresentExceptionProxy with annotations

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I am trying to get an annotation from a class like this:



This perfectly works most of the time, sometimes however, it throws an Exception and I have no clue where this comes from:




Please help ...
 
Rob Spoor
Sheriff
Pie
Posts: 20380
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us the code for SupportedTypes? And can you also show the class header of whatever "clazz" is?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

thanks for your reply ...

the problem is fixed now ... this is what went wrong:

the annotation looks like this:







The project is a maven project and this is what the problem is. The message type enum passed to the SupportedTypes annotation is in another project. The message type got changed and maven did not rebuild the project so the compiler did not complain at the SupportedTypes annotation. hence the enum exception. It did not find the enum element specified since it was not available anymore.
 
Rob Spoor
Sheriff
Pie
Posts: 20380
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing the solution
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic