For the time being, how about the following fix in openjpa trunk:
/**
* The entry point for java compiler.
*/
@Override
public boolean process(Set<? extends TypeElement> annos, RoundEnvironment
roundEnv) {
if (active && !roundEnv.processingOver()) {
Set<? extends Element> elements = roundEnv.getRootElements();
for (Element e : elements) {
if (e instanceof TypeElement)
process((TypeElement) e);
}
}
return true;
}
We simply ignore "PackageElement", "ExecutableElement", "TypeParameterElement"
and "VariableElement". (These are the other Subinterfaces of Element)
With this we dont get into trouble and we have time to elaborate on the real
problem. roundEnv.getRootElements() simply can return also PackageElements. Why
this is only the case for this package with JAXB file is something which one
need to research. Thats definitely something in the javax.annotation.processing
area of the JDK. But there must be a reason that getRootElements() returns
Element and not TypeElement ;-)
---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de
Am 23.03.2011 um 16:41 schrieb Rick Curtis:
>>
>>> still a bit clueless
>>
>
> Me too. I just started digging into some of the annotation processor code to
> see if I can learn something today.... So when you swallowed the exception
> everything worked fine?
>
> Thanks,
> Rick