Sinisa Popovic

Greenhorn
+ Follow
since Nov 04, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sinisa Popovic

Paul Sturrock wrote:The 2000 version is not a good driver.



mssqlserver.jar is the old, SQL Server 2000 driver.

However I have to use it because the new driver doesn't work with Java 5.
I can't upgrade to Java 6 right now.

Is there a new driver that works with java 5?

Paul Clapham wrote:For example you might be running Tomcat with a Java 5 JDK but the device driver was compiled with a Java 6 JDK.



Hi Paul,

ok, it makes sense.
I have Java 5 installed on this machine and used older version of JDBC driver: mssqlserver.jar
It worked fine with SQL Server 2000.

Now, when I upgraded to SQL Server 2005, I also downloaded a new version of JDBC driver: sqljdbc4.jar
But it seems that this driver was made in Java 6.

I returned to the old version of the JDBC driver mssqlserver.jar and it works.

I still don't understand how is it possible that the older version of JDBC driver works with newer version of SQL Server?

Thank you very much for your help!
Hi,

I'm moving our development environment for a JSP application on a new machine.
The application is using a newer version of SQL Server. Moving from SQL Server 2000 to SQL Server 2005.

When I try to open it in IE, it gives me the following error:
org.apache.jasper.JasperException: Exception in JSP: /includes/DBLayer.jsp:47

44: String password=getControlSetting(env+"DBPassword",r);
45: String selectMethod=getControlSetting(env+"SelectionMethod",r);
46: constring = url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
47: Class.forName(getControlSetting(env+"DBClass",r));
48: conn = java.sql.DriverManager.getConnection(constring,userName,password);
49: conn.setCatalog(databaseName);
50: } catch (Exception e){


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


root cause

javax.servlet.ServletException: Bad version number in .class file
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.index_jsp._jspService(index_jsp.java:985)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


I've spent several hours trying to figure out what's wrong. Do you have any idea?
I have checked Tomcat's classpath and it seems to be alright, pointing to the right version of sql driver.

Thank you.