org.springframework.jdbc.UncategorizedSQLException: jOOQ; uncategorized SQLException for SQL [select "u"."id", "u"."name", "u"."password" from "public"."user" as "u"]; SQL state [null]; error code [0]; Cannot load JDBC driver class '${db.driver}'; nested exception is java.sql.SQLException: Cannot load JDBC driver class '${db.driver}'

Stack Overflow | Kailayla | 5 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    Spring&jOOQ: configuring postgreSQL driver throws an error

    Stack Overflow | 5 months ago | Kailayla
    org.springframework.jdbc.UncategorizedSQLException: jOOQ; uncategorized SQLException for SQL [select "u"."id", "u"."name", "u"."password" from "public"."user" as "u"]; SQL state [null]; error code [0]; Cannot load JDBC driver class '${db.driver}'; nested exception is java.sql.SQLException: Cannot load JDBC driver class '${db.driver}'
  2. 0

    Could not get JDBC connection in JUnit

    Stack Overflow | 2 years ago
    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot load JDBC driver class 'com.ibm.db2.jcc.DB2Driver'
  3. 0

    Switching from Spring-DM to Blueprint: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

    Stack Overflow | 11 months ago | Frank Joppe
    org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: dataSource, getter: null, setter: [class oprg.unimportant.SomeClass.setDataSource(interface javax.sql.DataSource)]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  6. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    ${db.driver}

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(Unknown Source)
    2. java.lang.ClassLoader.loadClass(Unknown Source)
    3. sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    4. java.lang.ClassLoader.loadClass(Unknown Source)
    4 frames
  3. Apache Commons DBCP
    BasicDataSource.getConnection
    1. org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:2131)
    2. org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2033)
    3. org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
    3 frames
  4. Spring Framework
    TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke
    1. org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
    2. org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:225)
    2 frames
  5. com.sun.proxy
    $Proxy18.prepareStatement
    1. com.sun.proxy.$Proxy18.prepareStatement(Unknown Source)
    1 frame
  6. jOOQ
    SelectImpl.fetch
    1. org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112)
    2. org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76)
    3. org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:231)
    4. org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:320)
    5. org.jooq.impl.AbstractResultQuery.fetch(AbstractResultQuery.java:312)
    6. org.jooq.impl.SelectImpl.fetch(SelectImpl.java:2705)
    6 frames
  7. nl.nazza.mediator
    QueryTest.testJoin
    1. nl.nazza.mediator.deviceconfigurator.QueryTest.testJoin(QueryTest.java:30)
    1 frame
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  9. JUnit
    InvokeMethod.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    4 frames
  10. Spring TestContext
    SpringRepeat.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
    2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
    3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
    3 frames
  11. JUnit
    ParentRunner.runLeaf
    1. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    1 frame
  12. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
    2 frames
  13. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    5 frames
  14. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    2 frames
  15. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    1 frame
  16. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
    1 frame
  17. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    1 frame
  18. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    5 frames