org.mule.module.launcher.DeploymentStartException: SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password=

MuleSoft JIRA | Matías Pentreath | 4 years ago
  1. 0

    When using Spring beans in a project, Mule is not able to find the classes that are contained in jars in the libs folder at the application level. For example, when creating a Data Source using the followed bean and adding the mysql Driver jar to the lib folder you get he followed exception Bean: {code} <spring:beans> <spring:bean id="jdbcDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" > <spring:property name="driverClassName" value="com.mysql.jdbc.Driver"></spring:property> <spring:property name="url" value="jdbc:mysql://localhost/StudioQA?user=root&amp;password="></spring:property> </spring:bean> </spring:beans> {code} Exception: {code} Exception in thread "main" org.mule.module.launcher.DeploymentStartException: SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:174) at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107) at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47) at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56) at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88) Caused by: org.mule.retry.RetryPolicyExhaustedException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= (java.sql.SQLException) at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:105) at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1616) at org.mule.transport.AbstractConnector.start(AbstractConnector.java:428) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225) at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276) at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155) at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126) at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80) at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120) at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94) at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90) at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72) at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64) at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:252) at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:154) ... 4 more Caused by: org.mule.transport.ConnectException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= (java.sql.SQLException) at org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:251) at org.mule.transport.jdbc.JdbcConnector.doConnect(JdbcConnector.java:371) at org.mule.transport.AbstractConnector$5.doWork(AbstractConnector.java:1556) at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:67) ... 22 more Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= at java.sql.DriverManager.getConnection(DriverManager.java:602) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164) at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149) at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119) at org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:247) ... 25 more {code} Attached is a project to reproduce this issue, you will need to adapt the MySql configuration to a local DataBase.

    MuleSoft JIRA | 4 years ago | Matías Pentreath
    org.mule.module.launcher.DeploymentStartException: SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password=
  2. 0

    When using Spring beans in a project, Mule is not able to find the classes that are contained in jars in the libs folder at the application level. For example, when creating a Data Source using the followed bean and adding the mysql Driver jar to the lib folder you get he followed exception Bean: {code} <spring:beans> <spring:bean id="jdbcDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" > <spring:property name="driverClassName" value="com.mysql.jdbc.Driver"></spring:property> <spring:property name="url" value="jdbc:mysql://localhost/StudioQA?user=root&amp;password="></spring:property> </spring:bean> </spring:beans> {code} Exception: {code} Exception in thread "main" org.mule.module.launcher.DeploymentStartException: SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:174) at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107) at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47) at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56) at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88) Caused by: org.mule.retry.RetryPolicyExhaustedException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= (java.sql.SQLException) at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:105) at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1616) at org.mule.transport.AbstractConnector.start(AbstractConnector.java:428) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225) at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276) at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155) at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126) at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80) at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120) at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94) at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90) at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72) at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64) at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:252) at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:154) ... 4 more Caused by: org.mule.transport.ConnectException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= (java.sql.SQLException) at org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:251) at org.mule.transport.jdbc.JdbcConnector.doConnect(JdbcConnector.java:371) at org.mule.transport.AbstractConnector$5.doWork(AbstractConnector.java:1556) at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:67) ... 22 more Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password= at java.sql.DriverManager.getConnection(DriverManager.java:602) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164) at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149) at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119) at org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:247) ... 25 more {code} Attached is a project to reproduce this issue, you will need to adapt the MySql configuration to a local DataBase.

    MuleSoft JIRA | 4 years ago | Matías Pentreath
    org.mule.module.launcher.DeploymentStartException: SQLException: No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password=
  3. 0

    JDBC URL is null?

    Stack Overflow | 3 years ago | dtrunk
    java.sql.SQLException: The url cannot be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Mule, Spring, MyBatis - Could not get a databaseId from dataSource

    Stack Overflow | 3 years ago | user3651748
    java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@//192.168.200.10:1522/ORCL
  6. 0

    Hibernate 5 Spatial Unable to make DB connection

    Stack Overflow | 1 year ago | Praveen Kumar
    java.lang.IllegalStateException: Failed to load ApplicationContext

  1. jshakil 1 times, last 1 month ago
  2. linxiaolong 7101 times, last 4 weeks ago
  3. ruifung 1 times, last 3 months ago
  4. linxiaolong 838 times, last 3 months ago
  5. Juraji 1 times, last 9 months ago
49 unregistered visitors
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.sql.SQLException

    No suitable driver found for jdbc:mysql://localhost/StudioQA?user=root&password=

    at java.sql.DriverManager.getConnection()
  2. Java RT
    DriverManager.getConnection
    1. java.sql.DriverManager.getConnection(DriverManager.java:602)
    2. java.sql.DriverManager.getConnection(DriverManager.java:154)
    2 frames
  3. Spring Framework
    AbstractDriverBasedDataSource.getConnection
    1. org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173)
    2. org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164)
    3. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
    4. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
    4 frames
  4. org.mule.transport
    JdbcConnector.doConnect
    1. org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:247)
    2. org.mule.transport.jdbc.JdbcConnector.doConnect(JdbcConnector.java:371)
    2 frames
  5. Mule Core
    AbstractConnector.start
    1. org.mule.transport.AbstractConnector$5.doWork(AbstractConnector.java:1556)
    2. org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:67)
    3. org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1616)
    4. org.mule.transport.AbstractConnector.start(AbstractConnector.java:428)
    4 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  7. Mule Core
    DefaultMuleContext.start
    1. org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
    2. org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
    3. org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
    4. org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
    5. org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
    6. org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
    7. org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
    8. org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
    9. org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
    10. org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
    11. org.mule.DefaultMuleContext.start(DefaultMuleContext.java:252)
    11 frames
  8. Mule 3 Launcher
    DefaultMuleDeployer.deploy
    1. org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:154)
    2. org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
    3. org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47)
    3 frames
  9. org.mule.tooling
    ApplicationDeployer.main
    1. org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56)
    2. org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88)
    2 frames