2023年3月

1、---无法解析类型
javax.servlet.http.HttpServletRequest
。从必需的 .class 文件间接引用了它

The type javax.servlet.http.HttpServletRequest cannot be resolved. - smartzhaomin的专栏 - CSDN博客
http://blog.csdn.net/smartzhaomin/article/details/19487907

The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from 
 required .class files
是缺少serverlet的引用库,解决如下
1.工程右键-properties->java build path
2.在java build path的libraries tab页中选择Add external Jars...按钮
3. 选择eclipse的安装目录,你自己需要根据自己的路径查找添加。E:\eclipse-java-indigo-SR1-win32\eclipse\plugins
选择javax.servlet.jsp_2.0.0.v201101211617.jar;javax.servlet_2.5.0.v201103041518.jar 进行添加即可 注释:由于版本不同,文件包名可能稍有区别。

2、----------------Servlet.init() 异常很累人,本人将jdk1.8降到1.7果然不报此错误
HTTP Status 500 - Servlet.init() for servlet springmvc threw exception

type
Exception report

message
Servlet.init() for servlet springmvc threw exception

description
The server encountered an internal error that prevented it from fulfilling this request.

解决办法:

一:把jdk版本换成1.7 or 1.7以下

二:使用spring 4.0RELEASE及以上版本

3、-----------------

完美解决 未能打开编辑器:
Unmatched braces in the pattern
. - Terry的IT世界 - CSDN博客
http://blog.csdn.net/hytdsky/article/details/4736462

原因就是语言包的问题 出现这个问题了,配置自己Eclipse的启动参数  eclipse.ini  在最后面加入这段代码   -Duser.language=en

4、----------
The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

错误:HttpServlet was not found on the Java_百度经验--这个是传统项目的做法
http://jingyan.baidu.com/article/f79b7cb34f40569144023ef9.html

如果是maven项目这需要在 pom.xml里面添加对应的jar包依赖即可。

5、-------------技巧

exlipse同时操作多行。比如同时在多行同列输入相同的文字 - 小爷欣欣 - CSDN博客
http://blog.csdn.net/csdnliuxin123524/article/details/70310175

6、时间0804-------
Httpservlet cannot be resolved to a type

Httpservlet cannot be resolved to a type的原因与解决方法 - zhouyingge1104的专栏 - CSDN博客
http://blog.csdn.net/zhouyingge1104/article/details/7583511

Add External JARs--> 选择  把servlet-api.jar 的路径输入即可

7、----- 环境里面报很多异常,头大

8、--------------eclipse中jar包在外面显示

myeclipse项目 往lib里导jar包,全乱了在外面 与SRC同一目录 怎么解决_百度知道
https://zhidao.baidu.com/question/2117740880786239107.html

9、---- Junit Test中不可以用注解 注入bean,用传统方式获取bean

java junit 使用注解引入 - huaishuming的专栏 - CSDN博客--碰到的问题此文章一样,但是我看不懂他的解法。囧
http://blog.csdn.net/huaishuming/article/details/41212147

public classDscVehicleTest2 {privateApplicationContext applicationContext;//@Autowired  这里注入有问题,在Test函数里面注入也不行
    privateDscVehicleMapper dscVehicleMapper;
@Before
public void setUp() throwsException {
applicationContext
= new ClassPathXmlApplicationContext("classpath:spring/applicationContext-dao.xml");
dscVehicleMapper
= (DscVehicleMapper) applicationContext.getBean("dscVehicleMapper");
}
@Test
public voidtest1() {
DscVehicle dscVehicle
= dscVehicleMapper.selectByPrimaryKey(5L);
System.out.println(dscVehicle);
}
}

提示错误:Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: 通过端口 1433 连接到主机 localhost 的 TCP/IP 连接失败。错误:“connect timed out。请验证连接属性。确保 SQL Server 的实例正在主机上运行,且在此端口接受 TCP/IP 连接,还要确保防火墙没有阻止到此端口的 TCP 连接。”。

解决:

本人一直按照百度配置
SQLEXPRESS
的端口 和TCP/IP 的配置,后来发现居然搞错了,是要配
MSSQLSERVER
的,晕倒

