SpringMvc 项目一启动就报错

世界太假丶 2016-12-07 12:35:14
十二月 07, 2016 12:26:44 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mvp' did not find a matching property.
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.0.36
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jun 9 2016 13:55:50 UTC
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.0.36.0
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 8.1
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.3
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.7.0_79\jre
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_79-b15
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\Project\JAVA\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\Exploit\apache-tomcat-8.0.36
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Xms1024m
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Xmx4096m
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -XX:MaxNewSize=512m
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -XX:MaxPermSize=1024m
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\Project\JAVA\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Exploit\apache-tomcat-8.0.36
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\Project\JAVA\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Exploit\apache-tomcat-8.0.36\endorsed
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
十二月 07, 2016 12:26:44 下午 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\jdk1.7.0_79\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;D:\111\app\mysql\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\111\app\mysql\bin;C:\Users\yao\AppData\Local\Microsoft\WindowsApps;.
十二月 07, 2016 12:26:44 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
十二月 07, 2016 12:26:44 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 07, 2016 12:26:44 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8019"]
十二月 07, 2016 12:26:44 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 07, 2016 12:26:44 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 908 ms
十二月 07, 2016 12:26:44 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 07, 2016 12:26:44 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.36
十二月 07, 2016 12:26:56 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a 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.
十二月 07, 2016 12:26:57 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Project/JAVA/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/mvp/WEB-INF/lib/activemq-all-5.14.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Project/JAVA/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/mvp/WEB-INF/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
com.mysql.jdbc.JDBC4Connection@78389fd6
2016-12-07 12:26:57,489 [localhost-startStop-1] INFO [com.soc.common.servlet.CheckDbState] - database pool ok!
十二月 07, 2016 12:26:57 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2016-12-07 12:27:01,799 [localhost-startStop-1] INFO [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} inited
十二月 07, 2016 12:27:09 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'springServlet'
ERROR [localhost-startStop-1] [DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'phoneVirusRecordController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.soc.modules.phonevirus.service.PhoneVirusRecordService com.soc.modules.phonevirus.web.PhoneVirusRecordController.phoneVirusRecordService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'phoneVirusRecordService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.soc.modules.phonevirus.dao.PhoneVirusRecordDao com.soc.modules.phonevirus.service.PhoneVirusRecordService.phoneVirusRecordDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'phoneVirusRecordDao': FactoryBean threw exception on object creation; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property get found for type com.soc.modules.phonevirus.entity.PhoneVirusRecord
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1208)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
...全文
193 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
世界太假丶 2016-12-07
  • 打赏
  • 举报
回复
[b]Spring配置没有问题: <context:component-scan base-package="com.soc" use-default-filters="false"><!-- base-package 如果多个,用“,”分隔 --> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" /> </context:component-scan>
世界太假丶 2016-12-07
  • 打赏
  • 举报
回复
解决了,问题是Dao层的注解在接口实现类上,所以命名要和接口一致,框架的问题...
世界太假丶 2016-12-07
  • 打赏
  • 举报
回复
引用 3 楼 java_pet 的回复:
看下Error的这个信息,创建dao的时候出错,没有property匹配PhoneVirusRecord Error creating bean with name 'phoneVirusRecordDao': FactoryBean threw exception on object creation; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property get found for type com.soc.modules.phonevirus.entity.PhoneVirusRecord
匹配的上实体啊...我怀疑是注解有问题,但是找不出来...
小阎王 2016-12-07
  • 打赏
  • 举报
回复
看下Error的这个信息,创建dao的时候出错,没有property匹配PhoneVirusRecord Error creating bean with name 'phoneVirusRecordDao': FactoryBean threw exception on object creation; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property get found for type com.soc.modules.phonevirus.entity.PhoneVirusRecord
小阎王 2016-12-07
  • 打赏
  • 举报
回复
phoneVirusRecordController这个类中在注入phoneVirusRecordService的时候有问题,你在看下。

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