Exception sending context initialized event to listener instance of class

博客介绍了在启动服务器时遇到'Exception sending context initialized event to listener instance of class'错误的解决方案。错误提示指向了'com.via.frame.rpc.http.client.HttpProxyFactory'类。检查src/main/resources/spring目录下XML文件,确认是否缺少项目引用或Jar包。如果是不必要的,可直接删除。2019年5月23日更新的内容提到,很多Java问题可以根据'Caused by:'后的错误信息定位问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

详细错误信息如下:

 

严重: Exception sending context initialized event to listener instance of class com.auth.spring.listener.SpringLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in file [C:\Workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\testcs_dn-admin-web\WEB-INF\classes\spring\applicationContext-resource.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationAttributeSourceAdvisor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.auth.aop.interceptor.AnnotationsMethodInterceptor com.auth.aop.interceptor.AuthorizationAttributeSourceAdvisor.annotationsMethodInterceptor; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.via.frame.rpc.http.client.HttpProxyFactory] for bean with name 'com.via.frame.rpc.http.client.HttpProxyFactory#0' defined in file [C:\Workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\testcs_dn-admin-web\WEB-INF\classes\spring\applicationContext-service.xml]; nested exception is java.lang.ClassNotFoundException: com.via.frame.rpc.http.client.HttpProxyFactory
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.via.frame.rpc.http.client.HttpProxyFactory] for bean with name 'com.via.frame.rpc.http.client.HttpProxyFactory#0' defined in file [C:\Workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\testcs_dn-admin-web\WEB-INF\classes\spring\applicationContext-service.xml]; nested exception is java.lang.ClassNotFoundException: com.via.frame.rpc.http.client.HttpProxyFactory
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.via.frame.rpc.http.client.HttpProxyFactory] for bean with name 'com.via.frame.rpc.http.client.HttpProxyFactory#0' defined in file [C:\Workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\testcs_dn-admin-web\WEB-INF\classes\spring\applicationContext-service.xml]; nested exception is java.lang.ClassNotFoundException: com.via.frame.rpc.http.client.HttpProxyFactory
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.via.frame.rpc.http.client.HttpProxyFactory] for bean with name 'com.via.frame.rpc.http.client.HttpProxyFactory#0' defined in file [C:\Workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\testcs_dn-admin-web\WEB-INF\classes\spring\applicationContext-service.xml]; nested exception is java.lang.ClassNotFoundException: com.via.frame.rpc.http.client.HttpProxyFactory
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:454)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
	at org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:786)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
	at com.auth.spring.listener.SpringLoaderListener.contextInitialized(SpringLoaderListener.java:24)
	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(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationAttributeSourceAdvisor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.auth.aop.interceptor.AnnotationsMethodInterceptor com.auth.aop.interceptor.AuthorizationAttributeSourceAdvisor.annotationsMethodInterceptor; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.via.frame.rpc.http.client.HttpProxyFactory] for bean with name 'com.via.frame.rpc.http.client.HttpProxyFactory#0' defined in file [C:\Workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\testcs_dn-admin-web\WEB-INF\classes\spring\applicationContext-service.xml]; nested exception is java.lang.ClassNotFoundException: com.via.frame.rpc.http.client.HttpProxyFactory
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
	at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:92)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:101)
	at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:85)
	at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:276)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:920)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:892)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
	... 19 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field:
评论 20
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值