https://bz.apache.org/bugzilla/show_bug.cgi?id=62353

Konstantin Kolinko <knst.koli...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to Konstantin Kolinko from comment #0)
> Caused by: java.lang.NoSuchMethodError:
> javax.annotation.Resource.lookup()Ljava/lang/String;
> 
> This is regression from code added in r1827367.


1. The method javax.annotation.Resource.lookup() is documented as

@since Common Annotations 1.1

See
https://docs.oracle.com/javase/7/docs/api/javax/annotation/Resource.html#lookup()


2. jdk1.6.0_45 has a copy of this annotation class WITHOUT this method.

The source code for the class is present in src.zip bundled with JDK.

3. Tomcat 7 has its own copy of this annotation,
in \java\javax\annotation\Resource.java 

This copy has been updated to Commons Annotations 1.1 and has the lookup()
method.


My guess is that thanks to (3.) the code compiles successfully, but (2.) causes
it to failure at runtime.


A quick fix is to revert r1827367.

A bigger question is why do we bundle classes that are already provided by the
JRE.

Comparing the classes in Java 6 and the classes in annotations-api.jar of
Tomcat, a difference is that Tomcat has classes in the following package
- javax.annotation.security

The rest of differences are Common Annotations 1.0 vs 1.1.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to