配置两个步骤即可:没有网上说的那么复杂。

一、db.properties 属性文件中 最好加特殊的标志前缀  jdbc.username ,如果单纯的username有可能影响到 mapper.xml中的 ${username};

举例   下面这个文章的人就是碰到这个问题,但是他的临时解决方法我还看不懂

org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01017: invalid username/password; logon denied 错误解决 - 精灵壶 - 博客园
http://www.cnblogs.com/jinghu/p/5942102.html

而  下面这位网友是正解 :

myBatis数据库连接配置错误 - 滑稽宝宝 - 博客园
http://www.cnblogs.com/songzhen/p/5620893.html

而  这位说了很多,看到头晕,不看也罢,总结是好的

MyBatis学习(3)------------数据库配置以及属性名冲突问题 - 小米 - CSDN博客
http://blog.csdn.net/u011225629/article/details/47164959

总结    上面的测试代码演示当实体类中的属性名和表中的字段名不一致时,使用MyBatis进行查询操作时无法查询出相应的结果的问题以及针对问题采用的两种办法:

解决办法一: 通过在查询的sql语句中定义字段名的别名,让字段名的别名和实体类的属性名一致,这样就可以表的字段名和实体类的属性名一一对应上了,

这种方式是通
过在sql语句中定义别名来解决字段名和属性名的映射关系的。

解决办法二: 通过<resultMap>来映射字段名和实体类属性名的一一对应关系。这种方式是使用MyBatis提供的解决方式
来解决字段名和属性名的映射关系的。

蛋疼的是
本人碰到的问题是更改登录数据库的用户名和密码,已经更改db.properties的对应的值,可是运行时还是提示 root 用户名密码错误什么的错误,当时看一大版的英文错误就慌乱,搜索 root 提示没有,我以为是属性冲突;

解决:后来发现还有 \WebRoot\WEB-INF\classes 编译出来的路径中还存在一个 db.properties 文件,因为我搜索 jdbc.username 发现项目中还有另一个,修改解决。纳闷我当时搜索root为什么找不到。

DEBUG [localhost-startStop-1] - Ignoring bean class loading
failure
for bean 'itemsService'
org.springframework.beans.factory.CannotLoadBeanClassException
: Error loading class [cn.itcast.ssm.service.impl.ItemsServiceImpl] for bean with name 'itemsService' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-service.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: cn/itcast/ssm/service/impl/ItemsServiceImpl : Unsupported major.minor version 52.0 (unable to load class cn.itcast.ssm.service.impl.ItemsServiceImpl)

七月 31, 2017 8:09:17 下午 org.apache.catalina.core.StandardContext listenerStart
严重:
Exception sending context initialized event to listener
instance of class org.springframework.web.context.ContextLoaderListener

背景:本人周五下班兴致勃勃想把一个以前黑马的mysql小程序改到sqlserver 来,经历:

1、连接sqlserver异常:Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: http://www.cnblogs.com/rogge7/p/7253927.html

2、JDK版本异常1.8降低到1.7,
message
Servlet.init() for servlet springmvc threw exception

3、Eclipse版本降低为mars (因为最新oxygen不支持JDK1.7), indigo我都下载好了,

4、无法解析类型 javax.servlet.http.HttpServletRequest ,http://www.cnblogs.com/rogge7/p/7241456.html

5、属性名冲突  ,再db.properties配置文件修改后,

程序跑起来还是弹出上面异常,再怎么也解决不了,

以为:
是Tomcat版本的问题,

或者是太多的框架jar包整合和现在环境冲突问题(上传图片的 fileupload jar包,json交互jackson包,Validation校验的包)

重新导入表结构

后来先做了连接sqlserver数据库,用mybatis官方的代码方法  自动生成 数据库映射文件的,不错。

居然:
后来思考是否在折腾异常的过程中 把源码搞坏了,找来原来源码,重新配置后果然可以运行起来。晕人。

不过也是在解决了上面很多问题后才可以跑起来的;同时备份源码很重要。

待续...

===========

附上面异常,一大版

