• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

sqlserver datasource configuration

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
com.microsoft.sqlserver.SQLServerDataSource
Classpath:
/opt/msSQLjdbc-new/lib/mssqlserver.jar:/opt/msSQLjdbc-new/lib/msutil.jar:/opt/msSQLjdbc-new/lib/msbase.jar:/opt/WebSphere/AppServer/lib/j2ee.jar
(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: com.microsoft.sqlserver.SQLServerDataSource
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 com.microsoft.sqlserver.SQLServerDataSource; using generic settings
Source: com.ibm.ejs.cm.portability.PortabilityLayerFactory
Could not find the property PortNumber on class com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Source: com.ibm.ejs.cm.portability.PortabilityLayerImpl

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 com.microsoft.jdbc.sqlserver.SQLServerDriver 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


Thanks,
Rajesh
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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 com.microsoft.sqlserver.SQLServerDataSource when it should be com.microsoft.jdbcx.sqlserver.SQLServerDataSource.
Regards
Guy
[ January 09, 2003: Message edited by: Guy Barden ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Me too have the sameproblem anyone there to help me?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic