Can't Access SqlServer 2005 Using JDBC

Sep 11, 2006

Hi;

I can access SqlServer 2000 fine, but not SqlServer 2005. My client is on Windows XP and SqlServer 2005 (dev version) is on Windows 2003. When I run I get:
Error: net.windward.datasource.DataSourceException: JdbcDataSource could not ope
n jdbc:sqlserver://T1-Databases;databaseName=AdventureWorks;integratedSecurity=t
rue;
net.windward.datasource.DataSourceException: net.windward.datasource.DataSourceE
xception: JdbcDataSource could not open jdbc:sqlserver://T1-Databases;databaseNa
me=AdventureWorks;integratedSecurity=true;
at net.windward.datasource.jdbc.JdbcDataSource.<init>(JdbcDataSource.jav
a:1030)
at net.windward.xmlreport.RunReport.main(RunReport.java:165)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid integratedSe
curity property value:true
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(U
nknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Sour
ce)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at net.windward.datasource.jdbc.JdbcDataSource.<init>(JdbcDataSource.jav
a:1024)
... 1 more
Exception in thread "main" net.windward.datasource.DataSourceException: net.wind
ward.datasource.DataSourceException: JdbcDataSource could not open jdbc:sqlserve
r://T1-Databases;databaseName=AdventureWorks;integratedSecurity=true;
at net.windward.datasource.jdbc.JdbcDataSource.<init>(JdbcDataSource.jav
a:1030)
at net.windward.xmlreport.RunReport.main(RunReport.java:165)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid integratedSe
curity property value:true
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(U
nknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Sour
ce)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at net.windward.datasource.jdbc.JdbcDataSource.<init>(JdbcDataSource.jav
a:1024)
... 1 more
Any ideas?
thanks - dave

View 6 Replies


ADVERTISEMENT

Cannot Load JDBC Driver Class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'

Apr 14, 2008

I have read similar posts to this, but I am still having problems.

I am trying to use connection pooling to connect to a local SQL Server 2005 database. I am running my application using
MyEclipse Enterprise Workbench. I have verified that sqljdbc.jar resides in "WebRoot/WEB-INF/lib/"

"WebRoot/WEB-INF/web.xml":
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsichemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>


"WebRoot/META-INFcontext.xml":

<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="jdbc/DefaultDS"
auth="Container"
type="javax.sql.DataSource"
username="tec"
password="tec"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDrive"
url="jdbcqlserver://localhost:1433/tec;databaseName=tec;user=tec;password=test;"
validationQuery="select 1"
maxActive="10"
maxIdle="2"/>
</Context>

Classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/dom.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxen-full.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxp-api.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/sqljdbc.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jstl.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mail.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/sax.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/saxpath.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/standard.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/xalan.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/xercesImpl.jar"/>
<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
</classpath>

Code to connect:

import java.io.Serializable;
import java.sql.*;

import javax.sql.*;
import javax.naming.*;
public int testConnect(){
Connection conn = null;
InitialContext ctx = null;
java.sql.Statement stmt = null;

try {
ctx = new InitialContext();
Context envCtx = (Context) ctx.lookup("java:comp/env");
DataSource ds = (DataSource) envCtx.lookup("jdbc/DefaultDS");/*This is generating the Cannot load JDBC driver class... error*/
conn = ds.getConnection();
stmt = conn.createStatement();
return CONSTANT.SUCCESS;

} catch (Exception e) {
return CONSTANT.FAILURE;
}finally {
try {
if (stmt != null)
stmt.close();
if (conn != null)
conn.close();
if (ctx != null)
ctx.close();
} catch (Exception ex) {
// do nothing
return CONSTANT.FAILURE;
}
}
}

Any ideas would be greatly appreciated.

View 17 Replies View Related

Problem With Two Consecutive Calls To CallableStatement (jdbc Driver 1.1, SQLServer 2005)

Nov 28, 2006

Hi,

I'm getting an error when I make two calls to a stored procedure (which I didn't use to).

This is an example:

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {

public Main() {
Connection sproc_con;
try {

sproc_con = getConnection();
CallableStatement sproc_stmt = sproc_con.prepareCall("{call getID(?)}");

for (int i = 0; i < 2; i++) {
int id = getID("Test", sproc_stmt);
System.out.println(id);
}

sproc_stmt.close();
sproc_con.close();


} catch (ClassNotFoundException ex) {
ex.printStackTrace();
} catch (SQLException ex) {
ex.printStackTrace();
}

}

private int getID(String tableName, CallableStatement sproc_stmt) {

ResultSet rs = null;
int ID = 0;

try {

sproc_stmt.setString(1, tableName);
rs = sproc_stmt.executeQuery();
if (rs.next())
ID = rs.getInt(1);

} catch (SQLException sqle) {
sqle.printStackTrace();
System.exit(1);
} finally {
try {
if (rs != null)
rs.close();
} catch (SQLException sqle) {
sqle.printStackTrace();
}

return ID;
}
}

private Connection getConnection() throws ClassNotFoundException, SQLException {

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
return DriverManager.getConnection("jdbc:sqlserver://myserver:1433;DatabaseName=TestDB", "sa", "");

}

public static void main(String[] args) {
new Main();
}

}


The first call is ok, but the second throws an exception at sproc_stmt.executeQuery(); which says:

com.microsoft.sqlserver.jdbc.SQLServerException: Server failed to resume the transaction, desc: 3600000001.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepExecResponse(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
at javaapplication2.Main.getID(Main.java:53)
at javaapplication2.Main.<init>(Main.java:33)
at javaapplication2.Main.main(Main.java:85)


Am I doing something wrong or is this a bug?

I'm running on Win2003 with SQL Server 2005 Developer edition.



Thanks

/Niclas

View 1 Replies View Related

JDBC Sample Code Using Named Pipe And SQLServer 2005 Driver?

Nov 22, 2006

Hi,

Does anybody have a working Java code sample that connects to an SQLServer 2005 database on a remote host, via the default named pipe, from a client using the SQLServer 2005 JDBC driver? Could you post it, or a pointer to it?

I've gotten java.sql DriverManager.getConnection() to work fine with TCP/IP connections before. But I'm a newbie with named pipes, and unclear on how the connection string/properties are different. I've tried to piece it together from multiple docs and threads, but haven't found sample code that quite fits my situation. I think a simple working example would best clarify the syntax.

The server is not using SQL Express. Most SQLServer configuration options are defaults; the named pipes protocol is enabled.

Thanks

View 3 Replies View Related

SQLServer 2005 JDBC Driver - Date Rendered Correctly On Local Environment(windows), But Not On Websphere Server (unix)

Dec 6, 2006

Hi,

We are trying to move our application from SQL2005 to SQL2005, we are using 2005 jdbc driver 1.1.

The problem we have is, when a date is retrieved from the database, only the year part got correctly, but the date is automatically set to January 1 of that year. The interesting thing is this problem doesn't occur on local development environment (developer's windows platform), it only happens when we deploy the application to production server (unix).

Does anyone know what is going on, how to fix it?

Thanks.

Cathie

View 12 Replies View Related

Using 2005 JDBC Driver To Access SQL Server 2000

Oct 5, 2006

Hi,

I'm using JDBC driver for Server 2005 (version 1.1.1501) to access Server 2000. I have no problems reading my data, but every update returns "Cursor is READ ONLY".

If I use driver for Server 2000 I have no problems. And I have no problems running the same program with 2005 driver against SQL Server Express.

Where should I start debugging?

Thank you,

View 1 Replies View Related

Remote Access To SQLServer 2005

Oct 16, 2007



Hi,

I installed SQLServer with a instance using the following cmd:

/qn INSTANCENAME=MYINSTANCE ADDLOCAL=All SQLCOLLATION=Latin1_General_CI_AI=Latin1_General_CI_AI PIDKEY=ABCDE12345FGHIJ67890KLMNO SECURITYMODE=SQL SAPWD=Pass SQLAUTOSTART=1 ENABLENETWORKPROTOCOLS=0

When I try to connect to the server using VS2005 (VB) using the code:

Dim instance As System.Data.Sql.SqlDataSourceEnumerator = System.Data.Sql.SqlDataSourceEnumerator.Instance
Dim table As System.Data.DataTable = instance.GetDataSources()

For Each DRrow As DataRow In table.Rows 'DRrows
C1List1.AddItem(DRrow(0).ToString & ";" & DRrow(1).ToString & ";" & DRrow(3).ToString)
Next

I can see the Server Name, but not the Instance Name.

I've already checked the SQL Configurantion Manager, and I've allowed this instance to accept remote connections (created by the cmd install command).

NOTE: I'm testing the connection on a Domain, but only using the SA account (SQLmode).

Can somebody help me?
Thanks.

PS: I also created an Firewall exception in Windows on the port 1433.

View 8 Replies View Related

Access Denied - SQLSERVER 2005 Integration Services

Nov 15, 2006

Hi:



I am getting access denied error "cannot connect to server" while trying to connect Integration Services. I am trying to connect from my laptop to the SQLSERVER database server.



I followed the document "Connecting to a Remove Intergration Services Server" , doc id: aa337083.

But I can connect to IS if I log remotely to the server.



Any thoughts on this ?



Thanks

-Rajesh



I am getting following errors.





===================================

Cannot connect to cvsslmdd1-vm.

===================================

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

===================================

Connect to SSIS Service on machine "cvsslmdd1-vm" failed:
Access is denied.
.


------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Runtime.Application.GetServerInfo(String server, String& serverVersion)
at Microsoft.SqlServer.Dts.SmoEnum.DTSEnum.GetData(EnumResult erParent)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)

===================================

Connect to SSIS Service on machine "cvsslmdd1-vm" failed:
Access is denied.
.


------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.GetServerInfo(String bstrMachineName, String& serverVersion)
at Microsoft.SqlServer.Dts.Runtime.Application.GetServerInfo(String server, String& serverVersion)










View 7 Replies View Related

Com.microsoft.sqlserver.jdbc.SQLServerConnection Exception

Mar 20, 2008

Hello All,
kindly help me resolving following error.
Earlier it was working fine with SQL server 2000, we want to migrate to sql server 2005.
I am using websphere 6.0 with following jdbc_registry.properties contents.
The driver file is copied under E:Program FilesIBMWebSphereAppServerlibext
*****************************************************************************
driver.class=com.microsoft.sqlserver.jdbc.SQLServerDriver
connection.url=jdbc: sqlserver://MyDBServer:1433;DatabaseName=abc;user=a; password=a
user=a
password=a
******************************************************************************

I am using sqljdbc_1.2.2828.100_enu drivers to connect to sql server 2005. following is the exception trace from my IDE.



