You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Christophe Levesque (JIRA)" <ji...@apache.org> on 2013/11/26 00:00:37 UTC

[jira] [Created] (CXF-5421) Servlet dependency in OAuth2 pom.xml should be with scope "provided"

Christophe Levesque created CXF-5421:
----------------------------------------

             Summary: Servlet dependency in OAuth2 pom.xml should be with scope "provided"
                 Key: CXF-5421
                 URL: https://issues.apache.org/jira/browse/CXF-5421
             Project: CXF
          Issue Type: Bug
            Reporter: Christophe Levesque


>From cxf-rt-rs-security-oauth2's pom.xml:

       <dependency>
            <groupId>${cxf.servlet-api.group}</groupId>
            <artifactId>${cxf.servlet-api.artifact}</artifactId>
            <version>${cxf.servlet-api.version}</version>
        </dependency>

This should have a <scope>provided</scope> otherwise the servlet JAR will be pulled in as a transitive dependency. It may conflict with the container's own servlet and throw exceptions like:

Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer
	at org.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1670)
	at org.apache.catalina.startup.ContextConfig.getServletContainerInitializers(ContextConfig.java:1652)
	at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1562)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1270)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 6 more




--
This message was sent by Atlassian JIRA
(v6.1#6144)