Un ou plusieurs Filtres n'a pas pu démarrer après l'ajout de filtres à web.xml

Désolé si c'est quelque chose de trivial, mais je suis assez nouveau pour cette.

Voici mon pom dépendances:

Tout cela fonctionne comme cela, mais si je décommentez la <filter> partie dans web.xml je reçois le

Un ou plusieurs Filtres n'a pas pu démarrer.

erreur. J'ai essayé de googler, mais sans succès. J'utilise Tomcat 8. Je n'ai aucune idée de ce que d'autre à dire sur le problème, depuis que je suis en train d'essayer de le comprendre, à mon auto. J'ai suivi le tutoriel de cette lien (avec les configurations XML). J'ai essayé différentes ressort et de la sécurité des versions, mais à chaque fois que la guerre "explose" elle donne l'erreur ci-dessus (et la demande est, bien sûr, inaccessible)

Était quelque chose de mises à jour que je ne connaissais pas.. ou alors j'ai loupé quelque chose d'autre? Je vais poster le message d'erreur de la pile en bas.

<properties>
    <spring.version>4.2.4.RELEASE</spring.version>
    <spring.security.version>4.0.3.RELEASE</spring.security.version>
</properties>

<dependencies>
    <!-- spring -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <!-- security -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
</dependencies>

web.xml

<?xml version="1.0" encoding="utf-8" ?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         id="WebApp_ID" version="3.0">
    <display-name>SpringMVCVezba2</display-name>

    <!--filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping-->

    <servlet>
        <servlet-name>spring</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>spring</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring-servlet.xml</param-value>
    </context-param>

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

spring-security.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
       xmlns:beans = "http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
    <http auto-config="true">
        <intercept-url pattern="/" access="permitAll" />
        <intercept-url pattern="/home**" access="permitAll" />
        <intercept-url pattern="/store**" access="isAuthenticated" />
        <form-login login-page="/home/index" authentication-failure-url="/accessdenied" />
        <csrf/>
    </http>

    <authentication-manager>
        <authentication-provider>
            <user-service>
                <user name="user" password="123" authorities="USER"/>
            </user-service>
        </authentication-provider>
    </authentication-manager>
</beans:beans>

pile d'erreur:

16-Feb-2016 21:15:34.292 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
16-Feb-2016 21:15:34.458 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
16-Feb-2016 21:15:34.757 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Tue Feb 16 21:15:34 CET 2016]; root of context hierarchy
16-Feb-2016 21:15:34.870 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-servlet.xml]
16-Feb-2016 21:15:35.990 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/home/index || /home/|| /home || /index || /]}" onto public java.lang.String com.nemanjat94.controllers.HomeController.index(org.springframework.ui.Model,com.nemanjat94.models.User)
16-Feb-2016 21:15:36.218 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: Root WebApplicationContext: startup date [Tue Feb 16 21:15:34 CET 2016]; root of context hierarchy
16-Feb-2016 21:15:36.327 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: Root WebApplicationContext: startup date [Tue Feb 16 21:15:34 CET 2016]; root of context hierarchy
16-Feb-2016 21:15:36.443 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
16-Feb-2016 21:15:36.502 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 2044 ms
16-Feb-2016 21:15:36.518 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
16-Feb-2016 21:15:36.519 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
16-Feb-2016 21:15:36.531 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.doClose Closing Root WebApplicationContext: startup date [Tue Feb 16 21:15:34 CET 2016]; root of context hierarchy
[2016-02-16 09:15:36,567] Artifact SpringMVCVezba2:war exploded: Error during artifact deployment. See server log for details.
Un ou plusieurs Filtres n'a pas pu démarrer. Tous les détails se trouvent dans le conteneur approprié fichier journal
La chose est, je n'ai aucune idée où trouver ce.
Tomcat est votre conteneur. ses journaux sont dans tomcat/logs. Cherchez le dernier fichier de log nommé catalina<date>.log et essayer de trouver une erreur stacktrace à la fin.
Ah, ok, je vais essayer de faire le tri à partir de là. Merci.
Juste pour compléter: Les journaux en /var/logs/tomcat8 n'affichent pas tous les stacktrace. Aller à tomcat chemin pour obtenir tous les journaux. La valeur par défaut installations est en /usr/share/tomcat8/logs

OriginalL'auteur NemanjaT | 2016-02-16