window安装tomcat启动报错: Unsupported major.minor version 52.0 (无法载入的.类 [com.mysql.jdbc.Driver])

解决window环境下Tomcat启动后无法访问的问题,分析日志发现与Spring Bean创建异常有关,涉及transactionManager、dataSource配置错误,疑似因JDK版本过低导致。
摘要由CSDN通过智能技术生成

window安装tomcat启动后不能访问,catalina.out日志启动正常,localhost日志报错如下

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysCustomerService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysCustomerAttrService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionAdvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in URL [jar:file:/D:/CreditSoft/ProgramFiles/tomcat7_rules/webapps/web/WEB-INF/lib/hr_core-0.0.1-SNAPSHOT.jar!/spring/spring-mybatis.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/D:/CreditSoft/ProgramFiles/tomcat7_rules/webapps/web/WEB-INF/lib/hr_core-0.0.1-SNAPSHOT.jar!/spring/spring-mybatis.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0 (无法载入的.类 [

有可能是因为jdk版本太低的原因,可以升级一下jdk的版本

更换jdk版本:

(1)安装好jdk

(2)修改注册表:win+R调出运行-------输入regedit----HKEY_LOCAL_MACHINE-------SOFTWARE---------Apache Software Foundation----------Procrun 2.0------Tomcat62-----Parameters---------JAVA------双击jvm修改jdk的路径------保存重启tomcat即可

若:找不到Apache Software Foundation,可以找下SOFTWARE下的Wow6432Node 看是否有Apache

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值