You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Hudson (Commented) (JIRA)" <ji...@apache.org> on 2012/04/06 00:38:25 UTC
[jira] [Commented] (MTOMCAT-135) tomcat7:run does not load
HandlesTypes in application classes
[ https://issues.apache.org/jira/browse/MTOMCAT-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247781#comment-13247781 ]
Hudson commented on MTOMCAT-135:
--------------------------------
Integrated in TomcatMavenPlugin-mvn3.x #122 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/122/])
[MTOMCAT-135] tomcat7:run does not load HandlesTypes in application classes (Revision 1310083)
Result = SUCCESS
olamy : http://svn.apache.org/viewvc/?view=rev&rev=1310083
Files :
* /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java
> tomcat7:run does not load HandlesTypes in application classes
> -------------------------------------------------------------
>
> Key: MTOMCAT-135
> URL: https://issues.apache.org/jira/browse/MTOMCAT-135
> Project: Apache Tomcat Maven Plugin
> Issue Type: Bug
> Components: tomcat7
> Affects Versions: 2.0
> Environment: Mac OS X, Apple JDK 1.6
> Reporter: Gildas Cuisinier
> Assignee: Olivier Lamy (*$^¨%`£)
> Fix For: 2.0
>
>
> Spring 3.1 brings a SpringServletContainerInitializer, that has annotation @HandlesTypes(WebApplicationInitializer.class).
> In my application, I have a WebApplicationInitializer directly in my war. This one is compiled and put in WEB-INF/classes.
> When launching with tomcat7:run-war, my WebApplicationInitializer is correctly found by tomcat and provided to SpringServletContainerInitializer.
> But with tomcat7:run, I've this line in logs :
> INFO: No Spring WebApplicationInitializer types detected on classpath
> It seems that the problems come from the ContextConfig classe (from tomcat source), in method webConfig that specificly search a "WEB-INF/classes" :
> // Step 4. Process /WEB-INF/classes for annotations
> // This will add any matching classes to the typeInitializerMap
> if (ok) {
> // Hack required by Eclipse's "serve modules without
> // publishing" feature since this backs WEB-INF/classes by
> // multiple locations rather than one.
> NamingEnumeration<Binding> listBindings = null;
> try {
> try {
> listBindings = context.getResources().listBindings(
> "/WEB-INF/classes");
> } catch (NameNotFoundException ignore) {
> // Safe to ignore
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org