Win2k + SP3
Apache Tomcat/4.1.12
J2SE SDK 1.4.0.02
MS JDBC Drivers for SQL Server 2000
I've got the three .JAR files in the C:\ drive... here's the CLASSPATH
line from catalina.bat:
rem Add on extra jar files to CLASSPATH
if "%JSSE_HOME%" == "" goto noJsse
set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar;c:\mssqlserver.jar;c:\msbase.jar;c:\msutil.jar
:noJsse
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;c:\mssqlserver.jar;c:\msbase.jar;c:\msutil.jar
And here's a .jsp file that I try to execute.. this is it, all it does
is try a connection.
<%@page language="java" import="java.sql.*"%>
<%
String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
Class.forName(driver);
Connection con = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://TWOKSERVER:1433;databasename=Northwind;user=sa;password=;");
%>
And here's the error message I get when trying to access it:
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
org.apache.jasper.JasperException:
com.microsoft.jdbc.sqlserver.SQLServerDriver
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..... more jvm trace stuff....
root cause
javax.servlet.ServletException:
com.microsoft.jdbc.sqlserver.SQLServerDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497)
at org.apache.jsp.golden_jsp._jspService(golden_jsp.java:53)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..... more jvm trace stuff....
Did I miss something in the set up, or is my code bad, or what? Any
advice, ideas, examples, etc. would be appreciated.
Thanks,
Kevin.
I can't see anything obviously wrong in your code, and your classpath seems
to be working properly by the looks of the errors being given. Could you pls
include the entire jvm error output? I suspect it may be something to do
with your SQL server permissions seeing as all you're doing is trying to
connect.
"Kevin Spett" <ksp...@spidynamics.com> wrote in message
news:8725aeb0.02102...@posting.google.com...
He said that the CLASSPATH was in his Catalina.bat file which is OK. It
looks like his code it compiling fine and finding the driver at runtime.
Otherwise it would give a "Class not found" error. But without seeing the
entire error output, i could be wrong :)
Any ideas?