Skip to Content.
Sympa Menu

freetds - Security Error Connecting With FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Jim Urban" <jim.urban AT netsteps.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Security Error Connecting With FreeTDS
  • Date: Tue, 1 May 2001 07:52:09 -0500


Since no one answered this the first time around, I thought I would repost
it...

-----Original Message-----


I have a servlet running on Domino Application Server. It contains a JDBC
call to a MS SQL Server database. I have set up the database server and
confirmed the database logon id and password. However, when I invoke the
servlet I get an exception when I attempt to connect to the database.


Here is my connect code:

Connection conn = null;
ResultSet rs = null;
Statement stmt = null;

try {
Class.forName("com.internetcds.jdbc.tds.Driver").newInstance();
conn = DriverManager.getConnection(DBUrl, DBId, DBPWord); <--
TopFrame.java:98
stmt = conn.createStatement();
...

Here is the stack trace from the exception, any ideas?

java.lang.SecurityException: interface java.sql.Statement
at
lotus.notes.AgentSecurityManager.checkMemberAccess(AgentSecurityManager.java
:403)
at java.lang.Class.checkMemberAccess(Class.java)
at java.lang.Class.getDeclaredMethod(Class.java)
at com.internetcds.jdbc.tds.Constructors.init(Constructors.java:107)
at
com.internetcds.jdbc.tds.Constructors.newConnection(Constructors.java:255)
at com.internetcds.jdbc.tds.Driver.connect(Driver.java:282)
at java.sql.DriverManager.getConnection(DriverManager.java:76)
at java.sql.DriverManager.getConnection(DriverManager.java:119)
at TopFrame.loadDepartments(TopFrame.java:98)
at TopFrame.doGet(TopFrame.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
lotus.domino.servlet.DominoServletInvoker.executeServlet(DominoServletInvoke
r.java:266)
at
lotus.domino.servlet.DominoServletInvoker.service(DominoServletInvoker.java:
212)
at
lotus.domino.servlet.ServletManager.service(ServletManager.java:235)


I have also tried the following approach to connecting to the database and
it fails to:

Connection conn = null;

ResultSet rs = null;
Statement stmt = null;
try {
Driver drv =
(Driver)Class.forName("com.internetcds.jdbc.tds.Driver").newInstance();
Properties p = new Properties();
p.put("user", DBId);
p.put("password", DBPWord);
conn = drv.connect(DBUrl, p);
stmt = conn.createStatement();
...

Thanks,

Jim Urban
Project Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL 60143
Voice: (630) 250-3045 x2164
Fax: (630) 250-3046




---
You are currently subscribed to freetds as: [jim.urban AT netsteps.net]
To unsubscribe, forward this message to
$subst('Email.Unsub')





Archive powered by MHonArc 2.6.24.

Top of Page