************ Start Display Current Environment ************
WebSphere Platform 6.0 [BASE 6.0.2.13 cf130631.22] running with process name onschedule5Node01Cellonschedule5Node01server1 and process id 244
Host Operating System is Windows 2003, version 5.2
Java version = J2RE 1.4.2 IBM Windows 32 build cn142-20050609 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = E:Program FilesIBMWebSphereAppServer
user.install.root = E:Program FilesIBMWebSphereAppServer/profiles/default
Java Home = E:Program FilesIBMWebSphereAppServerjavajre
ws.ext.dirs = E:Program FilesIBMWebSphereAppServer/java/lib;E:Program FilesIBMWebSphereAppServer/profiles/default/classes;E:Program FilesIBMWebSphereAppServer/classes;E:Program FilesIBMWebSphereAppServer/lib;E:Program FilesIBMWebSphereAppServer/installedChannels;E:Program FilesIBMWebSphereAppServer/lib/ext;E:Program FilesIBMWebSphereAppServer/web/help;E:Program FilesIBMWebSphereAppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = E:Program FilesIBMWebSphereAppServer/profiles/default/properties;E:Program FilesIBMWebSphereAppServer/properties;E:Program FilesIBMWebSphereAppServer/lib/bootstrap.jar;E:Program FilesIBMWebSphereAppServer/lib/j2ee.jar;E:Program FilesIBMWebSphereAppServer/lib/lmproxy.jar;E:Program FilesIBMWebSphereAppServer/lib/urlprotocols.jar
Java Library path = E:Program FilesIBMWebSphereAppServerjavain;.;C:WINDOWSsystem32;C:WINDOWS;E:Program FilesIBMWebSphereAppServerin;E:Program FilesIBMWebSphereAppServerjavain;E:Program FilesIBMWebSphereAppServerjavajrein;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;E:Program FilesIBMWebSphereAppServerjavain
************* End Display Current Environment *************
[3/20/08 7:15:44:188 EST] 0000000a ManagerAdmin I TRAS0028I: The trace output is stored in the circular memory buffer, holding 8192 message objects.
[3/20/08 7:15:44:531 EST] 0000000a ManagerAdmin I TRAS0017I: The startup trace state is *=info.
[3/20/08 7:15:44:531 EST] 0000000a ManagerAdmin A TRAS0007I: Logging to the service log is disabled
[3/20/08 7:15:44:719 EST] 0000000a AdminInitiali A ADMN0015I: The administration service is initialized.
[3/20/08 7:15:49:109 EST] 0000000a SystemOut O PLGC0057I: Plug-in configuration service is started successfully.
[3/20/08 7:15:49:188 EST] 0000000a PMIImpl A PMON1001I: PMI is enabled
[3/20/08 7:15:49:750 EST] 0000000a SibMessage I [:] CWSIU0000I: Release: WAS602.SIB Level: o0625.16
[3/20/08 7:15:49:766 EST] 0000000a SecurityDM I SECJ0231I: The Security component's FFDC Diagnostic Module com.ibm.ws.security.core.SecurityDM registered successfully: true.
[3/20/08 7:15:49:875 EST] 0000000a AuditServiceI A SECJ6004I: Security Auditing is disabled.
[3/20/08 7:15:49:938 EST] 0000000a distSecurityC I SECJ0309I: Java 2 Security is disabled.
[3/20/08 7:15:50:000 EST] 0000000a Configuration A SECJ0215I: Successfully set JAAS login provider configuration class to com.ibm.ws.security.auth.login.Configuration.
[3/20/08 7:15:50:016 EST] 0000000a distSecurityC I SECJ0212I: WCCM JAAS configuration information successfully pushed to login provider class.
[3/20/08 7:15:50:031 EST] 0000000a distSecurityC I SECJ0240I: Security service initialization completed successfully
[3/20/08 7:15:50:297 EST] 0000000a ObjectPoolSer I OBPL0007I: Object Pool Manager service is disabled.
[3/20/08 7:15:50:328 EST] 0000000a J2EEServiceMa I ASYN0059I: Work Manager service initialized successfully.
[3/20/08 7:15:50:391 EST] 0000000a CScopeCompone I CSCP0002I: Compensation service is disabled.
[3/20/08 7:15:50:531 EST] 0000000a SibMessage I [:] CWSID0006I: The SIB service was not enabled and will not be started.
[3/20/08 7:15:50:531 EST] 0000000a ActivitySessi I WACS0045I: ActivitySession service is disabled.
[3/20/08 7:15:50:562 EST] 0000000a SOAPContainer I WSWS1062I: SOAP Container Service has been initialized.
[3/20/08 7:15:50:641 EST] 0000000a SchedulerServ I SCHD0036I: The Scheduler Service is initializing.
[3/20/08 7:15:50:688 EST] 0000000a SchedulerServ I SCHD0037I: The Scheduler Service has been initialized.
[3/20/08 7:15:50:875 EST] 0000000a StartUpServic I STUP0008I: The Startup Beans service is disabled.
[3/20/08 7:15:50:891 EST] 0000000a I18nService I I18N0010I: The Internationalization service is created on server1.
[3/20/08 7:15:50:891 EST] 0000000a I18nServiceSe I I18N0010I: The Internationalization service is disabled on server1.
[3/20/08 7:15:51:406 EST] 0000000a SASRas A JSAS0001I: Security configuration initialized.
[3/20/08 7:15:51:859 EST] 0000000a SASRas A JSAS0002I: Authentication protocol: CSIV2/IBM
[3/20/08 7:15:51:859 EST] 0000000a SASRas A JSAS0003I: Authentication mechanism: SWAM
[3/20/08 7:15:51:875 EST] 0000000a SASRas A JSAS0004I: Principal name: OnProjectRealm/wsadmin
[3/20/08 7:15:51:891 EST] 0000000a SASRas A JSAS0005I: SecurityCurrent registered.
[3/20/08 7:15:52:047 EST] 0000000a SASRas A JSAS0006I: Security connection interceptor initialized.
[3/20/08 7:15:52:078 EST] 0000000a SASRas A JSAS0007I: Client request interceptor registered.
[3/20/08 7:15:52:156 EST] 0000000a SASRas A JSAS0008I: Server request interceptor registered.
[3/20/08 7:15:52:172 EST] 0000000a SASRas A JSAS0009I: IOR interceptor registered.
[3/20/08 7:15:53:031 EST] 0000000a CoordinatorIm I HMGR0206I: The Coordinator is an Active Coordinator for core group DefaultCoreGroup.
[3/20/08 7:15:53:062 EST] 0000000a DCSPluginSing I HMGR0005I: The Single Server DCS Core Stack transport has been started for core group DefaultCoreGroup.
[3/20/08 7:15:53:344 EST] 0000000a NameServerImp A NMSV0018I: Name server available on bootstrap port 2809.
[3/20/08 7:15:54:078 EST] 0000000a TreeBuilder W ODCF0002E: Exception: E:Program FilesIBMWebSphereAppServerprofilesdefaultconfigcellsonschedule5Node01Cellodeswebserver1_nodevariables.xml (The system cannot find the file specified).
[3/20/08 7:15:54:203 EST] 0000000a UserRegistryI A SECJ0136I: Custom Registry:com.onproject.security.registry.JdbcRegistry has been initialized
[3/20/08 7:15:54:344 EST] 0000000a distContextMa E SECJ0270E: Failed to get actual credentials. The exception is java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java:475)
at java.net.URLClassLoader.access$500(URLClassLoader.java:109)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:848)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:389)
at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.onproject.security.registry.JdbcRegistry.getConnection(JdbcRegistry.java:188)
at com.onproject.security.registry.JdbcRegistry.checkPassword(JdbcRegistry.java:225)
at com.ibm.ws.security.registry.UserRegistryImpl.checkPassword(UserRegistryImpl.java:296)
at com.ibm.ws.security.server.lm.swamLoginModule.login(swamLoginModule.java:429)
at com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.login(WSLoginModuleProxy.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:699)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:151)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:634)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:351)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:631)
at javax.security.auth.login.LoginContext.login(LoginContext.java:557)
at com.ibm.ws.security.auth.JaasLoginHelper.jaas_login(JaasLoginHelper.java:376)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:1050)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:890)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:881)
at com.ibm.ws.security.auth.distContextManagerImpl.getServerSubjectInternal(distContextManagerImpl.java:2167)
at com.ibm.ws.security.core.distSecurityComponentImpl.initializeServerSubject(distSecurityComponentImpl.java:1928)
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:341)
at com.ibm.ws.security.core.distSecurityComponentImpl.startSecurity(distSecurityComponentImpl.java:298)
at com.ibm.ws.security.core.SecurityComponentImpl.startSecurity(SecurityComponentImpl.java:101)
at com.ibm.ws.security.core.ServerSecurityComponentImpl.start(ServerSecurityComponentImpl.java:279)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:149)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:408)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:187)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:133)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:387)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:219)
at java.lang.Thread.run(Thread.java:568)
.
[3/20/08 7:15:54:359 EST] 0000000a distSecurityC E SECJ0208E: An unexpected exception occurred when attempting to authenticate the server's id during security initialization. The exception is java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java:475)
at java.net.URLClassLoader.access$500(URLClassLoader.java:109)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:848)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:389)
at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.onproject.security.registry.JdbcRegistry.getConnection(JdbcRegistry.java:188)
at com.onproject.security.registry.JdbcRegistry.checkPassword(JdbcRegistry.java:225)
at com.ibm.ws.security.registry.UserRegistryImpl.checkPassword(UserRegistryImpl.java:296)
at com.ibm.ws.security.server.lm.swamLoginModule.login(swamLoginModule.java:429)
at com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.login(WSLoginModuleProxy.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:699)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:151)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:634)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:351)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:631)
at javax.security.auth.login.LoginContext.login(LoginContext.java:557)
at com.ibm.ws.security.auth.JaasLoginHelper.jaas_login(JaasLoginHelper.java:376)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:1050)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:890)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:881)
at com.ibm.ws.security.auth.distContextManagerImpl.getServerSubjectInternal(distContextManagerImpl.java:2167)
at com.ibm.ws.security.core.distSecurityComponentImpl.initializeServerSubject(distSecurityComponentImpl.java:1928)
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:341)
at com.ibm.ws.security.core.distSecurityComponentImpl.startSecurity(distSecurityComponentImpl.java:298)
at com.ibm.ws.security.core.SecurityComponentImpl.startSecurity(SecurityComponentImpl.java:101)
at com.ibm.ws.security.core.ServerSecurityComponentImpl.start(ServerSecurityComponentImpl.java:279)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:149)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:408)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:187)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:133)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:387)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:219)
at java.lang.Thread.run(Thread.java:568)
.
[3/20/08 7:15:54:391 EST] 0000000a distSecurityC E SECJ0007E: Error during security initialization. The exception is java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java:475)
at java.net.URLClassLoader.access$500(URLClassLoader.java:109)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:848)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:389)
at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.onproject.security.registry.JdbcRegistry.getConnection(JdbcRegistry.java:188)
at com.onproject.security.registry.JdbcRegistry.checkPassword(JdbcRegistry.java:225)
at com.ibm.ws.security.registry.UserRegistryImpl.checkPassword(UserRegistryImpl.java:296)
at com.ibm.ws.security.server.lm.swamLoginModule.login(swamLoginModule.java:429)
at com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.login(WSLoginModuleProxy.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:699)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:151)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:634)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:351)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:631)
at javax.security.auth.login.LoginContext.login(LoginContext.java:557)
at com.ibm.ws.security.auth.JaasLoginHelper.jaas_login(JaasLoginHelper.java:376)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:1050)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:890)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:881)
at com.ibm.ws.security.auth.distContextManagerImpl.getServerSubjectInternal(distContextManagerImpl.java:2167)
at com.ibm.ws.security.core.distSecurityComponentImpl.initializeServerSubject(distSecurityComponentImpl.java:1928)
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:341)
at com.ibm.ws.security.core.distSecurityComponentImpl.startSecurity(distSecurityComponentImpl.java:298)
at com.ibm.ws.security.core.SecurityComponentImpl.startSecurity(SecurityComponentImpl.java:101)
at com.ibm.ws.security.core.ServerSecurityComponentImpl.start(ServerSecurityComponentImpl.java:279)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:149)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:408)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:187)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:133)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:387)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:219)
at java.lang.Thread.run(Thread.java:568)
.
[3/20/08 7:15:59:406 EST] 0000000a SchedulerServ I SCHD0040I: The Scheduler Service is stopping.
[3/20/08 7:15:59:422 EST] 0000000a SchedulerServ I SCHD0002I: The Scheduler Service has stopped.
[3/20/08 7:15:59:438 EST] 0000000a AppProfileCom I ACIN0009I: The application profiling service is stopping.
[3/20/08 7:15:59:438 EST] 0000000a ActivitySessi I WACS0049I: The ActivitySession service is stopping.
[3/20/08 7:15:59:547 EST] 0000000a WsServerImpl E WSVR0009E: Error occurred during startup
META-INF/ws-server-components.xml
[3/20/08 7:15:59:562 EST] 0000000a WsServerImpl E WSVR0009E: Error occurred during startup
com.ibm.ws.exception.RuntimeError: com.ibm.ws.exception.RuntimeError: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:194)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:133)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:387)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:219)
at java.lang.Thread.run(Thread.java:568)
Caused by: com.ibm.ws.exception.RuntimeError: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at com.ibm.ws.security.core.ServerSecurityComponentImpl.start(ServerSecurityComponentImpl.java:322)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:149)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:820)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:649)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:408)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:187)
... 10 more
Caused by: com.ibm.websphere.security.WSSecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at com.ibm.ws.security.auth.distContextManagerImpl.getServerSubjectInternal(distContextManagerImpl.java:2187)
at com.ibm.ws.security.core.distSecurityComponentImpl.initializeServerSubject(distSecurityComponentImpl.java:1928)
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:341)
at com.ibm.ws.security.core.distSecurityComponentImpl.startSecurity(distSecurityComponentImpl.java:298)
at com.ibm.ws.security.core.SecurityComponentImpl.startSecurity(SecurityComponentImpl.java:101)
at com.ibm.ws.security.core.ServerSecurityComponentImpl.start(ServerSecurityComponentImpl.java:279)
... 17 more
Caused by: com.ibm.websphere.security.auth.WSLoginFailedException: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at com.ibm.ws.security.server.lm.swamLoginModule.login(swamLoginModule.java:435)
at com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.login(WSLoginModuleProxy.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:699)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:151)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:634)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:351)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:631)
at javax.security.auth.login.LoginContext.login(LoginContext.java:557)
at com.ibm.ws.security.auth.JaasLoginHelper.jaas_login(JaasLoginHelper.java:376)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:1050)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:890)
at com.ibm.ws.security.auth.distContextManagerImpl.login(distContextManagerImpl.java:881)
at com.ibm.ws.security.auth.distContextManagerImpl.getServerSubjectInternal(distContextManagerImpl.java:2167)
... 22 more
Caused by: java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerConnection"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java:475)
at java.net.URLClassLoader.access$500(URLClassLoader.java:109)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:848)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:389)
at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.onproject.security.registry.JdbcRegistry.getConnection(JdbcRegistry.java:188)
at com.onproject.security.registry.JdbcRegistry.checkPassword(JdbcRegistry.java:225)
at com.ibm.ws.security.registry.UserRegistryImpl.checkPassword(UserRegistryImpl.java:296)
at com.ibm.ws.security.server.lm.swamLoginModule.login(swamLoginModule.java:429)
... 40 more


thanks in advance
Nirav

View 3 Replies View Related

Com.microsoft.sqlserver.jdbc.SQLServerConnection LoginWithFailover

Feb 19, 2007

Hi all

I have written a shell script that connects to a SQL Server 2005 database from Linux in order to monitor various areas of SQL.

One of the databases that are being monitored is mirrored, which is no problem in itself as I use the failoverPartner property in my connection string before I pass the TSQL. Unfortunately when the principal/mirror status changes, I get a constant stream of Failure Audit (Login failure) messages in the Mirror server Windows event log even though the failoverPartner property works and redirects to the partner, returning the correct information.

Here is a trace of the connection:

------

22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property : serverName Value:SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:databaseNameValue:TESTDATABASE
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:failoverPartnerValue:SERVER2
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:integratedSecurityValue:false
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:loginTimeoutValue:3
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connect
FINE: Calling securityManager.checkConnect(SERVER1,1433)
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connect
FINE: securityManager.checkConnect succeeded.
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: Start time: 1172160120083 Time out time: 1172160123083 Timeout Unit Interval: 240
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt server name: SERVER1 port: 1433
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt endtime: 1172160120323
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt No: 0
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connectHelper
FINE: Connecting with server: SERVER1 port: 1433 Timeout slice: 232 Timeout Full: 3
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerException logException
FINE: *** SQLException:[Thread[main,5,main], IO:5571e, Dbc:a8327] com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "TESTDATABASE" requested by the login. The login failed. Msg 4060, Level 11, State 1, Cannot open database "TESTDATABASE" requested by the login. The login failed.
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt server name: SERVER2 port: 1433
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt endtime: 1172160120369
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt No: 1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connectHelper
FINE: Connecting with server: SERVER2 port: 1433 Timeout slice: 237 Timeout Full: 3
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: adding new failover info server: SERVER1 instance: null database: TESTDATABASE server provided failover: SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.FailoverInfo failoverAdd
FINE: Failover detected. failover partner=SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.FailoverMapSingleton putFailoverInfo
FINE: Failover map add server: SERVER1; database:TESTDATABASE; Mirror:SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connect
FINE: End of connect
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerStatement <init>
FINE: Statement properties ID:0 Connection:1 Result type:1003 (2003) Concurrency:1007 Fetchsize:128 bIsClosed:false tdsVersion:com.microsoft.sqlserver.jdbc.TDSVersion@15fea60 bCp1252:false useLastUpdateCount:true isServerSideCursor:false
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerStatement doExecuteStatement
FINE: Executing (not server cursor)
USE TESTDATABASE
SELECT "TESTCOLUMN" FROM TEST_TABLE ORDER BY DateTime
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection close
FINE: Closing connection ID:1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property : serverName Value:SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:databaseNameValue:TESTDATABASE
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:failoverPartnerValue:SERVER2
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:integratedSecurityValue:false
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:loginTimeoutValue:3
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connect
FINE: Calling securityManager.checkConnect(SERVER1,1433)
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connect
FINE: securityManager.checkConnect succeeded.
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: Start time: 1172160120736 Time out time: 1172160123736 Timeout Unit Interval: 240
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt server name: SERVER1 port: 1433
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt endtime: 1172160120976
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt No: 0
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connectHelper
FINE: Connecting with server: SERVER1 port: 1433 Timeout slice: 233 Timeout Full: 3
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerException logException
FINE: *** SQLException:[Thread[main,5,main], IO:5571e, Dbc:a8327] com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "TESTDATABASE" requested by the login. The login failed. Msg 4060, Level 11, State 1, Cannot open database "TESTDATABASE" requested by the login. The login failed.
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt server name: SERVER2 port: 1433
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt endtime: 1172160121031
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: This attempt No: 1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connectHelper
FINE: Connecting with server: SERVER2 port: 1433 Timeout slice: 236 Timeout Full: 3
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection loginWithFailover
FINE: adding new failover info server: SERVER1 instance: null database: TESTDATABASE server provided failover: SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.FailoverInfo failoverAdd
FINE: Failover detected. failover partner=SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.FailoverMapSingleton putFailoverInfo
FINE: Failover map add server: SERVER1; database:TESTDATABASE; Mirror:SERVER1
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerConnection connect
FINE: End of connect
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerStatement <init>
FINE: Statement properties ID:0 Connection:1 Result type:1003 (2003) Concurrency:1007 Fetchsize:128 bIsClosed:false tdsVersion:com.microsoft.sqlserver.jdbc.TDSVersion@15fea60 bCp1252:false useLastUpdateCount:true isServerSideCursor:false
22-Feb-2007 16:02:00 com.microsoft.sqlserver.jdbc.SQLServerStatement doExecuteStatement
FINE: Executing (not server cursor)
USE TESTDATABASE
SELECT DATEDIFF(SECOND, DATETIME, GETDATE())
FROM TEST_TABLE
22-Feb-2007 16:02:01 com.microsoft.sqlserver.jdbc.SQLServerConnection close
FINE: Closing connection ID:1

------

Connect string:

java -classpath /conf/javasql/sqljdbc_1.1/enu/sqljdbc.jar:/conf/javasql/jisql/lib/jisql.jar com.xigole.util
.sql.Jisql -user SOMEUSER -password SOMEPASSWORD -driver com.microsoft.sqlserver.jdbc.SQLServerDriver -input $QUERYFILE -cstring jdbc:sqlserver://SERVER1;DataBaseName=TESTDATABASE;failoverPartner=SERVER2;loginTimeout=3

I cant supply a native database in the connection string (i.e Master) and then switch to the mirrored database in TSQL because the failoverPartner property does not apply to the session, only to the initial connection.

Has anyone got any suggestions?



Thanks

View 1 Replies View Related

2000 JDBC Vs 2005 JDBC

Mar 12, 2008



I've got an import app written in Java. One table I'm importing from contains 22 million records. When I run the app in a 2000 environment, I have my max heap set at 512, and the table gets imported. When I run in a 2005 environment, I have to change the max heap to 1152 or it will error out with a similiar error:

com.microsoft.sqlserver.jdbc.SQLServerException: The system is out of memory. Use server side cursors for large result sets:Java heap space. Result set size:854,269,999. JVM total memory size:1,065,484,288. (<--this is with max heap at 1024)

