You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2010/09/01 05:52:53 UTC

Nonsense compilation error

Running into this strange error and wondering if anyone has ever seen anything like it.

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/Users/dblevins/work/openejb-trunk/container/openejb-core/src/test/java/org/apache/openejb/config/rules/Key.java:[30,34] incompatible types
found   : org.apache.openejb.config.rules.KeyType
required: org.apache.openejb.config.rules.KeyType

Note I'm getting this on the merge, so it doesn't affect trunk.

Don't have any related changes -- not that I can imagine what would break this anyway.


-David


Re: Nonsense compilation error

Posted by Karan Malhi <ka...@gmail.com>.
Its a JDK bug (should have been fixed)
http://bugs.sun.com/view_bug.do?bug_id=6558580

When you have an enum as the default value for an element of an annotation,
thats where this specific bug pops up. So in our case we have a KeyType enum
and its used as a default value in the type() element of @Key. Looks like it
thinks that KeyType.FAILURE is different than KeyType
//SNIP
public @interface Key {
    String value();

    int count() default 1;
    KeyType type() default KeyType.FAILURE;
}

public enum KeyType {
    FAILURE,WARNING,ERROR
}
//SNIP


On Tue, Aug 31, 2010 at 11:52 PM, David Blevins <da...@visi.com>wrote:

> Running into this strange error and wondering if anyone has ever seen
> anything like it.
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
> /Users/dblevins/work/openejb-trunk/container/openejb-core/src/test/java/org/apache/openejb/config/rules/Key.java:[30,34]
> incompatible types
> found   : org.apache.openejb.config.rules.KeyType
> required: org.apache.openejb.config.rules.KeyType
>
> Note I'm getting this on the merge, so it doesn't affect trunk.
>
> Don't have any related changes -- not that I can imagine what would break
> this anyway.
>
>
> -David
>
>


-- 
Karan Singh Malhi

Re: Nonsense compilation error

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Same issue as well.
I did some tests and discussed that with Karan last week.

Sometimes it stops ;-)

Jean-Louis
-- 
View this message in context: http://openejb.979440.n4.nabble.com/Nonsense-compilation-error-tp2402580p2402696.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Nonsense compilation error

Posted by David Jencks <da...@yahoo.com>.
I've run into this sometimes on trunk.  Then sometimes it stops being a problem.  Then it comes back.  No pattern I can discern.

thanks
david jencks

On Aug 31, 2010, at 8:52 PM, David Blevins wrote:

> Running into this strange error and wondering if anyone has ever seen anything like it.
> 
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> /Users/dblevins/work/openejb-trunk/container/openejb-core/src/test/java/org/apache/openejb/config/rules/Key.java:[30,34] incompatible types
> found   : org.apache.openejb.config.rules.KeyType
> required: org.apache.openejb.config.rules.KeyType
> 
> Note I'm getting this on the merge, so it doesn't affect trunk.
> 
> Don't have any related changes -- not that I can imagine what would break this anyway.
> 
> 
> -David
>