Javafree
Página Inicial do Fórum > Spring Framework

Problema no Spring Security



Criar novo tópico   Responder tópico


  1. pedro.lira
    Posts:18


    Comment Arrow

    Publicado em: 26/06/2013 00:44:27

    Estou com problemas no Spring Security.
    Na configuração do web.xml tenho que colocar alguns parâmetros.
    Já verifiquei e somente no momento que coloco um especifico gera erro.

    Esse parâmetro:

    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    Gera este erro:

    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd schema with Spring Security 3.1. Please update your schema declarations to the 3.1 schema.
    Offending resource: ServletContext resource [/WEB-INF/applicationContext-security.xml]
    at org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:6 ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.security.config.SecurityNamespaceHandler.parse(SecurityNamespaceHandler.java:6 ~[spring-security-config-3.2.0.M1.jar:3.2.0.M1]
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1435) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1425) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[spring-beans-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) ~[spring-web-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) ~[spring-web-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131) ~[spring-context-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[spring-context-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451) ~[spring-context-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) ~[spring-web-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) ~[spring-web-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.0.BUILD-SNAPSHOT.jar:3.2.0.BUILD-SNAPSHOT]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797) [catalina.jar:7.0.35]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291) [catalina.jar:7.0.35]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.35]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.35]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.35]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_21]
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_21]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]
    at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]



  1. ElPsyCongroo
    Posts:1688


    Comment Arrow

    Publicado em: 26/06/2013 06:47:26

    O próprio erro já te dá a dica:




    _________________

    Programador Java

    I´m a mad scientist.

    Tag CODE:
    http://javafree.uol.com.br/topic-870315-Tag-CODE-do-forum.html



  1. Relacionados