what is the difference between the 2000 and 2005 JDBC that I have to set max heap in one and not the other?

View 3 Replies View Related

SqlServer Connection String For JDBC When Using Named Pipe

Apr 27, 2008

Hi!

I'm writing a java application that queries sqlserver 2005 (and 2000). In case the sql browser service is stopped I need to use the named pipe property or the port property, right?
But how could the program know at runtime what is the port and what is the pipe name? And how should a connection string to sqlserver 2005 (and 2000) that includes named pipe, look like?

Thanks!

View 4 Replies View Related

Sqlserver 2005 Unable To Start Mssqlserver Service (access Denied)

Aug 12, 2007

View 2 Replies View Related

SQLServer 2000 JDBC /SQL Exception Error Messages - Meaning?

Jul 20, 2005

Hi;I went to the microsoft site to try to find a guide to the errormessages that the jdbc drivers give ( for sqlserver 2000 ).I had no luck.Does anyone know if there is such a guide?I got this mysterious error message below in my logs ( nothing visiblein user land ).Anyone know what it means?Thanks in advanceStevejava.sql.SQLException: [Microsoft][SQLServer 2000 Driver forJDBC][SQLServer]Transaction (Process ID 151) was deadlocked on lockresources with another process and has been chosen as the deadlockvictim. Rerun the transaction.

View 5 Replies View Related

Java.lang.ClassNotFoundException: Com.microsoft.sqlserver.jdbc.SQLServerException

Oct 12, 2006

Hallo,

from time to time i get a
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerException (no security manager: RMI class loader disabled) when i try to use the MS SQLServer 2005 JDBC Driver 1.1. with our RMI Server.

The connect String is
jdbc:sqlserver://localhost:1433;databaseName=EXBBERLIN
The SQL Server Version is 2000 SP 3.
I am using java Version 1.5.0_08-b03.

I have tried to start our Server with the -Djava.security.manager switch, but this does not resolve the problem.

The stacktrace of the exception is

java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerException (no security manager: RMI class loader disabled)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at de.eidon.logis.database.DBReadManager_Stub.base2treeAndEdit(Unknown Source)
....
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerException (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)

On another comnputer with almost the same setup everything works fine.
The SQLServer 2000 JDBC Driver seems to work fine as well.
Does anonne of you has an idea how to resolve this issue ?

Thanks a lot, best regards,

Florian Brunswicker

View 1 Replies View Related

[SQLServer 2000 Driver For JDBC] Must Declare The Variable '@P2GROUP'

May 6, 2008

Hello,I am working with the driver JDBC and I have a strange error that I can't find in Google for example.Caused by: com.seeburger.smarti.util.SmartiEJBException: nested exception is: com.seeburger.smarti.dao.DAOSysException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Must declare the variable '@P2GROUP'.I don't know what is this variable '@P2GROUP'.Does anybody know it ?Thanks

View 2 Replies View Related

Transaction Left In Open State On SQLServer 2000 And JDBC

Sep 6, 2007

I have a problem where my connection always has an open transaction as viewed by activity monitor.

I am using the latest MS SQL Server 2005 JDBC driver (1.1) and connecting to SQL Server 2000.

This issue arises only when selectMethod=cursor and autoCommit is set to false. This issue does not exist when I connect to SQL Server 2005.

Has anyone else seen this issue?
How can this issue be resolved?

Thanks

Peter

View 3 Replies View Related

Com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP Connection To The Host Has Failed.

May 21, 2007

I am trying to connect to SQL Server 2005 Express with JDBC. I am getting the following exception:


Code SnippetString connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=IFC3;";
// Declare the JDBC objects.
Connection con = null;
Statement stmt = null;
ResultSet rs = null;

try {
// Establish the connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = DriverManager.getConnection(connectionUrl,"ifc2","password");






com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at connectURL.main(connectURL.java:43)

I am using the code example that came from Microsoft for making a JDBC connection. I looked at my configuration of SQL Server and change to use a static port 1433. I shut off Windows firewall to make sure it was not blocking communication.


When I try to telnet to port 1433 it says


Connecting To 1433...Could not open connection to the host, on port 23: Connect
failed


Any suggestions?
Thanks,
Tom

View 14 Replies View Related

Sqlserver 2005 Standard Edition Unable To Start Mssqlserver Service (access Denied)

Aug 12, 2007

All,

I have installed sqlserver 2005 using the standard msdn universal installation discs on my laptop running vista business.

The mssqlserver service will not start automatically as the setup configures it
and I cannot start the service manually because I get the 'Access Denied' error message

I am logged on the the computer with adminstration privileges

Thank for all help received in advance,


Dave.....

View 2 Replies View Related

How To Retreive Data From Nvarchar(max) Column, Using Com.microsoft.sqlserver.jdbc.SQLServerDriver?

Dec 31, 2007

I've looked through msdn and found an example, but it doesn't work. The problem is that when i use such construction

ResultSet rs1 = stmt.executeQuery("SELECT TOP 1 * FROM sys.check_constraints");
rs1.next();
Reader reader = rs1.getCharacterStream(17);

reader is set to null,but it mustn't be null cause i see some data through management studio in 17th column of sys.check_constraints table.

View 3 Replies View Related

Com.microsoft.sqlserver.jdbc.SQLServerException.class Throws Java.lang.SecurityException

Feb 6, 2008

I'm trying to connect to a sql server 2005 express edition but have some trouble with it: i can connect to sql server through eclipse IDE but when I create a jar and try connecting to server, I get the following error.

Exception in thread "main" java.lang.SecurityException: invalid SHA1 signature f
ile digest for com/microsoft/sqlserver/jdbc/SQLServerException.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)

at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)


