File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes sqlserver datasource configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "sqlserver datasource configuration " Watch "sqlserver datasource configuration " New topic

sqlserver datasource configuration

Rajesh Balla

Joined: Feb 21, 2002
Posts: 3
I am having trouble using the microsoft jdbc driver for sqlserver to connect to the datasource.
The configuration is as follows:
JDBC Provider:
Implementation class:
(the jar file mssqlserver.jar contains the SQLServerDataSource.class file)
The DataSource is configured as follows:
JNDI Name: jdbc/DatabaseName
UserID: someuser
Password: somepassword

Custom Properties:
serverName: myserver
portNumber: 1433
databaseName: ICPC

When I try to access the datasource in a jsp file through the lines

javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("jdbc/DatabaseName"); java.sql.Connection conn = ds.getConnection();

ds.getConnection() returns a null even though 'ds' has the correct properties(Data source ds is: WebSphere DataSource:CMProperties for DataSource "jdbc/DatabaseName" Using underlying DataSource class:
Data Source Properties: {serverName=myserver, portNumber=1433, databaseName=DatabaseName}
Connection Pool Properties: user = someuser
minConnectionPoolSize = 1
maxConnectionPoolSize = 10 connTimeout = 180 idleTimeout = 1800
orphanTimeout = 1800
maxStatementCacheSize = 100 autoConnectionCleanupDisabled= false errorMap = null informixLockModeWait = 0)

The error statement is as follows:
Unrecognized database or driver; using generic settings
Could not find the property PortNumber on class

1. Please let me know if I have missed any of the JDBC configuration steps.
2. "I am able to obtain connection to the database when i used the class " using DriverManager.getConnection(..URL..)
3. Which other jdbc drivers for SQL server 2000 with connection pooling are available freely.
4. I got a TCP/IP errror; connection reset by peer when i used the merant sequelink jdbc driver provided with WAS4.0

Guy Barden

Joined: Jan 09, 2003
Posts: 5
I looked at your query hoping to find the solution to mine. I believe your problem is a simple typo. You are specifying the DataSource class as when it should be
[ January 09, 2003: Message edited by: Guy Barden ]
Tony Ngo

Joined: Nov 14, 2003
Posts: 1
Hi Guy,
I am having the toughest time to register MS SQL Server DB with JNDI. Would you please show me the best way of doing this? Thanks
Laura Mike

Joined: Nov 13, 2003
Posts: 17
Me too have the sameproblem anyone there to help me?
I agree. Here's the link:
subject: sqlserver datasource configuration
It's not a secret anymore!