tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hassan Schroeder" <>
Subject TC6, SRV 2.5, annotations
Date Sat, 27 Jan 2007 18:44:03 GMT
First pass at playing with the 2.5 Servlet stuff, annotations specifically.

On TC 6.0.7, adding this line to a test Filter:

	@Resource javax.sql.DataSource foo;

:: causes this exception when the context is reloaded:

SEVERE: Exception starting filter EnvironmentFilter
javax.naming.NameNotFoundException: Name
com.example.filters.EnvironmentFilter is not bound in this Context
        at org.apache.naming.NamingContext.lookup(
        at org.apache.naming.NamingContext.lookup(
        at org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(
        at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(

(That seems like the most relevant part of the stacktrace...)

Using standard name-based lookup of "foo" works fine. I added a
metadata-complete="false" to the web.xml declaration just to be on
the safe side, but no change. The Filter is declared and mapped in
web.xml in the usual way, and works fine sans annotation.

Anyone using this successfully? TIA!
Hassan Schroeder ------------------------

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message