I'm using :
- os : winxp
- jdk1.5.0_06
- drivers : sqljdbc_1.1.1501.101 / sqljdbc_1.2.2828.100

is there anything i've missed? please, help me..

View 4 Replies View Related

How To Import Access To SQLServer With Parameter From SQLServer, Help Pls!

Jul 8, 2006

Hello Expert!

I have 2 Database €“ Access & SQLServer(ver 7)

I need to Import Data TblShift from Access to SQLServer €“ using DTS I€™ve done this successfully!

Now I want to use parameter so I only importing record within range (e.g. ShiftDate BETWEEN 05-24-2006 AND 06-23-2006)

In SQLServer, I have created table to store the date range as following:

TblParameter
DateFrom: 04/24/2006
DateTo: 05/23/2006

How do I use the date range from TblParameter(SQLServer) to import record from TblShift(Access) using DTS?

Is this possible or any better solution for this?

TIA

Regards,

View 4 Replies View Related

May I Use The JDBC Driver Of SQLServer2000 To Access SQLServer2005??

Jan 4, 2007

May I use the JDBC driver of SQLServer2000 to access SQLServer2005??

View 3 Replies View Related

SQLServer JDBC Exceptions :Controlling Exceptions Text Format

Sep 28, 2006

Hi,

Using RAISERROR from within a stored prcedure will result in a SQLException being thrown at the client side of a JDBC connection.
I am trying to provide a meaningfull error message to be shown to the end user. However, all exceptions thrown will inevitably start with : "[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]". The following questions then arise :

- Is there a way of configuring SQL Server not to display this header ?

alternatively,

- Is there another way of conveying error messages to the client through JDBC ?

Thank you for your answers,
Ben

View 1 Replies View Related

Using Saxon's SQL Extension To Access SQL Server Through The JDBC Driver

May 21, 2008

I'm having a heck of a time trying to access a SQL server database using Saxon's SQL extensions with the Microsoft SQL server JDBC driver. The Saxon XSL processor has implemented some SQL extensions that allow you to access a SQL database through a JDBC driver. I have Visual Studio 2005 professional with SQL server express installed on my workstation. The SQL server express installation is installed at the default 1433 port on my workstation, it has been setup to accept connections over TCP and has been configured to accept Windows authentication and SQL authentication. In addition, I have downloaded and installed Microsoft's JDBC driver for SQL server.

After installing the JDBC driver I added the JDBC sqljdbc.jar to my Java CLASSPATH. Then I built a simple Saxon XSL that made use of the SQL extensions:




Code Snippet
<xsl:transform version="2.0"
exclude-result-prefixes="java saxon xsd xsi xsl xfn xdt xqe"
extension-element-prefixes="saxon sql"
xmlns:java="http://saxon.sf.net/java-type"
xmlns:saxon="http://saxon.sf.net/"
xmlns:sql="java://net.sf.saxon.sql.SQLElementFactory"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output method="text" media-type="text/plain" encoding="utf-8" />
<xsl:preserve-space elements="*" />
<xsl:param name="jdbc.driver" as="xsd:string" select="string('com.microsoft.sqlserver.jdbc.SQLServerDriver')" />
<xsl:param name="jdbc.database" as="xsd:string" select="string('jdbc:sqlserver://localhost:1433;databaseName=prototype')" />
<xsl:param name="jdbc.user" as="xsd:string" select="string('saxon')" />
<xsl:param name="jdbc.pass" as="xsd:string" select="string('*****')" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="element-available('sql:connect')">
<xsl:variable name="sql.conn" as="java:java.sql.Connection">
<sql:connect driver="{$jdbc.driver}" database="{$jdbc.database}" user="{$jdbc.user}" password="{$jdbc.pass}">
<xsl:fallback>
<xsl:message terminate="yes">SQL extenstions are not installed</xsl:message>
</xsl:fallback>
</sql:connect>
</xsl:variable>
<xsl:variable name="sql.employees" as="element()*">
<sql:query connection="$sql.conn" table="dbo.Employees" column="*" />
</xsl:variable>
<xsl:sequence select="$sql.employees" />
<sql:close connection="$sql.conn" />
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">sql:connect element is not available</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>

When I run the Java version of Saxon it issues a JDBC connection failure:


SXSQ0003: JDBC Connection Failure: The TCP/IP connection to the host has failed.
java.net.ConnectException: Connection refused: connect
Transformation failed: Run-time errors were reported

After some discussion on the Saxon listserv, I hacked a sample in the Microsoft JDBC documentation to see whether a standard Java program could use the JDBC driver and access the database:



Code Snippet
import java.sql.*;
public class connectURL {
public static void main(String[] args) {
// Create a variable for the connection string.
String connectionUrl = "" +
"jdbc:sqlserver://localhost:1443" +
";databaseName=prototype";
// Declare the JDBC objects.
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
// Establish the connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = DriverManager.getConnection(connectionUrl, args[0], args[1]);
// Create and execute an SQL statement that returns some data.
String SQL = "SELECT * FROM dbo.Employees";
stmt = con.createStatement();
rs = stmt.executeQuery(SQL);
// Iterate through the data in the result set and display it.
while (rs.next()) {
System.out.println(rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4));
}
}
// Handle any errors that may have occurred.
catch (Exception e) {
e.printStackTrace();
}
finally {
if (rs != null) try { rs.close(); } catch(Exception e) {}
if (stmt != null) try { stmt.close(); } catch(Exception e) {}
if (con != null) try { con.close(); } catch(Exception e) {}
}
}
}




This Java application accesses SQL server express and prints out the list of employees from the dbo.Employees table in the database:



Code Snippet
-- Create the table definition.
CREATE TABLE dbo.Employees
(
empid INT NOT NULL PRIMARY KEY,
mgrid INT NULL REFERENCES dbo.Employees,
empname VARCHAR(25) NOT NULL,
salary MONEY NOT NULL,
CHECK (empid <> mgrid)
);
GO

-- Insert test data.
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 1, NULL, N'David' , $10000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 2, 1, N'Eitan', $7000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 3, 1, N'Ina', $7500.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 4, 2, N'Seraph', $5000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 5, 2, N'Jiru', $5500.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 6, 2, N'Steve', $4500.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 7, 3, N'Aaron', $5000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 8, 5, N'Lilach', $3500.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 9, 7, N'Rita', $3000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 10, 5, N'Sean', $3000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 11, 7, N'Gabriel', $3000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 12, 9, N'Emilia', $2000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 13, 9, N'Michael', $2000.00 );
GO
INSERT INTO dbo.Employees( empid, mgrid, empname, salary )
VALUES( 14, 9, N'Didi', $1500.00 );
GO

