Hi all,
I'm trying to connect to a sqlserver database with Tomcat 5.0. I've taken over a project which someone else built and I'm having problems.
In my server.xml file I have this:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="com.microsoft.jdbc.sqlserver.SqlServerDriver"
connectionURL="jdbc:microsoft:sqlserver://server-west:1433;databasename=dbcal;SelectMethod=cursor"
connectionName="dbcal" connectionPassword="dbcal"
userTable="users" userNameCol="user_name" userCredCol="password"
userRoleTable="user_roles" roleNameCol="role" />
I have downloaded and installed the sqlserver driver from ms and copied it into the Tomcat 5.0\common\lib folder (and also to the Tomcat 5.0\shared\lib folder just for good measure).
I created an application role in sqlserver with the username and password of "dbcal". I've given access to the tables also.
And I'm getting the error:
2004-10-07 13:09:58 JDBCRealm[Catalina]: Exception opening database connection
java.sql.SQLException: com.microsoft.jdbc.sqlserver.SqlServerDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1075)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Can anyone point me in the right direction?
Thanks.
I'm trying to connect to a sqlserver database with Tomcat 5.0. I've taken over a project which someone else built and I'm having problems.
In my server.xml file I have this:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="com.microsoft.jdbc.sqlserver.SqlServerDriver"
connectionURL="jdbc:microsoft:sqlserver://server-west:1433;databasename=dbcal;SelectMethod=cursor"
connectionName="dbcal" connectionPassword="dbcal"
userTable="users" userNameCol="user_name" userCredCol="password"
userRoleTable="user_roles" roleNameCol="role" />
I have downloaded and installed the sqlserver driver from ms and copied it into the Tomcat 5.0\common\lib folder (and also to the Tomcat 5.0\shared\lib folder just for good measure).
I created an application role in sqlserver with the username and password of "dbcal". I've given access to the tables also.
And I'm getting the error:
2004-10-07 13:09:58 JDBCRealm[Catalina]: Exception opening database connection
java.sql.SQLException: com.microsoft.jdbc.sqlserver.SqlServerDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1075)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Can anyone point me in the right direction?
Thanks.