tomcat启动时加载配置文件 报错

原因:  @serice("customerService")  和@Repository(value="customerDao")       解决: 直接@serice 和 @Repository
严重: 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 ‘customerService‘ defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘customerDao‘ of bean class [cn.itcast.service.CustomerServiceImpl]: Bean property ‘customerDao‘ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1518)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
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:745)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ‘customerDao‘ of bean class [cn.itcast.service.CustomerServiceImpl]: Bean property ‘customerDao‘ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.createNotWritablePropertyException(BeanWrapperImpl.java:231)
at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:423)
at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:280)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514)
... 22 more

原文地址:https://www.cnblogs.com/shan1393/p/9096774.html

时间: 2024-08-01 21:16:54

tomcat启动时加载配置文件 报错的相关文章

如何在tomcat启动时加载一个类

Tomcat启动时classloader加载顺序 Tomcat的class加载的优先顺序一览   1.最先是$JAVA_HOME/jre/lib/ext/下的jar文件.   2.环境变量CLASSPATH中的jar和class文件.   3.$CATALINA_HOME/common/classes下的class文件.   4.$CATALINA_HOME/commons/endorsed下的jar文件.   5.$CATALINA_HOME/commons/i18n下的jar文件.   6.

Tomcat(一):Tomcat启动时加载web.xml

server.xml配置文件样例: <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional inf

bash启动时加载配置文件过程

本文目录: 1.1 判断是否交互式.是否登录式 1.2 几种常见的bash启动方式 1.3 加载bash环境配置文件 当用户登录系统时,会加载各种bash配置文件,还会设置或清空一系列变量,有时还会执行一些自定义的命令.这些行为都算是启动bash时的过程. 另外,有些时候登录系统是可以交互的(如正常登录系统),有些时候是无交互的(如执行一个脚本),因此总的来说bash启动类型可分为交互式shell和非交互式shell.更细分一层,交互式shell还分为交互式的登录shell和交互式非登录shel

Servlet在启动时加载的tomcat源码(原创)

tomcat 8.0.36 知识点: 通过配置loadOnStartup可以设置Servlet是否在Tomcat启动时加载,以及按值大小进行有序加载,其最小有效值为0,最大有效值为Integer.MAX_VALUE. Jsp Servlet的类是org.apache.jasper.servlet.JspServlet. Jsp Servlet是强制性启动时加载,其loadOnStartup的默认值,或其值是失效值时,将使用最大有效值. 通过配置Context或Host的failCtxIfServ

kettle登录加载job 报错 Can&#39;t find Job 1

报错原因: Job 1是临时的新建job,我没保存数据库中,或本地文件,所以加载时找不到文件 解决方法: 目录C:\Documents and Settings\Administrator\.kettle\中有个.spoonrc文件 kettle启动会加载.spoonrc文件, 该文件中保存kettle的配置信息,包括启动时要加载哪些文件 删掉对应的 Job 1的键值对就行了,记得要调整相应键值计数. 我的环境中 tabfile1=Job 1 tabfile2=\u5237\u65B0\u5B9

CentOS重新加载网卡报错 Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/23

重新加载网卡时出现的错误如下: 1 [[email protected] dev]# service network restart 2 Shutting down interface eth0: Device state: 3 (disconnected) 3 [ OK ] 4 Shutting down interface eth1: [ OK ] 5 Shutting down interface eth2: Device state: 3 (disconnected) 6 [ OK ]

加载模块报错:version magic &#39;2.6.32-504.el6.i686 SMP mod_unload 686 &#39; should

在之前我也遇到这个问题,后来我解决了,但是当时没有记录下来,现在又遇到了,害我整了半天,所以现在记录下,供以后参考: 我开始的加载模块的时候报这样的错误: hello: module_layout: kernel tainted. Disabling lock debugging due to kernel taint hello: version magic '2.6.32-504.el6.i686 SMP mod_unload 686 ' should be '2.6.32-504.el6.

python 加载excel报错

from pandas import Series, DataFrame import pandas as pd import numpy as np import os import sys reload(sys) sys.setdefultencoding('utf-8') file1=pd.read_excel('F:/dataanalysis/statistics/PelicanStores.xlsx') Python 加载excel报错: IndexError: list index

dojo加载树报错

1.错误描述    error loading undefined children.    TypeError:this._arrayOfTopLevelItems is undefied. 2.错误原因 3.解决办法 dojo加载树报错