-- Create unique index.
CREATE UNIQUE INDEX idxManagerEmployee ON dbo.Employees( mgrid, empid );
GO




Internally, Saxon uses almost the exact same code, e.g., three argument DriverManager.getConnection, but the call fails. Michael Kay, has indicated that this issue isn't related to Saxon since the error message coming from Saxon indicates that Saxon is finding the JDBC driver and issuing the connection request, but the JDBC driver is failing.

Has anyone tried to use Saxon's SQL extensions with Microsoft's JDBC driver? If you have could you indicate how you have things setup to make it work? If anyone from Microsoft's JDBC driver team is listening, would you be will to help recreate this issue or help trying to diagnose the issue?

Thanks, Andy.

View 3 Replies View Related

Problem Unicode Data 0x2300 In SQLServer 2000 SQLServer 2005 Express

Sep 20, 2006

Hi experts;
I have a problem with unicode character 0x2300
I created this table
create table testunicode (Bez nchar(128))

Insert Data
insert into testunicode (Bez)values('Œ€„¢')
with 2 Unicode characters
Œ€ = 0x2300
„¢ = 0x2122

Selecting the data
select Bez from testunicode
I see
"?„¢"

„¢ = 0x2122 is ok but instead of 0x2300 there is 0x3f

When I modify the insert statement like that ( 8960 = 0x2300 )
insert into testunicode (Bez)values(NCHAR(8960)+'„¢')

and select again voila i see
"Œ€„¢"
Does anyone have an idea?

Thanks

View 1 Replies View Related

Trying To 'load' A Copy Of A SQLServer 2000 Database To SQLServer 2005 Express

Apr 18, 2008



I am trying to 'load' a copy of a SQLServer 2000 database to SQLServer 2005 Express (on another host). The copy was provided by someone else - it came to me as a MDF file only, no LDF file.

I have tried to Attach the database and it fails with a failure to load the LDF. Is there any way to bypass this issue without the LDF or do I have to have that?

The provider of the database says I can create a new database and just point to the MDF as the data source but I can't seem to find a way to do that? I am using SQL Server Management Studio Express.

Thanks!!

View 1 Replies View Related

Data Access :: JDBC Stored Procedure Optional Inputs

Oct 4, 2015

When using JDBC is it possible to ignore input parameters in a stored procedure if they have default values?

I can create a string and execute a PreparedStatement but I'd like to use a Callable Statement.

View 7 Replies View Related

Replacing Sqlserver 2000 With Sqlserver 2005 Express

Jun 14, 2006

I have an app that uses a sqlserver 2000 jdbc driver to connect to a sqlserver 2000.

Is it possible to do a direct replacement of sqlserver 2000 with sqlserver 2005 express just by reconfiguring the app to point to the express? The app would still be using the sqlserver 2000 jdbc driver to try and make the connection.

If that is a possibility, what can be some differences in the configuration? Previously with 2000 the config information I entered is:

server name: "machinename"( or ip). I've also tried "machiname/SQLEXPRESS"

DB name: name of db instance

port: 1433(default)

user and pass.

My attempts so far results in

"java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket."

and

"java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL."

View 1 Replies View Related

Upgrade SQLServer Mobile (.sdf) Database To SQLServer 2005

Feb 9, 2006

Hello,

I have an SQLServer Mobile database, and I would like to know if there is a way to upgrade it to SQLServer 2005 (.mdf) database. My database has no records in it, just the structure (tables etc). What I am actually asking is if I can create automatically a new SQLServer 2005 Database with the same structure as my existin SQLSErver Mobile database

Thanks in advance,

TassosTS

View 1 Replies View Related

SQLSERVER 2005 X64 Linked Server To SQLSERVER 7.0

Jun 20, 2007

Hello people.

I am in the process of planning a server upgrade to sql2005 x64.

I created 2 linked servers: one to a SQL2000 sp4 server and one to a SQL7.0 SP3.

I have the following error when I query the linked servers.
OLE DB provider "SQLNCLI" for linked server "IVDM2K" returned message "Unspecified error".
OLE DB provider "SQLNCLI" for linked server "IVDM2K" returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.".
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "IVDM2K". The provider supports the interface, but returns a failure code when it is used.

I am aware of KB 906954.
http://support.microsoft.com/default.aspx?scid=kb;en-us;906954

I applied the instcat.sql on the SQL2000SP4 server and my linked server issues for that one are gone.

However, I ran the instcat.sql script on the SQL7.0 sp3 server and the linked server is still giving me an issue.

Can someone help me find a solution to this?

View 1 Replies View Related

MS JDBC Driver Incompatibility With JDBC 3.0 Specs

Aug 8, 2006

Hi all,





We've just stumbled on a 1.0 version incompatibility with the JDBC specs.





Problem: A table with SMALLINT column. According to JDBC specs version 3.0


(p.B-179) and 4.0 (p.221)), the value should be converted to Integer type.





Unfortunatelly we get a Short object :(





Now, I remember, this case was also affecting old JSQLConnect driver from


DataDirect. Could that problem sneak to new MS driver too?





Please let me know any resolution to this problem if exists.


The issue has not been fixed in CTP 1.1 version. Any ideas if it can be fixed??




Cheers,


Piotr

View 1 Replies View Related

SQL Server 2005 JDBC Driver V1.1 And SSL

Jan 3, 2007

Hi folks,

I'm trying to figure out if the SQL Server 2005 JDBC driver supports SSL at all. I've downloaded the driver documentation, looked at more web pages than I care to count, and even went as far as to take a stab at guessing at different driver property names in the hopes I might discover some undocumented feature. Each time I try, I come up dry.

The following exception shows up in my JBoss log:

2007-01-03 12:13:36,812 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The SQL Server login requires an SSL connection.)

I know I have things working properly on the SQL Server side, as both osql and Query Analyzer work fine, and packet sniffing yields no plain text information. I've also tried swapping in the open source JTDS driver, and once again, sniffing shows that the data between the two machines in encrypted.

Does anyone know if I'm just missing something completely obvious, or can someone state with absolute certainty that the driver does not support SSL? Any ideas on how to find out if there are plans to support this feature and what the timeline might be?

Thanks in advance.
Trev.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved