• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Please help setting up with MSSQL DataSource.

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,
I'm trying to setup a MSSQL DataSource in WSAD. I have following settings in server-cfg.xml
URL Prefix : jdbc:microsoft:sqlserver://MFXE2KSQL01V:4141;DatabaseName=RiskAppetite;selectMethod=cursor
Implementation class name : com.microsoft.jdbcx.sqlserver.SQLServerDataSource
And the JAVA code is..
Context ctx = (Context) new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/RiskAppetite");
Connection con = ds.getConnection("RiskAppetiteAppId", "RiskAppetiteAppId");
I'm able to get a DataSource handle from JNDI. While trying to get a connection, I get a following exception
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection(Unknown Source)
at com.ibm.ejs.cm.pool.JTAConnectionFactory.createConnection(JTAConnectionFactory.java:40)
at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:932)
at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:860)

As you can see in my URL Prefix, I specified "selectMethod=cursor" But for some reason, I'm still getting the above error. Please let me know if anyone has a solution on this.
Thanks in advance !!
Regards
Nilesh
 
mooooooo ..... tiny ad ....
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic