老师为什么报错呢?

老师为什么报错呢?

2019-4-29 17:22:07 org.apache.catalina.core.AprLifecycleListener init

信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Users\Administrator\AppData\Local\MyEclipse Professional\binary\com.sun.java.jdk.win32.x86_64_1.6.0.u43\bin;D:\Users\Administrator\AppData\Local\MyEclipse Professional\plugins\com.genuitec.eclipse.easie.tomcat7.myeclipse_11.0.0.me201305151620\tomcat\bin

2019-4-29 17:22:07 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["http-bio-8080"]

2019-4-29 17:22:07 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["ajp-bio-8009"]

2019-4-29 17:22:07 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 341 ms

2019-4-29 17:22:07 org.apache.catalina.core.StandardService startInternal

信息: Starting service Catalina

2019-4-29 17:22:07 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/7.0.30

2019-4-29 17:22:07 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory E:\workspace\.metadata\.me_tcat7\webapps\ROOT

2019-4-29 17:22:14 org.apache.catalina.core.ApplicationContext log

信息: No Spring WebApplicationInitializer types detected on classpath

2019-4-29 17:22:14 org.apache.catalina.core.ApplicationContext log

信息: Set web app root system property: 'tzjxxt' = [E:\workspace\.metadata\.me_tcat7\webapps\ROOT\]

2019-4-29 17:22:14 org.apache.catalina.core.ApplicationContext log

信息: Initializing log4j from [E:\workspace\.metadata\.me_tcat7\webapps\ROOT\WEB-INF\log4j.properties]

2019-4-29 17:22:14 org.apache.catalina.core.ApplicationContext log

信息: Initializing Spring root WebApplicationContext

2019-4-29 17:22:24 org.apache.catalina.core.StandardContext listenerStart

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'LoginDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tengzhi.system.dao.ReadmeDao com.tengzhi.system.dao.LoginDao.rdao; nested exception is java.lang.UnsupportedClassVersionError: cn/jpush/api/push/model/notification/PlatformNotification : Unsupported major.minor version 51.0 (unable to load class cn.jpush.api.push.model.notification.PlatformNotification)

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:662)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'LoginDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tengzhi.system.dao.ReadmeDao com.tengzhi.system.dao.LoginDao.rdao; nested exception is java.lang.UnsupportedClassVersionError: cn/jpush/api/push/model/notification/PlatformNotification : Unsupported major.minor version 51.0 (unable to load class cn.jpush.api.push.model.notification.PlatformNotification)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416)

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:550)

at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150)

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)

... 27 more

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tengzhi.system.dao.ReadmeDao com.tengzhi.system.dao.LoginDao.rdao; nested exception is java.lang.UnsupportedClassVersionError: cn/jpush/api/push/model/notification/PlatformNotification : Unsupported major.minor version 51.0 (unable to load class cn.jpush.api.push.model.notification.PlatformNotification)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514)

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)

... 40 more

Caused by: java.lang.UnsupportedClassVersionError: cn/jpush/api/push/model/notification/PlatformNotification : Unsupported major.minor version 51.0 (unable to load class cn.jpush.api.push.model.notification.PlatformNotification)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2908)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2398)

at java.lang.Class.getDeclaredConstructors(Class.java:1838)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:230)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:978)

at org.springframework.beans.factory.support.Abs

tractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:910)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:853)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:768)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486)

... 42 more

2019-4-29 17:22:24 org.apache.catalina.core.StandardContext startInternal

严重: Error listenerStart

2019-4-29 17:22:24 org.apache.catalina.core.StandardContext startInternal

严重: Context [] startup failed due to previous errors

2019-4-29 17:22:24 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

2019-4-29 17:22:24 org.apache.catalina.core.ApplicationContext log

信息: Shutting down log4j

2019-4-29 17:22:24 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.

2019-4-29 17:22:24 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc

严重: The web application [] registered the JDBC driver [net.sourceforge.jtds.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.

2019-4-29 17:22:24 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["http-bio-8080"]

2019-4-29 17:22:24 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["ajp-bio-8009"]

2019-4-29 17:22:24 org.apache.catalina.startup.Catalina start

信息: Server startup in 17497 ms

老师我新导入了一个项目,但是导入进来就报错,您帮我看看是什么原因呢

正在回答

登陆购买课程后可参与讨论,去登陆

2回答

同学使用的IDEA吗?点击File->Project Structure,然后在project中修改jdk的版本。如:

http://img1.sycdn.imooc.com//climg/5cc7aac400012f1006850343.jpg

祝:学习愉快~

好帮手慕阿满 2019-04-29 18:57:14

同学你好,报错提示创建bean时LoginDao错误,autowired自动注入依赖失败,不支持的版本错误。具体的报错如下:

http://img1.sycdn.imooc.com//climg/5cc6d6050001a10108200286.jpg

问一下同学导入项目之前是能成功运行的吗?导入到项目后有报错吗?jdk的版本有修改为自己电脑上的版本吗?mysql的版本及密码等都修改了吗?

建议同学检查一下。

祝:学习愉快~

  • 提问者 慕粉1469801537 #1
    之前没有报错,老师在哪里修改为自己的jdk 呢?
    2019-04-29 19:55:38
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
SSM主流框架入门与综合项目实战2018版
  • 参与学习           人
  • 提交作业       205    份
  • 解答问题       4317    个

Java中非常实用的SSM整合开发内容,从Spring开始,到MyBaits的进阶内容,再到SpringMVC的应用,最后是SSM整合开发案例,逐步深入,助你成长为一名Java工程师!

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师