Results 1 to 6 of 6
- 03-11-2012, 11:18 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 4
- Rep Power
- 0
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:
I copied my jar to Wowza lib folder ,but I still have the same errorJava 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
It's not a wowza problem ,it's something related to JAVA and I'm not a Java expert.
Thanks
- 03-12-2012, 11:14 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
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.
- 03-12-2012, 03:21 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 4
- Rep Power
- 0
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:
I'm using sqljdbc4.jar alreadyJava 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.
- 03-12-2012, 04:30 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
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.
- 03-13-2012, 01:23 PM #5
Member
- Join Date
- Mar 2012
- Posts
- 4
- Rep Power
- 0
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
My SQL server instance name like this : PC1//LOCAL2005. I'm using SQL2005 and TCP/IP is enabled.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.".
- 03-13-2012, 01:51 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
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.
Similar Threads
-
No suitable driver found
By chinna in forum New To JavaReplies: 3Last Post: 11-30-2011, 01:17 PM -
java.sql.SQLException: No suitable driver
By Heather in forum JDBCReplies: 6Last Post: 09-01-2010, 11:29 AM -
No suitable driver found exception error
By Crazy Caveman in forum NetworkingReplies: 1Last Post: 09-01-2010, 12:03 AM -
java.sql.SQLException: No suitable driver .... when using Custom ClassLoader
By tomer1960 in forum Advanced JavaReplies: 13Last Post: 03-16-2009, 09:37 PM -
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]System Exception: Connection
By Ram_TPS in forum JDBCReplies: 1Last Post: 10-16-2008, 02:09 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks