Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gateway] No suitable driver with any JDBC driver #2116

Closed
brightlizard opened this issue Apr 2, 2019 · 1 comment

Comments

@brightlizard
Copy link

commented Apr 2, 2019

Expected Behavior

Gateway 1.24.0 should work with postgresql management repository

Current Behavior

"No suitable driver" error on gateway startup with any postgresql jdbc driver into "plugins/ext/repository-jdbc" folder.
But everything works fine on previous gateway version - 1.23.1

Possible Solution

Looks like driver not in classpath

Steps to Reproduce (for bugs)

  1. Clone 1.24.0 gateway
  2. Add gravitee-repository-jdbc 1.24.0 to artifacts
  3. Add plugins/ext/repository-jdbc with jdbc driver to build (I tried 9.4.1212, 42.2.5 and some versions between, both jdk7 and jdk 8 variants)
  4. Switch on jdbc management type inside gravitee.yml and provide DB DSN.
  5. Build distrib and run it.

Your Environment

Linux & Windows

@brightlizard

This comment has been minimized.

Copy link
Author

commented Apr 2, 2019

2019-04-02 13:25:53.752 [io.gravitee.gateway.standalone.GatewayContainer.main()] [] ERROR i.g.p.c.i.PluginContextFactoryImpl - Unable to refresh plugin context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcManagementRepositoryConfiguration': Initialization of bean failed; nested exception is java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgre
sql://10.116.229.83:5432/gravitee?user=su_gravitee&password=
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at io.gravitee.plugin.core.internal.PluginContextFactoryImpl.create(PluginContextFactoryImpl.java:59)
at io.gravitee.gateway.repository.plugins.RepositoryPluginHandler.handle(RepositoryPluginHandler.java:97)
at io.gravitee.plugin.core.internal.PluginEventListener.lambda$null$2(PluginEventListener.java:111)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at io.gravitee.plugin.core.internal.PluginEventListener.lambda$deployPlugins$3(PluginEventListener.java:109)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1620)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at io.gravitee.plugin.core.internal.PluginEventListener.deployPlugins(PluginEventListener.java:106)
at io.gravitee.plugin.core.internal.PluginEventListener.deployPlugins(PluginEventListener.java:88)
at io.gravitee.plugin.core.internal.PluginEventListener.onEvent(PluginEventListener.java:63)
at io.gravitee.common.event.impl.EventManagerImpl.publishEvent(EventManagerImpl.java:44)
at io.gravitee.common.event.impl.EventManagerImpl.publishEvent(EventManagerImpl.java:36)
at io.gravitee.plugin.core.internal.PluginRegistryImpl.init(PluginRegistryImpl.java:105)
at io.gravitee.plugin.core.internal.PluginRegistryImpl.doStart(PluginRegistryImpl.java:81)
at io.gravitee.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:32)
at io.gravitee.node.container.AbstractNode.doStart(AbstractNode.java:74)
at io.gravitee.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:32)
at io.gravitee.node.container.AbstractContainer.doStart(AbstractContainer.java:89)
at io.gravitee.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:32)
at io.gravitee.gateway.standalone.GatewayContainer.main(GatewayContainer.java:45)
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.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:294)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgresql://10.116.229.83:5432/gravitee?user=su_gravitee&password=
at com.zaxxer.hikari.util.DriverDataSource.(DriverDataSource.java:112)
at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:336)
at com.zaxxer.hikari.pool.PoolBase.(PoolBase.java:109)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:108)
at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:81)
at io.gravitee.repository.jdbc.common.AbstractJdbcRepositoryConfiguration.graviteeDataSource(AbstractJdbcRepositoryConfiguration.java:103)
at io.gravitee.repository.jdbc.common.AbstractJdbcRepositoryConfiguration.setApplicationContext(AbstractJdbcRepositoryConfiguration.java:78)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:120)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:96)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
... 50 common frames omitted
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
at com.zaxxer.hikari.util.DriverDataSource.(DriverDataSource.java:104)
... 61 common frames omitted

@brightlizard brightlizard changed the title No suitable driver for PostgeSQL JDBC (Gateway 1.24.0) No suitable driver with any PostgeSQL JDBC driver (Gateway 1.24.0) Apr 2, 2019

@aelamrani aelamrani self-assigned this Apr 3, 2019

@aelamrani aelamrani added the type: bug label Apr 3, 2019

@aelamrani aelamrani added this to the APIM - 1.24.1 milestone Apr 3, 2019

@aelamrani aelamrani changed the title No suitable driver with any PostgeSQL JDBC driver (Gateway 1.24.0) [gateway] No suitable driver with any JDBC driver Apr 3, 2019

aelamrani added a commit to gravitee-io/gravitee-plugin that referenced this issue Apr 3, 2019

brasseld added a commit to gravitee-io/gravitee-plugin that referenced this issue Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.