七月 31, 2017 8:09:08下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server
/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:springmvc_mybatis1208'did not find a matching property.
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat
/8.0.36七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jun
9 2016 13:55:50UTC
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:
8.0.36.0七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows
8.1七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:
6.3七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jre7
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:
1.7.0_71-b14
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: F:\Projects\Java\tools\apache
-tomcat-8.0.36七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument:
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:53908七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument:
-Dcatalina.base=F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument:
-Dcatalina.home=F:\Projects\Java\tools\apache-tomcat-8.0.36七月31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument:
-Dwtp.deploy=F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument:
-Djava.endorsed.dirs=F:\Projects\Java\tools\apache-tomcat-8.0.36\endorsed
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument:
-Dfile.encoding=GBK
七月
31, 2017 8:09:08下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:
/Program Files/Java/jdk1.7.0_71/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_71/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_71/bin/../jre/lib/amd64;F:\Projects\Java\tools\apache-maven-3.5.0\bin;C:\Program Files\Java\jdk1.7.0_71\bin;C:\Program Files\Java\jdk1.7.0_71\jre\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;F:\长宝科技\GQ平台\GQClient_New\bin;C:\Program Files (x86)\Borland\Delphi7\Bin;C:\Program Files (x86)\Borland\Delphi7\Projects\Bpl\;C:\ProgramData\oracle\Java\javapath;C:\Program Files (x86)\Embarcadero\Studio\17.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\17.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin;C:\Users\Public\Documents\RAD Studio\9.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin64;C:\Users\Public\Documents\RAD Studio\9.0\Bpl\Win64;d:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin;d:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.net Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\TortoiseSVN\bin;C:\Users\yc\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;D:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;D:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Users\yc\AppData\Local\Microsoft\WindowsApps;;F:\Projects\Java\tools\eclipse;;.
七月
31, 2017 8:09:08下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [
"http-nio-8080"]
七月
31, 2017 8:09:08下午 org.apache.tomcat.util.Net.NioSelectorPool getSharedSelector
信息: Using a shared selector
for servlet write/read
七月
31, 2017 8:09:08下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [
"ajp-nio-8009"]
七月
31, 2017 8:09:08下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector
for servlet write/read
七月
31, 2017 8:09:08下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in
1830ms
七月
31, 2017 8:09:08下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
七月
31, 2017 8:09:08下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat
/8.0.36七月31, 2017 8:09:10下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance
for session ID generation using [SHA1PRNG] took [461] milliseconds.
七月
31, 2017 8:09:15下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger fora 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.
七月
31, 2017 8:09:15下午 org.apache.catalina.core.ApplicationContext log
信息: No spring WebApplicationInitializer types detected on classpath
七月
31, 2017 8:09:15下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
INFO [localhost
-startStop-1] -Root WebApplicationContext: initialization started
DEBUG [localhost
-startStop-1] - Initializing newStandardServletEnvironment
DEBUG [localhost
-startStop-1] -Adding [servletConfigInitParams] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [servletContextInitParams] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [jndiProperties] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,jndiProperties,systemProperties,systemEnvironment]
INFO [localhost
-startStop-1] - Refreshing Root WebApplicationContext: startup date [Mon Jul 31 20:09:15 CST 2017]; root of context hierarchy
DEBUG [localhost
-startStop-1] -Replacing [servletContextInitParams] PropertySource with [servletContextInitParams]
DEBUG [localhost
-startStop-1] - Initializing newStandardEnvironment
DEBUG [localhost
-startStop-1] -Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [localhost
-startStop-1] - Initializing newStandardEnvironment
DEBUG [localhost
-startStop-1] -Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [localhost
-startStop-1] - Resolved location pattern [/WEB-INF/classes/spring/applicationContext-*.xml] to resources [ServletContext resource [/WEB-INF/classes/spring/applicationContext-dao.xml], ServletContext resource [/WEB-INF/classes/spring/applicationContext-service.xml], ServletContext resource [/WEB-INF/classes/spring/applicationContext-transaction.xml]]
INFO [localhost
-startStop-1] - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/spring/applicationContext-dao.xml]
DEBUG [localhost
-startStop-1] -Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG [localhost
-startStop-1] - Loading schema mappings from [META-INF/spring.schemas]
DEBUG [localhost
-startStop-1] - Loaded schema mappings: {http://mybatis.org/schema/mybatis-spring-1.2.xsd=org/mybatis/spring/config/mybatis-spring-1.2.xsd,http://www.springframework.org/schema/jee/spring-jee-3.2.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd,http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd,http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd=org/springframework/web/servlet/config/spring-mvc-3.1.xsd,http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd,http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd,http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring-cache-3.2.xsd,http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd,http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd,http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd,http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd,http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd,http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd,http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd=org/springframework/jdbc/config/spring-jdbc-3.1.xsd,http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd,http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd,http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.2.xsd,http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd,http://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/config/spring-context-3.2.xsd,http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd,http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd,http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd,http://www.springframework.org/schema/lang/spring-lang-3.2.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd,http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd,http://www.springframework.org/schema/cache/spring-cache-3.2.xsd=org/springframework/cache/config/spring-cache-3.2.xsd,http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd,http://mybatis.org/schema/mybatis-spring.xsd=org/mybatis/spring/config/mybatis-spring-1.2.xsd,http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd,http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd,http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd,http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd,http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd,http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd,http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd,http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd,http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd,http://www.springframework.org/schema/aop/spring-aop-3.2.xsd=org/springframework/aop/config/spring-aop-3.2.xsd,http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd,http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd,http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd,http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd,http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd,http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd,http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/spring-cache-3.1.xsd,http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.2.xsd,http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd,http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd,http://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd,http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd,http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd,http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd,http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd,http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-aop-3.1.xsd,http://www.springframework.org/schema/task/spring-task-3.2.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd,http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd,http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd,http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd,http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd,http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd,http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd,http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd,http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd,http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd,http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} DEBUG [localhost-startStop-1] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.2.xsd DEBUG [localhost-startStop-1] - Found XML schema [http://www.springframework.org/schema/context/spring-context-3.2.xsd] in classpath: org/springframework/context/config/spring-context-3.2.xsd DEBUG [localhost-startStop-1] - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-3.2.xsd DEBUG [localhost-startStop-1] -Loading bean definitions
DEBUG [localhost
-startStop-1] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler,http://www.springframework.org/schema/mvc=org.springframework.web.servlet.config.MvcNamespaceHandler,http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler,http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler,http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler,http://www.springframework.org/schema/jdbc=org.springframework.jdbc.config.JdbcNamespaceHandler,http://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler,http://mybatis.org/schema/mybatis-spring=org.mybatis.spring.config.NamespaceHandler,http://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNamespaceHandler,http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler,http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler,http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler,http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} DEBUG [localhost-startStop-1] - Neither XML 'id' nor 'name' specified - using generated bean name [org.mybatis.spring.mapper.MapperScannerConfigurer#0]
INFO [localhost
-startStop-1] - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/spring/applicationContext-service.xml]
DEBUG [localhost
-startStop-1] -Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG [localhost
-startStop-1] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.2.xsd DEBUG [localhost-startStop-1] -Loading bean definitions
INFO [localhost
-startStop-1] - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/spring/applicationContext-transaction.xml]
DEBUG [localhost
-startStop-1] -Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG [localhost
-startStop-1] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.2.xsd DEBUG [localhost-startStop-1] - Found XML schema [http://www.springframework.org/schema/tx/spring-tx-3.2.xsd] in classpath: org/springframework/transaction/config/spring-tx-3.2.xsd DEBUG [localhost-startStop-1] - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-3.2.xsd DEBUG [localhost-startStop-1] - Found XML schema [http://www.springframework.org/schema/aop/spring-aop-3.2.xsd] in classpath: org/springframework/aop/config/spring-aop-3.2.xsd DEBUG [localhost-startStop-1] -Loading bean definitions
DEBUG [localhost
-startStop-1] - Loaded 9 bean definitions from location pattern [/WEB-INF/classes/spring/applicationContext-*.xml]
DEBUG [localhost
-startStop-1] - Bean factory for Root WebApplicationContext: org.springframework.beans.factory.support.DefaultListableBeanFactory@2f098b2: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,itemsService,transactionManager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0]; root of factory hierarchy
DEBUG [localhost
-startStop-1] - Ignoring bean class loading failure for bean 'itemsService'org.springframework.beans.factory.CannotLoadBeanClassException: Error loadingclass [cn.itcast.ssm.service.impl.ItemsServiceImpl] for bean with name 'itemsService' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-service.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: cn/itcast/ssm/service/impl/ItemsServiceImpl : Unsupported major.minor version 52.0 (unable to load classcn.itcast.ssm.service.impl.ItemsServiceImpl)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:
1266)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:
581)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:
1332)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:
337)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:
308)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:
416)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:
624)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:
383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:
283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:
112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:
147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1397)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsupportedClassVersionError: cn
/itcast/ssm/service/impl/ItemsServiceImpl : Unsupported major.minor version 52.0 (unable to load classcn.itcast.ssm.service.impl.ItemsServiceImpl)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:
2544)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:
858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:
1301)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:
1166)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:
258)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:
415)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:
1284)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:
1255)
...
19more
DEBUG [localhost
-startStop-1] - Creating shared instance of singleton bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'DEBUG [localhost-startStop-1] - Creating instance of bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'DEBUG [localhost-startStop-1] - Eagerly caching bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' to allow forresolving potential circular references
DEBUG [localhost
-startStop-1] - Invoking afterPropertiesSet() on bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'DEBUG [localhost-startStop-1] - Finished creating instance of bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'DEBUG [localhost-startStop-1] - Initializing newStandardEnvironment
DEBUG [localhost
-startStop-1] -Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [localhost
-startStop-1] -Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [localhost
-startStop-1] - Looking for matching resources in directory tree [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper]
DEBUG [localhost
-startStop-1] - Searching directory [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper] for files matching pattern [F:/Projects/Java/workspaceTest2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/springmvc_mybatis1208/WEB-INF/classes/cn/itcast/ssm/mapper/**/*.class]
DEBUG [localhost-startStop-1] - Resolved location pattern [classpath*:cn/itcast/ssm/mapper/*
*/*.class] to resources [file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\ItemsMapper.class], file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\ItemsMapperCustom.class], file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\OrderdetailMapper.class], file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\OrdersMapper.class], file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\UserMapper.class]]
INFO [localhost
-startStop-1] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2f098b2: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,itemsService,transactionManager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0]; root of factory hierarchy
ERROR [localhost
-startStop-1] -Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component
class: file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\ItemsMapper.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:
281)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:
242)
at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:
155)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan(ClassPathBeanDefinitionScanner.java:
220)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:
315)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:
630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:
383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:
283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:
112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:
147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1397)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.
<init>(Unknown Source)
at org.springframework.asm.ClassReader.
<init>(Unknown Source)
at org.springframework.asm.ClassReader.
<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.
<init>(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:
80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:
101)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:
257)
...
18more
七月
31, 2017 8:09:17下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of
classorg.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component
class: file [F:\Projects\Java\workspaceTest2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\springmvc_mybatis1208\WEB-INF\classes\cn\itcast\ssm\mapper\ItemsMapper.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:
281)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:
242)
at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:
155)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan(ClassPathBeanDefinitionScanner.java:
220)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:
315)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:
630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:
383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:
283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:
112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:
147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1397)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.
<init>(Unknown Source)
at org.springframework.asm.ClassReader.
<init>(Unknown Source)
at org.springframework.asm.ClassReader.
<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.
<init>(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:
80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:
101)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents
(ClassPathScanningCandidateComponentProvider.java:
257)
...
18more
七月
31, 2017 8:09:17下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate Container log file
七月
31, 2017 8:09:17下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [
/springmvc_mybatis1208] startup failed due to previous errors
七月
31, 2017 8:09:17下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
七月
31, 2017 8:09:17下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [
"http-nio-8080"]
七月
31, 2017 8:09:17下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [
"ajp-nio-8009"]
七月
31, 2017 8:09:17下午 org.apache.catalina.startup.Catalina start
信息: Server startup in
8366 ms