StaySick Posted January 25, 2007 Share Posted January 25, 2007 Hey, im kinda new using iReport and i have a problem with the connection to my sql 2005 DB, I've copied the tools.jar (jdk 6) file to the lib directory and downloaded the driver, the driver is already at lib directory of iReport and in my "jar" classpath and still getting the following message: ClassNotFoundError!Msg: com.microsoft.jdbc.sqlserver.SQLServerDriver This class may have not been found: com.microsoft.jdbc.sqlserver.SQLServerDriverCheck your classpath I dont understand whats happening, hope you can help me, btw im using iReport 1.3.0 and this is my string connjdbc:microsoft:sqlserver://localhost:1433;DatabaseName=DB Link to comment Share on other sites More sharing options...
nomlad Posted January 29, 2007 Share Posted January 29, 2007 in iReport 1.3 go to Options -> Classpath and put the actual jar file full path in there for the jdbc driver. you might also ant to consider using the jtds driver instead, in my experience it works much better when connecting to sql server - net.sourceforge.jtds.jdbc.Driver Link to comment Share on other sites More sharing options...
Jasp3rN00b Posted February 2, 2008 Share Posted February 2, 2008 I'm using iReport 2.0.4 and ran into the same issue despite having added the jar file to the classpath in iReport and the environment variable (Windows XP). After about my third reboot I ran across the following article: [url=http://blogs.msdn.com/jdbcteam/archive/2007/06/15/java-lang-classnotfoundexception-com-microsoft-jdbc-sqlserver-sqlserverdriver.aspx]http://blogs.msdn.com/jdbcteam/archive/2007/06/15/java-lang-classnotfoundexception-com-microsoft-jdbc-sqlserver-sqlserverdriver.aspx ...which explains that the class name has changed between the SQL Server 2000 JDBC driver and the SQL Server 2005 JDBC driver. Additionally, the SQL Server 2005 JDBC driver has a different URL prefix from the SQL Server 2000 JDBC driver. Both the classname and URL prefix were incorrectly defaulted to the old version of SQL Server in iReport 2.0.4. Changing the driver (thankfully the drop down list accepts copy/paste) from "com.microsoft.jdbc.sqlserver.SQLServerDriver" to "com.microsoft.sqlserver.jdbc.SQLServerDriver" and the prefix from "jdbc:microsoft:sqlserver://" to "jdbc:sqlserver://" fixed the problem. Link to comment Share on other sites More sharing options...
psoma.cse Posted February 16, 2008 Share Posted February 16, 2008 Hi, Thanks for your information. I had the same problem and now got them fixed with your help. Thanks,Somu Link to comment Share on other sites More sharing options...
azweeks Posted October 16, 2008 Share Posted October 16, 2008 Thanks for your post as it solved one of my problems. Link to comment Share on other sites More sharing options...
tjpren Posted November 18, 2009 Share Posted November 18, 2009 Thanks for the help, the Tools->Options->Classpath worked for me, also Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now