Results 1 to 6 of 6
  1. #1
    mrweb is offline Member
    Join Date
    Mar 2012
    Posts
    4
    Rep Power
    0

    Default Error: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    I have wowza server (built with Java), and need it to save logs to SQL Server 2005 Database, I downloaded this jar file from Microsoft sqljdbc4.jar I put in C:\Program Files\Java\jre6\lib\ext , also added classpath to windows variable, but I got this error:

    java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    this is the wowza configrations for SQL server:

    Java Code:
    log4j.appender.SQ=org.apache.log4j.jdbc.JDBCAppender
    log4j.appender.SQ.Driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    log4j.appender.SQ.URL=jdbc:sqlserver:\\Myserver;databaseName=WowzaLog
    log4j.appender.SQ.user=sa
    log4j.appender.SQ.password=123
    log4j.appender.SQ.layout=com.wowza.wms.logging.ECLFPatternLayout
    log4j.appender.SQ.layout.OutputHeader=false
    log4j.appender.SQ.sql=my insert SQL
    I copied my jar to Wowza lib folder ,but I still have the same error

    It's not a wowza problem ,it's something related to JAVA and I'm not a Java expert.

    Thanks

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Error: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    "I put in C:\Program Files\Java\jre6\lib\ext , also added classpath to windows variable"
    Both of those are wrong.
    The first might cure the problem, but is a hack, and the second is unlikely to work except when running a Java app with no defined classpath of its own, which is a rare thing indeed.

    So, you need to tell Wowza where this jar file is located (and I'd stick it with the other Wowza libraries, as you have done). So it is a Wowza problem, in that you need to figure out how it is set up.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    mrweb is offline Member
    Join Date
    Mar 2012
    Posts
    4
    Rep Power
    0

    Default Re: Error: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    I made a change to my connection code and I got this new error message:

    Java Code:
    Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0. ERROR server comment Wowza Media Server 2 Perpetual 2.2.3 build26454 server core failure: java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
    I'm using sqljdbc4.jar already

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Error: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    Which implies it's not found that jar file, but a different one.
    Or there's two on the classpath and it's simply grabbed the first (incorrect) one.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    mrweb is offline Member
    Join Date
    Mar 2012
    Posts
    4
    Rep Power
    0

    Default Re: Error: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    Well, I fixed that jar error, now I have a new one :D
    ERROR Failed to excute sql
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host PC1//LOCAL2005, port 1433 has failed. Error: "null. Verify the connect
    ion properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to
    the port are not blocked by a firewall.".
    My SQL server instance name like this : PC1//LOCAL2005. I'm using SQL2005 and TCP/IP is enabled.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Error: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

    I seem to remember there being a good article at Microsoft about getting this to work.
    Check the port number. SQL Server can assign random ones at times, if some set up isn't checked.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. No suitable driver found
    By chinna in forum New To Java
    Replies: 3
    Last Post: 11-30-2011, 01:17 PM
  2. Replies: 6
    Last Post: 09-01-2010, 11:29 AM
  3. No suitable driver found exception error
    By Crazy Caveman in forum Networking
    Replies: 1
    Last Post: 09-01-2010, 12:03 AM
  4. Replies: 13
    Last Post: 03-16-2009, 09:37 PM
  5. Replies: 1
    Last Post: 10-16-2008, 02:09 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •