org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeurl' def

晚上在整合的SSH的时候爆了下面的错误,花了一个晚上也没有解决。

结果第二天把错误粘贴到一个文本中才看清楚错误的全貌,原来是 一个 action bean 的返回services引用名称搞错了。

没看完错误的详细信息,就去 网上 大片 google,结果白浪费了一个晚上,真是 太蛋疼了。





  1. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeurl' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  2. PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.blog.Services.IPassageService] for property 'passageService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.blog.Services.IPassageService] for property 'passageService': no matching editors or conversion strategy found
  3. Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
  4. PropertyAccessException 1:
  5. org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.blog.Services.IPassageService] for property 'passageService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.blog.Services.IPassageService] for property 'passageService': no matching editors or conversion strategy found
  6. Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.blog.Services.IPassageService] for property 'passageService': no matching editors or conversion strategy found
  7. at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
  8. at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
  9. at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815)
  10. at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)
  11. at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
  12. at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
  13. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1122)
  14. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)
  15. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
  16. at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
  17. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
  18. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
  19. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
  20. at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
  21. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
  22. at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)
  23. at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)
  24. at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
  25. at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
  26. at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
  27. at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
  28. at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
  29. at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
  30. at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
  31. at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
  32. at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
  33. at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
  34. at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
  35. at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
  36. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
  37. at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
  38. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  39. at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
  40. at org.apache.catalina.core.StandardService.start(StandardService.java:525)
  41. at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
  42. at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
  43. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  44. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  45. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  46. at java.lang.reflect.Method.invoke(Unknown Source)
  47. at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
  48. at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration
05-10
[ade@www ~]$ docker logs --tail 200 nacos | grep -i "error\|exception" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memoryMonitor' defined in URL [jar:file:/home/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-config-2.1.0.jar!/com/alibaba/nacos/config/server/monitor/MemoryMonitor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncNotifyService': Unsatisfied dependency expressed through field 'dumpService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncNotifyService': Unsatisfied dependency expressed through field 'dumpService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : Caused by: com.alibaba.nacos.api.exception.NacosException: Nacos Server did not start because dumpservice bean construction failure : Caused by: java.lang.IllegalStateException: No DataSource set 2025-08-19 17:03:16,473 ERROR Nacos failed to start, please see /home/nacos/logs/nacos.log for more details. Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2025-08-19 17:03:16,484 ERROR Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memoryMonitor' defined in URL [jar:file:/home/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-config-2.1.0.jar!/com/alibaba/nacos/config/server/monitor/MemoryMonitor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncNotifyService': Unsatisfied dependency expressed through field 'dumpService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncNotifyService': Unsatisfied dependency expressed through field 'dumpService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : Caused by: com.alibaba.nacos.api.exception.NacosException: Nacos Server did not start because dumpservice bean construction failure : Caused by: java.lang.IllegalStateException: No DataSource set [ade@www ~]$ [ade@www ~]$
08-20
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值