开发者社区> 问答> 正文

错误:java.sql.SQLException:无法创建PoolableConnectionFac

java.sql.SQLException:无法在org.apache.commons.dbcp2.BasicDataSource.createDataSource(java.org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294)处创建PoolableConnectionFactory(需要CLIENT_PLUGIN_AUTH) 2039)在org.hibernate.tool上的org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderProviderImpl.java:122)上的org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) .hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:33)位于org.hibernate.tool.hbm2ddl.DatabaseExporter。(DatabaseExporter.java:35)位于org.hibernate.tool.hbm2ddl.SchemaExport.execute(425)在org.hibernate.tool.hbm2ddl中。org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:350)的org.hibernate.internal.SessionFactoryImpl。(SessionFactoryImpl.java:469)的SchemaExport.create(SchemaExport.java:361)。在org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:711)在org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:727)处的boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) .org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:511)位于org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:495)位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethod (AbstractAutowireCapableBeanFactory.java:1687)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)at org.springframework.beans org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:306)上的.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry。 org.springframework.beans.factory.support.AbstractBeanFactory上的getSingleton(DefaultSingletonBeanRegistry.java:230)在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)在org.springframework.beans.factory.support.AbstractBeanFactory上。org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)处的Bean.org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)处的getBean(AbstractBeanFactory.java:197)在org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)在org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)在org.springframework.beans.factory org.springframework.beans.factory.support.Abstract.wireless.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193):AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)在org.springframework.beans.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)在org.springframework.beans org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)上的.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:306)在org.springframework.beans.factory.support.AbstractBeanFactory。 org.springframework.beans.factory.support处的doGetBean(AbstractBeanFactory.java:302).org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java :)处的AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)208)在org.springframework.beans.factors.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)在org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)在org.springframework.beans org.springframework.beans.Factory.not.Bean上的.factory.annotation.AutowiredAnnotationBeanPostProcessor $ AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)位于org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) org.org上的.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)。org.springframework.beans.factory.support上的springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)在org.springframework.beans.factory.support。 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java :302),位于org.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202),位于org.org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)。org.springframework.beans.factory.annotation上的springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)在org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)在org.springframework.beans.factory.annotation。在org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)的org.springframework.beans.beans.factory.annotation(AutowiredPost。 java:366),位于org.springframework的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)。org.springframework.beans.factors.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)的Bean.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)org.springframework.beans.factors.support.AbstractBeanFactory $ 1 org.springframework.beans.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)上的.getObject(AbstractBeanFactory.java:306)在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) )的org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)的org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)的org.springframework。org.springframework.beans.factors.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)的Bean.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcess $ org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor。 366),位于org.springframework.beans.factory的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)。support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)位于org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory) .java:306),位于org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302),位于org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)。 org.org上的springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)在org.org上的springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)处的springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)在org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader。在org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)在org.apache.catalina.core org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)的org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)的.StandardContext.listenerStart(StandardContext.java:4682) org.apache.catalina。org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1374)处的core.ContainerBase $ StartChild.call(ContainerBase.java:1384)在java.util.concurrent.FutureTask.run(未知源)处org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java)上的java.util.concurrent.AbstractExecutorService.submit(未知源)上的org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) :909),位于org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841),位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183),位于org.apache.catalina.core。 org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1374)的ContainerBase $ StartChild.call(ContainerBase.java:1384)在java.util.concurrent.FutureTask中。在org.apache.catalina.core.ContainerBase的java.util.concurrent.AbstractExecutorService.submit(Unknown Source)的org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)处运行(未知源) org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)(位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)处的.startInternal(ContainerBase.java:909)。位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)的apache.catalina.core.StandardService.startInternal(StandardService.java:421)位于org.apache.catalina.core.StandardServer.startInternal(StandardServer。 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)处的org.apache.catalina.startup.Catalina.start(Catalina.java:633)处的sun.reflect。org.apache处java.lang.reflect.Method.invoke(Unknown Source)处sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)处的NativeMethodAccessorImpl.invoke0(Native Method)。 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)上的catalina.startup.Bootstrap.start(Bootstrap.java:344)原因:java.sql.SQLNonTransientConnectionException:com.mysql需要CLIENT_PLUGIN_AUTH。 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)处的com.mysql.cj.jdbc.exceptions.SQLError处的cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:526) com.mysql.cj.jdbc.exceptions.SQLError处的createSQLException(SQLError.java:505)。com.mysql.cj.jdbc.exceptions.SQLError中的SQLError.createSQLException(SQLError.java:479)com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:72)处的com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1606)处的createSQLException(SQLError.java:489) com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:347)上的.mysql.cj.jdbc.ConnectionImpl。(ConnectionImpl.java:633)com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver。 org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)处org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256)处org.apache.commons.dbcp2 org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource。)上的.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304)java:2290)...省略了109个常见框架

展开
收起
几许相思几点泪 2019-12-23 17:32:43 883 0
1 条回答
写回答
取消 提交回答
  • 技术架构师 阿里云开发者社区技术专家博主 CSDN签约专栏技术博主 掘金签约技术博主 云安全联盟专家 众多开源代码库Commiter

    查看下权限配置

    2020-01-04 23:52:58
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Spark SQL最佳实践 立即下载
Spark SQL 2.0/2.1 Experiences 立即下载
GeoMesa on Spark SQL 立即下载