开发者社区> 问答> 正文

Java maven项目在window下运行正常,部署到Linux环境中启动报错?400报错

设定默认时区为:GMT+8
2018-07-19 18:58:12,013 [INFO ] com.eos.manager.web.listener.SpringContextListener.contextInitialized(SpringContextListener.java:17) - 加载SpringBean模块
2018-07-19 18:58:12,015 [INFO ] org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:305) - Root WebApplicationContext: initialization started
2018-07-19 18:58:12,087 [INFO ] org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:578) - Refreshing Root WebApplicationContext: startup date [Thu Jul 19 18:58:12 GMT+08:00 2018]; root of context hierarchy
2018-07-19 18:58:12,120 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from file [/data/tomcat8081/webapps/eos-manager/WEB-INF/classes/configs/bean/ac_anno_web.xml]
2018-07-19 18:58:12,286 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-service-0.0.1-SNAPSHOT.jar!/configs/bean/ac_activemq-conn.xml]
2018-07-19 18:58:12,302 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-service-0.0.1-SNAPSHOT.jar!/configs/bean/ac_anno_service.xml]
2018-07-19 18:58:12,371 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_anno_utils.xml]
2018-07-19 18:58:12,402 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_config.xml]
2018-07-19 18:58:12,414 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]
2018-07-19 18:58:12,439 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_redisclient.xml]
2018-07-19 18:58:12,704 [INFO ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) - Loading XML bean definitions from file [/data/tomcat8081/webapps/eos-manager/WEB-INF/classes/configs/bean/ac_anno_web.xml]
2018-07-19 18:58:12,815 [INFO ] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:172) - Loading properties file from file [/data/tomcat8081/webapps/eos-manager/WEB-INF/classes/configs/conf/z_custom.conf]
2018-07-19 18:58:12,815 [INFO ] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:172) - Loading properties file from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-service-0.0.1-SNAPSHOT.jar!/configs/conf/public.conf]
2018-07-19 18:58:12,815 [INFO ] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:172) - Loading properties file from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/conf/jdbc.conf]
2018-07-19 18:58:12,816 [INFO ] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:172) - Loading properties file from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/conf/mailtemplate.conf]
2018-07-19 18:58:12,816 [INFO ] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:172) - Loading properties file from URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/conf/redis.conf]
2018-07-19 18:58:12,818 [INFO ] com.eos.utils.configutil.SpringPropertyConfiguer.processProperties(SpringPropertyConfiguer.java:35) - 加载外部配置文件夹:/opt/bitstar/config/bsts
2018-07-19 18:58:12,854 [INFO ] org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor.setBeanFactory(AsyncAnnotationBeanPostProcessor.java:143) - No TaskExecutor bean found for async annotation processing.
2018-07-19 18:58:12,994 [INFO ] com.mchange.v2.log.MLog.<clinit>(MLog.java:80) - MLog clients using log4j logging.
2018-07-19 18:58:13,009 [WARN ] org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adDaoImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.eos.utils.dbutil.CommonDao com.eos.service.ad.daoimpl.AdDaoImpl.commonDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.eos.utils.dbutil.CommonDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
2018-07-19 18:58:13,018 [ERROR] org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:351) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adDaoImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.eos.utils.dbutil.CommonDao com.eos.service.ad.daoimpl.AdDaoImpl.commonDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.eos.utils.dbutil.CommonDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    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:444)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at com.eos.manager.web.listener.SpringContextListener.contextInitialized(SpringContextListener.java:22)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4884)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5347)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.eos.utils.dbutil.CommonDao com.eos.service.ad.daoimpl.AdDaoImpl.commonDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.eos.utils.dbutil.CommonDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.eos.utils.dbutil.CommonDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    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.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
    ... 29 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.eos.utils.dbutil.CommonDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 40 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
    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.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
    ... 42 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [jar:file:/data/tomcat8081/webapps/eos-manager/WEB-INF/lib/eos-utils-0.0.1-SNAPSHOT.jar!/configs/bean/ac_database.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    ... 55 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1098)
    ... 63 more
Caused by: java.lang.ExceptionInInitializerError
    at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:54)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:74)
    at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:142)
    at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:138)
    at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:47)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
    ... 65 more
Caused by: java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy15.find(Unknown Source)
    at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:75)
    at com.mchange.v2.c3p0.cfg.C3P0Config.findLibraryMultiPropertiesConfig(C3P0Config.java:157)
    at com.mchange.v2.c3p0.cfg.C3P0Config.<clinit>(C3P0Config.java:143)
    ... 75 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.mchange.v1.lang.Synchronizer$1.invoke(Synchronizer.java:58)
    ... 79 more
Caused by: java.lang.NoSuchMethodError: com.mchange.v2.cfg.BasicMultiPropertiesConfig.<init>([Ljava/lang/String;Ljava/util/List;)V
    at com.mchange.v2.cfg.ConfigUtils.read(ConfigUtils.java:63)
    at com.mchange.v2.cfg.MConfig$CSManager.recreateFromKey(MConfig.java:153)
    at com.mchange.v1.cachedstore.NoCleanupCachedStore.find(NoCleanupCachedStore.java:63)
    ... 84 more
19-Jul-2018 18:58:13.024 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

展开
收起
爱吃鱼的程序员 2020-06-06 16:40:39 886 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>目测版本对不上,如果本地可运行,看是否包冲突了,存在多个版本的jar,这个应该是c3p0的 </p>
    
                    
    
                                回复 <a class="referer" target="_blank">@豫华商</a>  : IDE能看依赖树的,把不对的忽略掉就行了,具体请自行搜索
                        
    
                                回复 <a class="referer" target="_blank">@maradona</a>  : 果然有两个c3p0-0.9.1.2.jar和c3p0-0.9.5.2.jar这个是怎么造成的,要怎么修改呀?
                        
    
                                回复 <a class="referer" target="_blank">@豫华商</a>  : 看打包后的
                        
    
                            都是通过maven依赖进来的,pom文件中只有一个对c3p0的引用。
                        
    
                        <p>冲突的jar包怎么出现的?怎么解决?</p>
    
                    
    
                        <p>mvn dependency:tree 查看依赖树</p>
    

    dependency exclude 去掉 冲突版本包

     

                                回复 <a class="referer" target="_blank">@豫华商</a>  : 这个是要看加载的类是否有你要调用的方法,如果没有则会报 NoClassDefFound。有些对依赖有检查的库可能会在检查阶段就报错,这时候你的程序还没运行。
                        
    
                                回复 <a class="referer" target="_blank">@豫华商</a>  : 类加载这个事情对我是黑盒,他到底是先加载到哪个jar的class感觉完全是随机的,但对同一台机器上来讲,他基本是固定的,这个机制俺暂时不清楚,无法回答你
                        
    
                            在哪里执行呀,怎么使用?我的那个lib里面就是有两个c3p0的包,并且我现在还运行的项目[以前部署的],我刚刚把war包下载下来也看到有两个c3p0,为什么这个就可以正常运行?
                        
    
                        数据库的用户名怎么配置的? 
                    
    
                            jdbc.username=eosdev
    

    jdbc.password=1q2w3e$R ##最大连接数 jdbc.maxPoolSize=40 ##最小连接数 jdbc.minPoolSize=10 jdbc.initialPoolSize=10 jdbc.maxIdleTime=600 jdbc.acquireIncrement=5 jdbc.maxStatements=5

    2020-06-06 16:40:59
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载