错误:java.sql.SQLException:无法创建PoolableConnectionFactory(需要CLIENT_PLUGIN_AUTH)

时间:2019-12-23 09:26:20

标签: java mysql spring hibernate

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

0 个答案:

没有答案