Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 67517 invoked from network); 25 Mar 2011 14:55:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Mar 2011 14:55:44 -0000 Received: (qmail 55032 invoked by uid 500); 25 Mar 2011 14:55:43 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 54967 invoked by uid 500); 25 Mar 2011 14:55:43 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 54957 invoked by uid 99); 25 Mar 2011 14:55:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2011 14:55:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2011 14:55:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id EED1F4D551 for ; Fri, 25 Mar 2011 14:55:05 +0000 (UTC) Date: Fri, 25 Mar 2011 14:55:05 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: <621973719.11380.1301064905974.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1757257376.11369.1301064425783.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (OPENJPA-1965) ClassCastException when using JAXB and MetaModel annotation processor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis resolved OPENJPA-1965. ---------------------------------- Resolution: Fixed > ClassCastException when using JAXB and MetaModel annotation processor > --------------------------------------------------------------------- > > Key: OPENJPA-1965 > URL: https://issues.apache.org/jira/browse/OPENJPA-1965 > Project: OpenJPA > Issue Type: Bug > Components: tooling > Affects Versions: 2.0.0, 2.1.0, 2.2.0 > Reporter: Rick Curtis > Assignee: Rick Curtis > Fix For: 2.1.1, 2.2.0 > > > This is a problem that was reported by Marc Logemann on the users mailing list. Details from the email exchange: > ----- > .... > So i see a lot of metamodel classes got generated but during this process i got this: > [javac] An annotation processor threw an uncaught exception. > [javac] Consult the following stack trace for details. > [javac] java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$PackageSymbol cannot be cast to javax.lang.model.element.TypeElement > [javac] at org.apache.openjpa.persistence.meta.AnnotationProcessor6.process(AnnotationProcessor6.java:207) > [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625) > [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:554) > [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:699) > [javac] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981) > [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) > [javac] at com.sun.tools.javac.main.Main.compile(Main.java:353) > [javac] at com.sun.tools.javac.main.Main.compile(Main.java:279) > [javac] at com.sun.tools.javac.main.Main.compile(Main.java:270) > [javac] at com.sun.tools.javac.Main.compile(Main.java:69) > [javac] at com.sun.tools.javac.Main.main(Main.java:54) > .... > ----- > Details on how to recreate : > .... > Hi, > this is nearly impossible because its not an Entity which makes the problem here. Its a package. I have no idea how to unit test that. Perhaps you can try creating > a simple package with JAXB generated classes in it and try to reproduce: > 1) create a very simple XSD file > 2) run the JAXB compiler via ANT (then you should have some classes in myweirdpackage) > > > > > 3) put at least one Entity in domain package (parent of myweirdpackage) > 4) run the MetaModel compiling step -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira