Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse 错误:配置类org.springframework.web.context.ContextLoaderListener的应用程序侦听器_Eclipse_Maven - Fatal编程技术网

Eclipse 错误:配置类org.springframework.web.context.ContextLoaderListener的应用程序侦听器

Eclipse 错误:配置类org.springframework.web.context.ContextLoaderListener的应用程序侦听器,eclipse,maven,Eclipse,Maven,创建了一个SpringMVC项目 maven打扫了吗 maven安装了吗 使用本地服务器[tomcat 6.0]运行 得到以下错误 Eclipse Indigo + Spring IDE for indigo + Spring STS for indigo + maven integration for eclipse + maven integration for eclipse wtp 通过在服务器选项卡下执行tomcat clean重复此操作,并以相同的错误结束 来自POM的部分 SEV

创建了一个SpringMVC项目

maven打扫了吗

maven安装了吗

使用本地服务器[tomcat 6.0]运行

得到以下错误

Eclipse Indigo + Spring IDE for indigo + Spring STS for indigo + maven integration for eclipse + maven integration for eclipse wtp
通过在服务器选项卡下执行tomcat clean重复此操作,并以相同的错误结束

来自POM的部分

SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/springframework/core/io/Resource

org.springframework
spring上下文
${org.springframework版本}
公用记录
公用记录
org.springframework
SpringWebMVC
${org.springframework版本}
org.aspectj
aspectjrt
${org.aspectj版本}
org.slf4j
slf4j api
${org.slf4j版本}
org.slf4j
jcl-over-slf4j
${org.slf4j版本}
运行时
org.slf4j
slf4j-log4j12
${org.slf4j版本}
运行时
log4j
log4j
1.2.15
javax.mail
邮件
javax.jms
jms
com.sun.jdmk
jmxtools
com.sun.jmx
jmxri
运行时
javax.inject
javax.inject
1.
javax.servlet
servlet api
2.5
假如
javax.servlet.jsp
jsp api
2.1
假如
javax.servlet
jstl
1.2
朱尼特
朱尼特
4.7
测试

必须在我的pom中包含以下依赖项

 <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework-version}</version>
            <exclusions>
                <!-- Exclude Commons Logging in favor of SLF4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                 </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework-version}</version>
        </dependency>

        <!-- AspectJ -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${org.aspectj-version}</version>
        </dependency>   

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
            </exclusions>
            <scope>runtime</scope>
        </dependency>

        <!-- @Inject -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <!-- Servlet -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>        
    </dependencies>

org.springframework

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-core</artifactId>
   <version>3.1.0.RELEASE</version>
</dependency>