aspose file tools*
The moose likes Java in General and the fly likes EnumConstantNotPresentExceptionProxy with annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "EnumConstantNotPresentExceptionProxy with annotations" Watch "EnumConstantNotPresentExceptionProxy with annotations" New topic
Author

EnumConstantNotPresentExceptionProxy with annotations

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
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 ...


JDBCSupport - An easy to use, light-weight JDBC framework -
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Can you show us the code for SupportedTypes? And can you also show the class header of whatever "clazz" is?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
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

Joined: Oct 27, 2005
Posts: 19697
    
  20

Thanks for sharing the solution
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EnumConstantNotPresentExceptionProxy with annotations