I have created a project in eclipse with the google plugin that should run on the app engine. Therefore it uses the datanucleus framework and JDO. Because of eclipse everytime you change a class in the build path, the datanucleus Enhancer runs and enhances the classes that should be persistent (capable or award).

I wrote a test case to test some code using the annotations @RunWith and @Test, plus some more for the spring configuration (@ContextConfiguration and @Autowired). When I saved the first version of the test (it compiled successfully at last) I noticed that on the console there was a warning from datanucleus enhancher:

11 Ιουν 2009 12:49:02 μμ org.datanucleus.metadata.annotations.AnnotationManagerImpl getMetaDataForClass
WARNING: Class "the class name" has annotations but there is no registered AnnotationReader. Please check your CLASSPATH and the annotations in the class for validity.

It seems that JPOX (the base of datanucleus) supports plugins for annotations through an AnnotationReader interface. The desirable solution for my case were to tell datanucleus to ignore the test class through (for example) an annotation.

0 comments: