java.sql.SQLException: Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true

MuleSoft JIRA | Rodrigo Merino | 1 year ago
  1. 0

    When the jdbc driver jar is placed in MULE_HOME/lib/user the application works fine, but the following error appear when triggering a redeploy: {code} ERROR 2015-05-04 11:13:09,544 [[test].test-sqlserverFlow.stage1.02] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : java.sql.SQLException: Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true (org.mule.module.db.internal.domain.connection.ConnectionCreationException). Message payload is of type: NullPayload Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true (java.sql.SQLException) org.enhydra.jdbc.standard.StandardDataSource:216 (null) 2. java.sql.SQLException: Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true (org.mule.module.db.internal.domain.connection.ConnectionCreationException) org.mule.module.db.internal.domain.connection.SimpleConnectionFactory:30 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/db/internal/domain/connection/ConnectionCreationException.html) 3. java.sql.SQLException: Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true (org.mule.module.db.internal.domain.connection.ConnectionCreationException). Message payload is of type: NullPayload (org.mule.api.MessagingException) org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) -------------------------------------------------------------------------------- Root Exception stack trace: java.sql.SQLException: Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true at org.enhydra.jdbc.standard.StandardDataSource.getConnection(StandardDataSource.java:216) at org.enhydra.jdbc.standard.StandardDataSource.getConnection(StandardDataSource.java:144) at org.mule.module.db.internal.domain.connection.SimpleConnectionFactory.create(SimpleConnectionFactory.java:26) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** {code} It seems that when the driver's jar is placed in a folder managed by the MuleContainerSystemClassLoader, the driver is loaded and registered in the DriverManager (this is performed with the static initialisation of the class, not by mule's code). At the moment of a restart, there is a class DefaultResourceReleaser, that cleans the the drivers registered. Since the class is already loaded and we don't perform a manual registration of the driver, we get a "no driver found" error. Also, since it cleans the drivers from the MuleContainerSystemClassLoader, the drivers from the MuleApplicationClassLoader remains in the memory, holding references to the classloader.

    MuleSoft JIRA | 1 year ago | Rodrigo Merino
    java.sql.SQLException: Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true
  2. 0

    Mule catch exception strategy doesn't trigger on Oracle JDBC IO Error

    Stack Overflow | 3 years ago | Benjamin Bryan
    java.sql.SQLException: Cannot get connection for URL jdbc:oracle:thin:@//oradb:1741/ORACLEDB : IO Error: The Network Adapter could not establish the connection
  3. 0

    Cannot get Mule ESB - Studio Artifacts

    Stack Overflow | 3 years ago | Brad Overstreet
    org.mule.common.MuleArtifactFactoryException: Error initializing
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jetty and Oracle Configuration

    Stack Overflow | 4 years ago | ivan_drago
    java.sql.SQLException: Error trying to load driver: com.mysql.jdbc.Driver : com.mysql.jdbc.Driver
  6. 0

    Io exception: Oracle Error ORA-12650 after upgrading Oracle to 12g

    Stack Overflow | 1 year ago | EGHM
    java.sql.SQLException: Cannot get connection for URL jdbc:oracle:thin:@test.db.my.edu:1521:sid : Io exception: Oracle Error ORA-12650

    1 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

      Cannot get connection for URL jdbc:sqlserver://localhost;integratedSecurity=true : No suitable driver found for jdbc:sqlserver://localhost;integratedSecurity=true

      at org.enhydra.jdbc.standard.StandardDataSource.getConnection()
    2. XAPool
      StandardDataSource.getConnection
      1. org.enhydra.jdbc.standard.StandardDataSource.getConnection(StandardDataSource.java:216)
      2. org.enhydra.jdbc.standard.StandardDataSource.getConnection(StandardDataSource.java:144)
      2 frames
    3. org.mule.module
      SimpleConnectionFactory.create
      1. org.mule.module.db.internal.domain.connection.SimpleConnectionFactory.create(SimpleConnectionFactory.java:26)
      1 frame