[
https://issues.jboss.org/browse/AS7-3892?page=com.atlassian.jira.plugin.s...
]
Jason Greene commented on AS7-3892:
-----------------------------------
(Still planning to get this one done in 7.1.1 since its a small change)
Integration with SpringServletContainerInitializer incorrect
------------------------------------------------------------
Key: AS7-3892
URL:
https://issues.jboss.org/browse/AS7-3892
Project: Application Server 7
Issue Type: Bug
Components: Server, Web
Affects Versions: 7.0.2.Final, 7.1.0.Final
Reporter: Martin Vanek
Assignee: Jason Greene
Fix For: 7.1.2.Final
Recently I have tried to install simple Spring 3.1 MVC application without web.xml to
jboss 7.0.2. The context failed to load, only message indicating the something is wrong is
from spring:
INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/test]] (MSC
service thread 1-3) No Spring WebApplicationInitializer types detected on classpath.
I have tried to investigate the problem and it seems that problem is in class
org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor. The reason is
that spring uses interface WebApplicationInitializer in @HandlesTypes annotation and the
method processHandlesType of class ServletContainerInitializerDeploymentProcessor scans
only subclasses. I guess Spring guys did not nothing wrong in implementation of the
ServletContainerInitializer so I think it is the problem of JBoss.
@HandlesTypes(WebApplicationInitializer.class)
public class SpringServletContainerInitializer implements ServletContainerInitializer {
....
}
I guess the processHandlesType method has to be changed something like this.
private Set<ClassInfo> processHandlesType(DotName typeName, Class<?> type,
CompositeIndex index) throws DeploymentUnitProcessingException {
Set<ClassInfo> classes = new HashSet<ClassInfo>();
if (type.isAnnotation()) {
.....
} else {
classes.addAll(index.getAllKnownSubclasses(typeName));
classes.addAll(index.getAllKnownImplementors(typeName));
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira