文件编译不通过,经常遇到的。。。。

  

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [classpath:spring/applicationContext-*.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/] cannot be resolved to URL because it does not exist
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:229)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.io.FileNotFoundException: class path resource [spring/] cannot be resolved to URL because it does not exist
at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:412)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:286)
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1159)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
... 18 more

六月 04, 2017 10:26:03 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
六月 04, 2017 10:26:03 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
六月 04, 2017 10:26:03 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
六月 04, 2017 10:26:03 下午 org.apache.catalina.core.StandardContext listenerStop
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call ‘refresh‘ before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:908)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:884)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:836)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:579)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4980)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5626)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

六月 04, 2017 10:26:03 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 04, 2017 10:26:03 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 04, 2017 10:26:03 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 04, 2017 10:26:03 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 04, 2017 10:26:03 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
六月 04, 2017 10:26:03 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8083"]

pom.xml中配置文件忽略,

<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->

<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>

吧下面resources中的文件忽略了,所以报错了。classnotfound

Could not resolve bean definition resource pattern [classpath:spring/applicationContext-*.xml];

加上下面这段注释就对了。。

===============================================
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>

时间: 2024-06-19 05:42:28

文件编译不通过,经常遇到的。。。。的相关文章

OC方法和文件编译

一.OC方法 (一)对象方法 (1)对象方法以-开头如 -(void)xx; (2)对象方法只能又对象来调用 (3)对象方法中可以访问当前对象的成员变量 (4)调用格式   [对象名  对象方法名]: (5)设计一个学生类和狗类,练习对象方法的使用. 学生类的声明: 学生类的实现: 狗类的声明: 狗类的实现: 主程序: (二)类方法 (1)类方法以+开头  如+(void)put; (2)类方法只能由类来调用 (3)类方法中不能访问实例(成员)变量,因为类方法又类来调用,并没有创建存储空间来存储

Cocos2d-x文件编译错误解决

编译出现的错误: 1>------ 已启动生成: 项目: HelloCpp, 配置: Debug Win32 ------ 1>生成启动时间为 2014/5/9 14:43:43. 1>InitializeBuildStatus: 1>  正在创建"Debug.win32\HelloCpp.unsuccessfulbuild",因为已指定"AlwaysCreate". 1>ClCompile: 1>  所有输出均为最新. 1>

Objective-C语言-方法和文件编译

OC方法和文件编译 一.OC方法 (一)对象方法 (1)对象方法以-开头如 -(void)xx; (2)对象方法只能又对象来调用 (3)对象方法中可以访问当前对象的成员变量 (4)调用格式   [对象名  对象方法名]: (5)设计一个学生类和狗类,练习对象方法的使用. 学生类的声明: 学生类的实现: 狗类的声明: 狗类的实现: 主程序: (二)类方法 (1)类方法以+开头  如+(void)put; (2)类方法只能由类来调用 (3)类方法中不能访问实例(成员)变量,因为类方法又类来调用,并没

Linux内核驱动将多个C文件编译成一个ko文件的方法——每个C文件里都有module_init与module_exit

以两个C文件为例: 将本该被分别编译成adc_device.ko和adc_driver.ko的adc_device.c.adc_driver.c编译成一个ko文件! 采用方法: 第一步.修改C文件 1.去掉adc_device.c文件里module_init(xxx).module_exit(yyy)中xxx.yyy 函数原型的关键字static 2.注销adc_device.c文件里module_init(xxx).module_exit(yyy)函数 3.在adc_driver.c文件里添加

LaTeX多文件编译的方法总结

LaTeX多文件编译的方法总结 在编写LaTeX文档的时候,由于文档的section较多,或者section的编写时间各不相同,我们可能碰到如下问题: 1.由于想分开编写各个section 2.preamble太多,想专门弄一个文件放preamble 3.想用bibtex来生成参考文献 我分别参考了这个几个网页:111 222,再结合自己的上手体会,给出下面这个(还凑合的)解决方案. 我们首先建立一个文件夹"project",在下面分别创建"main.tex"文件&

【转】py文件编译为pyc

原文链接:http://blog.csdn.net/sislcb/article/details/4002414 说明: 我是一个python初学者,希望能够得到各位前辈的指导,大家一起交流.mail:sislcb at 126 dot com 什么是pyc文件 pyc是一种二进制文件,是由py文件经过编译后,生成的文件,是一种byte code,py文件变成pyc文件后,加载的速度有所提高,而且pyc是一种跨平台的字节码,是由python的虚拟机来执行的,这个是类似于JAVA或者.NET的虚拟

GCC实现多文件编译,静态库,动态库

一 代码 //add.h int add(int a, int b); //add.c int add(int a, int b) { return a+b; } //main.c #include <stdio.h> #include "add.h" void main() { printf("3 + 2 = %d\n",add(3+2)); } 二 多文件编译 1 生成.o文件 命令:gcc -c add.c main.c 生成:add.o,main

C语言-------多文件编译

(1)前段时间,学长讲解宏的一些知识  也提起了那个多文件编译,同过看别人的博客,自己也懂了一些,现在来总结一下这个多文件编译,其实和java里面的那个class的调用好像有联系 其定义即可以理解成:就是属于不同的C语言名字下,例如helo.c  还有  hell.c  这两个文件,然后互相调用彼此的函数,这就是自己理解的多文件编译: 下面是你编写完函数后,怎么调用函数得常规做法,在C-free下面编译的 1 #include<stdio.h> 2 #include<stdlib.h&g

linux kernel 模块多文件编译

/*************************************************************************** * linux kernel 模块多文件编译 * 声明: * 本文主要是记录在调试驱动的阶段,我们可能会更倾向于使用模块插入的方式 * 来进行驱动调试,这样可以大大缩短调试时间.之前在调试gt9xx Touch的时候也 * 是采用这种方式,这里还是记录一下,日后方便查找. * * 2016-2-2 深圳 南山平山村 曾剑锋 **********

详解Javac将java文件编译为class文件的过程

Java编译器总的来说分为前端编译器,JIT(just in time compiler)编译器,AOT(Ahead Of Time Compiler)编译器三种. 前端编译器: 将Java文件编译为class文件的编译器,目前主要有以下两个,Sun提供的Javac 和Eclipse JDT中的增量式编译器(ECJ) JIT编译器: 虚拟机后端运行期编译器,把字节码转换为机器码的过程.HotSpot Vm中提供的C1, C2编译器 AOT编译器:直接把Java文件转换为本地机器码的过程. GNU