【打包到服务器的项目无法跑通 _jetty/tomcat 】 | IT修真院·坑乎
咨询电话 : 010-59478634
切换导航
首页
我的提问
我的回答
我的点赞
消息通知
个人主页
×
提示
尚未登陆,前往官网登陆?
×
提示
尚未登陆,前往官网登陆?
打包到服务器的项目无法跑通
我也踩过这个坑(
1
)
已统计您的踩坑,无需重复点击
回答(1)
jetty/tomcat
详细描述
2018-05-08 12:00:43org.springframework.beans.factory.BeanCreationException: Error creati ng bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedE xception: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localh ost' (using password: YES)) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory. initializeBean(AbstractAutowireCapableBeanFactory.java:1628) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory. doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory. createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Abs tractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSin gleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abstr actBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstrac tBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInsta ntiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFact oryInitialization(AbstractApplicationContext.java:867) at org.springframework.context.support.AbstractApplicationContext.refresh(Abstra ctApplicationContext.java:543) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicati onContext(ContextLoader.java:443) at org.springframework.web.context.ContextLoader.initWebApplicationContext(Conte xtLoader.java:325) at org.springframework.web.context.ContextLoaderListener.contextInitialized(Cont extLoaderListener.java:107) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4 792) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5 256) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:75 4) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) 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:114 9) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:62 4) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionF actory (Access denied for user 'root'@'localhost' (using password: YES)) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(Basic DataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java :1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:10 44) 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:498) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory. invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1758) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory. invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1695) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory. initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ... 25 more Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using passw ord: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.ja va:1714) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2190) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2221) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2016) at com.mysql.jdbc.ConnectionImpl.
(ConnectionImpl.java:776) at com.mysql.jdbc.JDBC4Connection.
(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccess orImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruct orAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnec tionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnecti onFactory.java:582) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSo urce.java:1556) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(Basic DataSource.java:1545) ... 34 more
错误截图
编辑于2024-11-23
时间排序
热门排序
[西安|荣耀师兄]JAVA-赵立鼐
0
MySQL数据库用户名或密码输入错误。还有可能是中间有空格,或者url错误等,检查好就没问题。
查看全部>
编辑于2018-12-15
首页
1
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
复制链接
新浪微博
微信扫一扫
982
0
10
打包到服务器的项目无法跑通
1
1