我试图在本地运行一个连接到PostgreSQL数据库的maven构建的spring应用程序。在远程服务器上部署时(使用我们的服务器构建配置文件)一切都很好。我的本地数据库也是根据提供的说明设置的。我们正在使用tomcat 8.5。尝试在我的本地计算机上部署战争会导致以下错误(这些错误已经来自tomcat):
SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [myartifactname.application.listener.KillBackgroundThreadsListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [hibernate/hibernate.xml]:
Cannot resolve reference to bean 'proxyDataSource' while setting bean property 'dataSource';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'proxyDataSource' defined in class path resource [hibernate/hibernate.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 class path resource [hibernate/hibernate.xml]:
Cannot resolve reference to bean 'mainDataSource' while setting bean property 'targetDataSource';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'mainDataSource' defined in class path resource [hibernate/hibernate.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
本地maven存储库中的 c3p0
版本是0.9.5.2,而在root pom中它是0.9.1.2,这也是我们公司中可用性最高的版本& #39; s repo。将pom中的版本更改为0.9.5.2会导致项目根本无法编译。该项目是多模块的,其中一个模块似乎下载了除root pom中所述的其他版本。 Root pom是唯一定义此工件版本的地方。
我该如何解决这个问题?你能指点我一些maven文档提示吗?