项目中遇到问题就是增加aranda(图片存储)测试环境依赖报错解决进行中
发布时间:2020-05-28 04:27:46 所属栏目:程序设计 来源:互联网
导读:问题描述: 项目增加依赖报错 最近进行图片迁移的改造,在本地window Xp环境下做好代码后,进行提交测试时候,发现应用居然跑步起来,测试环境是生成RPM包,但是不管是什么包不要影响 应用的启动,这个问题困扰啊!!!!!!!!!!! 下面是本人在众多大虾
|
项目增加依赖报错 最近进行图片迁移的改造,在本地window Xp环境下做好代码后,进行提交测试时候,发现应用居然跑步起来,测试环境是生成RPM包,但是不管是什么包不要影响 应用的启动,这个问题困扰啊!!!!!!!!!!! 下面是本人在众多大虾帮助下进行问题排除的一些小节!!!!!!!!!!!!!!!!!!!!!!!!!!! pom增加依赖报错: <dependency> <groupId>com.alibaba.platform.shared</groupId> <artifactId>aranda.client</artifactId> <version>1.3.0</version> <exclusions> <exclusion> <groupId>com.alibaba.platform.shared</groupId> <artifactId>aranda.core</artifactId> </exclusion> </exclusions> </dependency> 在总控文件中增加依赖,红色的部分表示aranda.core对spring的依赖不影响本应用的spring依赖。
错误描述: 2011-08-23 20:15:43,414 [] ERROR service.ServiceManager - Service BeanFactoryService.quan failed to initialize
com.alibaba.service.ServiceInitializationException: Failed to initialize BeanFactory
at com.alibaba.service.spring.DefaultBeanFactoryService.init(DefaultBeanFactoryService.java:79)
at com.alibaba.service.GenericService.init(GenericService.java:26)
at com.alibaba.service.DefaultServiceManager.initService(DefaultServiceManager.java:453)
at com.alibaba.service.DefaultServiceManager.getService(DefaultServiceManager.java:813)
at com.alibaba.service.DefaultServiceManager.initAll(DefaultServiceManager.java:187)
at com.alibaba.webx.WebxLoader.configureAllServices(WebxLoader.java:676)
at com.alibaba.webx.WebxLoader.configure(WebxLoader.java:266)
at com.alibaba.webx.WebxControllerListener.contextInitialized(WebxControllerListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'placeholderConfig' defined in resource loader resource [/bizquan/beans/biz-common.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:515)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362)
at com.alibaba.service.spring.DefaultBeanFactoryService.init(DefaultBeanFactoryService.java:75)
... 142 more
Caused by: java.lang.IllegalArgumentException: Method must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:58)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:259)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.unsatisfiedNonSimpleProperties(AbstractAutowireCapableBeanFactory.java:1109)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByName(AbstractAutowireCapableBeanFactory.java:1025)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:977)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
... 153 more
排查方案: 1)我先是在本地把maven.lib下的所有的文件删除,重新拉依赖包,看应用起来没有,如果没有是本地应用问题。 2)查看本地依赖树结构, D:bizcomqun>mvn dependency:tree -Dexcludes=org.springframework.beans.factory.c onfig.PropertyPlaceholderConfigurer mvn dependency:tree >a.txt 发现aranda对spring的依赖是2.5.6,而应用对spring的依赖是2.5.5.,这个需要大家关注的。 发现项目中的依赖众多: INFO] ------------------------------------------------------------------------
INFO] Building bizquan-deploy
INFO] task-segment: [dependency:tree]
INFO] ------------------------------------------------------------------------
INFO] [dependency:tree {execution: default-cli}]
INFO] com.alibaba.china.app:bizquan.deploy:jar:1.0-SNAPSHOT
INFO] - com.alibaba.china.app:bizquan.bundle.war:ali-war:1.0-SNAPSHOT:runtime
INFO] +- com.alibaba.shared:toolkit.webx.filter:jar:2.0:runtime
INFO] | +- com.alibaba.external:java.j2ee:jar:1.4:provided (version managed
from 0.0.0; scope managed from runtime)
INFO] | +- com.alibaba.shared:toolkit.common.logging:jar:1.0:runtime
INFO] | | +- com.alibaba.shared:toolkit.common.lang:jar:1.0:runtime
INFO] | | - com.alibaba.external:jakarta.log4j:jar:0.0.0:runtime
INFO] | - com.alibaba.shared:toolkit.webx.framework:jar:2.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.framework:jar:1.0:runtime
INFO] | | +- com.alibaba.shared:toolkit.common.collection:jar:1.0:runti
e
INFO] | | - com.alibaba.shared:toolkit.common.configuration:jar:1.0:ru
time
INFO] | | +- com.alibaba.external:jakarta.commons.jelly:jar:0.0.0:ru
time
INFO] | | - com.alibaba.external:jakarta.commons.beanutils:jar:0.0.
:runtime
INFO] | +- com.alibaba.shared:toolkit.service.jsp:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.localization:jar:1.0:runti
e
INFO] | +- com.alibaba.shared:toolkit.service.mimetype:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.naming:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.pipeline:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.pool:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.pull:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.resource:jar:1.0:runtime
INFO] | | - com.alibaba.shared:toolkit.common.regexp:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.rundata:jar:1.0:runtime
INFO] | | - com.alibaba.shared:toolkit.webx.request:jar:2.0:runtime
INFO] | | +- com.alibaba.shared:toolkit.common.convert:jar:1.0:runti
e
INFO] | | - com.alibaba.external:jakarta.commons.digester:jar:0.0.0
runtime
INFO] | +- com.alibaba.shared:toolkit.service.template:jar:1.0:runtime
INFO] | +- com.alibaba.shared:toolkit.service.threadcontext:jar:1.0:runt
me
INFO] | +- com.alibaba.shared:toolkit.service.upload:jar:1.0:runtime
INFO] | | - com.alibaba.external:jakarta.commons.fileupload:jar:0.0.0:
untime
INFO] | +- com.alibaba.shared:toolkit.service.velocity:jar:1.5:runtime (
ersion managed from 1.0)
INFO] | | - com.alibaba.external:jakarta.velocity:jar:1.6.1:runtime (v
rsion managed from 1.5)
INFO] | | - com.alibaba.external:jakarta.commons.collections:jar:0.
.0:runtime
INFO] | - com.alibaba.shared:toolkit.service.freemarker:jar:1.0:runtime
3) 一步一步增加依赖,看是什么导致这个问题。 调试发现这个配置文件中的bean出问题,但是无解,到底是什么问题? (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
