openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: [jira] Updated: (OPENJPA-1659) OpenJPA 2.0.0 annotation processor causes plain old Java compilation to fail
Date Fri, 21 May 2010 13:16:40 GMT
Nice detective work, Matthew.  Getting Sun and/or IBM to fix problems in the
JDK can be a pain.  Good luck!  :-)

Does it seem to fail when compiling any annotation interfaces?  Or, just
certain ones like the two you have posted already?

Thanks,
Kevin

On Thu, May 20, 2010 at 10:23 AM, Matthew T. Adams (JIRA)
<jira@apache.org>wrote:

>
>     [
> https://issues.apache.org/jira/browse/OPENJPA-1659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Matthew T. Adams updated OPENJPA-1659:
> --------------------------------------
>
>     Attachment: javac_bug.zip
>
> I just added another bug report after discovering another scenario where
> javac fails:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6954300
>
> It's not public yet either, but it includes another annotation that causes
> javac to fail with an annotation processor present.
>
> The attached zip file adds the annotation "RequiresMutability" to the
> testcase and supercedes all other test cases.
>
> > OpenJPA 2.0.0 annotation processor causes plain old Java compilation to
> fail
> >
> ----------------------------------------------------------------------------
> >
> >                 Key: OPENJPA-1659
> >                 URL: https://issues.apache.org/jira/browse/OPENJPA-1659
> >             Project: OpenJPA
> >          Issue Type: Bug
> >    Affects Versions: 2.0.0
> >         Environment: * javac 1.6.0_18 & 1.6.0_20 on Linux (Ubuntu 10.04
> LTS)
> > * javac 1.6.0_20 on Windows XP SP3
> >            Reporter: Matthew T. Adams
> >         Attachments: javac_bug.zip, OPENJPA-1659-OffTheHook.zip,
> OPENJPA-1659-testcase.zip
> >
> >
> > Compiling the annotation whose source is below with openjpa-2.0.0.jar on
> the classpath fails with the following error; compiling without succeeds.
>  If I remove the file META-INF/services/javax.annotation.processor.Processor
> from the openjpa-2.0.0.jar, compilation succeeds.
> > =====================================
> > Compilation log with OpenJPA on classpath:
> > =====================================
> > $ javac -d target/classes -classpath openjpa-2.0.0.jar
> src/main/java/ann/ValidatedTime.java -g -verbose -nowarn -target 1.6 -source
> 1.6
> > [parsing started src/main/java/ann/ValidatedTime.java]
> > [parsing completed 16ms]
> > [search path for source files: openjpa-2.0.0.jar]
> > [search path for class files:
> /home/madams/programs/java/jdk1.6.0_20/jre/lib/resources.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/rt.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/sunrsasign.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/jsse.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/jce.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/charsets.jar,/home/madams/programs/java/jdk1.6.0_20/jre/classes,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/localedata.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/dnsns.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/sunjce_provider.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/sunpkcs11.jar,openjpa-2.0.0.jar]
> > [loading
> java/lang/annotation/ElementType.class(java/lang/annotation:ElementType.class)]
> > [loading
> java/lang/annotation/Retention.class(java/lang/annotation:Retention.class)]
> > [loading
> java/lang/annotation/RetentionPolicy.class(java/lang/annotation:RetentionPolicy.class)]
> > [loading
> java/lang/annotation/Target.class(java/lang/annotation:Target.class)]
> > [loading
> java/lang/annotation/Annotation.class(java/lang/annotation:Annotation.class)]
> > [loading java/lang/Object.class(java/lang:Object.class)]
> > [loading java/lang/Enum.class(java/lang:Enum.class)]
> > [loading java/lang/Comparable.class(java/lang:Comparable.class)]
> > [loading java/io/Serializable.class(java/io:Serializable.class)]
> > [loading java/lang/String.class(java/lang:String.class)]
> > Round 1:
> >       input files: {ann.ValidatedTime}
> >       annotations: [java.lang.annotation.Retention,
> java.lang.annotation.Target]
> >       last round: false
> > Round 2:
> >       input files: {}
> >       annotations: []
> >       last round: true
> > [search path for source files: openjpa-2.0.0.jar]
> > [search path for class files:
> /home/madams/programs/java/jdk1.6.0_20/jre/lib/resources.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/rt.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/sunrsasign.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/jsse.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/jce.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/charsets.jar,/home/madams/programs/java/jdk1.6.0_20/jre/classes,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/localedata.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/dnsns.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/sunjce_provider.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/sunpkcs11.jar,openjpa-2.0.0.jar]
> > [loading
> java/lang/annotation/ElementType.class(java/lang/annotation:ElementType.class)]
> > [loading
> java/lang/annotation/Retention.class(java/lang/annotation:Retention.class)]
> > [loading
> java/lang/annotation/RetentionPolicy.class(java/lang/annotation:RetentionPolicy.class)]
> > [loading
> java/lang/annotation/Target.class(java/lang/annotation:Target.class)]
> > [loading
> java/lang/annotation/Annotation.class(java/lang/annotation:Annotation.class)]
> > [loading java/lang/Object.class(java/lang:Object.class)]
> > [loading java/lang/Enum.class(java/lang:Enum.class)]
> > [loading java/lang/Comparable.class(java/lang:Comparable.class)]
> > [loading java/io/Serializable.class(java/io:Serializable.class)]
> > [loading java/lang/String.class(java/lang:String.class)]
> > src/main/java/ann/ValidatedTime.java:21: incompatible types
> > found   : ann.ValidatedTime.Precision
> > required: ann.ValidatedTime.Precision
> >       Precision precision() default Precision.SECOND;
> >                                              ^
> > [checking ann.ValidatedTime]
> > [loading
> java/lang/CloneNotSupportedException.class(java/lang:CloneNotSupportedException.class)]
> > [loading java/lang/Class.class(java/lang:Class.class)]
> > [total 437ms]
> > 1 error
> > =====================================
> > Compilation log without OpenJPA on classpath:
> > =====================================
> > $ javac -d target/classes src/main/java/ann/ValidatedTime.java -g
> -verbose -nowarn -target 1.6 -source 1.6[parsing started
> src/main/java/ann/ValidatedTime.java]
> > [parsing completed 16ms]
> > [search path for source files: .]
> > [search path for class files:
> /home/madams/programs/java/jdk1.6.0_20/jre/lib/resources.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/rt.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/sunrsasign.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/jsse.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/jce.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/charsets.jar,/home/madams/programs/java/jdk1.6.0_20/jre/classes,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/localedata.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/dnsns.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/sunjce_provider.jar,/home/madams/programs/java/jdk1.6.0_20/jre/lib/ext/sunpkcs11.jar,.]
> > [loading
> java/lang/annotation/ElementType.class(java/lang/annotation:ElementType.class)]
> > [loading
> java/lang/annotation/Retention.class(java/lang/annotation:Retention.class)]
> > [loading
> java/lang/annotation/RetentionPolicy.class(java/lang/annotation:RetentionPolicy.class)]
> > [loading
> java/lang/annotation/Target.class(java/lang/annotation:Target.class)]
> > [loading
> java/lang/annotation/Annotation.class(java/lang/annotation:Annotation.class)]
> > [loading java/lang/Object.class(java/lang:Object.class)]
> > [loading java/lang/Enum.class(java/lang:Enum.class)]
> > [loading java/lang/Comparable.class(java/lang:Comparable.class)]
> > [loading java/io/Serializable.class(java/io:Serializable.class)]
> > [loading java/lang/String.class(java/lang:String.class)]
> > [checking ann.ValidatedTime]
> > [loading
> java/lang/CloneNotSupportedException.class(java/lang:CloneNotSupportedException.class)]
> > [loading java/lang/Class.class(java/lang:Class.class)]
> > [wrote target/classes/ann/ValidatedTime$Precision.class]
> > [wrote target/classes/ann/ValidatedTime.class]
> > [total 352ms]
> > =====================================
> > Java source file src/main/java/ann/ValidatedTime.java
> > =====================================
> > package ann;
> > import java.lang.annotation.ElementType;
> > import java.lang.annotation.Retention;
> > import java.lang.annotation.RetentionPolicy;
> > import java.lang.annotation.Target;
> > @Retention(RetentionPolicy.RUNTIME)
> > @Target(ElementType.METHOD)
> > public @interface ValidatedTime {
> >       Precision precision() default Precision.SECOND;
> >       public enum Precision {
> >               NANOSECOND, MILLISECOND, SECOND, MINUTE, HOUR
> >       }
> > }
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message