Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[IBM][SQLServer JDBC Driver]This driver is locked for use with embedded applications

 
Shanmugam Muthukumarasamy
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am getting one problem, while starting my application in WSAD environment with the DataDirectConnect SQL Server driver.
I have set the following details in the WebSphere Test Environment 4.0:
Implementation class Name : com.ibm.websphere.jdbcx.sqlserver.SQLServerDataSource
Class Path :
C:\DataConnect\sqlserver.jar;C:\DataConnect\base.jar;C:\DataConnect\util.jar;C:\DataConnect\spy.jar;
I am getting the following exception:
java.sql.SQLException: [IBM][SQLServer JDBC Driver]This driver is locked for use with embedded applications.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.validatedUnlocked(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.createStatement(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.createStatement(Unknown Source)
at com.ibm.websphere.jdbcx.base.BasePooledConnection.createStatement(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseConnectionWrapper.createStatement(Unknown Source)
at com.ibm.ejs.cm.pool.ConnectO.createStatement(ConnectO.java:2057)
at com.ibm.ejs.cm.proxy.ConnectionProxy.createStatement(ConnectionProxy.java:482)
at com.pru.gulgvul.dao.WebDB.getConnection(WebDB.java:54)
Anybody having any idea about this, why I have encountered with this problem.
Thanks in advance,
Shanmugam.
 
acton wang
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a long time ago's question and i just came cross.

Actually if you still can look up your setttings, I believe that you can find two jdbc sets: one is microsoft's and the other is something else for mssql jdbc. Try to get rid of one of them, you would be fine.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's good you noticed the timestamp that you were replying to an old question. Note that after a year, people don't need the answer and are unlikely to check back for replies.
 
Bonaponta Pirepare
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can ulock following coding.

import java.sql.Connection;
import com.ibm.websphere.jdbc.base.BaseConnection;

java.sql.Connection con = java.sql.DriverManager.getConnection(url,userName,password);
BaseConnection bcon = (BaseConnection) con;
BaseConnection bcon.unlock("WebSphereDataDirectOemId");

 
Rajesh MadhanGopal
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Am facing the same issue and have been trying to unlock using the code mentioned above.

Could soemone let me know whats the STring i need to pass in the unlock method as i use Was embedded Connect JDBc and not Data Direct.

bcon = (BaseConnection) con;
bcon.unlock("WebSphereDataDirectOemId");

Guess, this is to unlock if you use Data Direct driver. What should i pass to unlock my ConenctJDBC driver.

bcon.unlock("What would go here?");

P.S: I can see this is a very old thread, but would be great if some one can help me oout on this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic