Problems accessing a SQL server data source

What kind of problem are you having accessing your SQL Server database?

ERROR CODE: 20001 and SQL STATE: HY000 accessing SQLServer database

The problem might be that the distributed transaction coordinator service is not started. Look for an error similar to the following example when attempting to access an SQL server database:

ERROR CODE: 20001
SQL STATE:  HY000
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]
[SQLServer]xa_open (0) returns -3
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) ...
at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection
(Unknown Source) ...

To confirm this problem:

  1. Go to the Windows Control Panel and click Services(or click Control Panel > Administrative Tools > Services)
  2. Verify whether the service Distributed Transaction Coordinator or DTC is started.
  3. If not, start the Distributed Transaction Coordinator service.

Application fails with message stating "Cannot find stored procedure..." accessing an SQLServer database

This error can occur because the stored procedures for the Java Transaction API (JTA) feature are not installed on the Microsoft SQL Server.

To resolve the problem: Repeat the installation for the stored procedures for the JTA feature, according to the ConnectJDBC installation guide.

ERROR CODE: SQL5042 when running a Java application

This error can occur when you configure your application to run in the following manner:

  1. you use a type 2 (application) driver running on the gateway to the OS 390
  2. your application is an XA application.

OS 390 does not use XA, but uses SPM. To resolve the problem:

  1. Check your dbm cfg to see that the SPM is not started on the gateway.
  2. Assign a port and set the db2comm variable to TCPIP.
  3. Update the dbm cfg value SPM_NAME to use your machine name.
  4. Start the SPM on the gateway.

After defining a SequeLink data source, you experience a sealing violation either when testing a connection or during run time

This error occurs for JDBC connections that have been configured with the DataDirect SequeLink type 3 JDBC driver for MS SQL Server (XA and non-XA).
Symptom Either when testing a connection or during application run time, you experience a sealing violation similar to the following:
    java.lang.SecurityException: sealing violation: package com.ddtek.jdbc.sequelink is sealed
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:403)
       at java.net.URLClassLoader.access$500(URLClassLoader.java(Inlined Compiled Code))
       at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled Code))
       at java.security.AccessController.doPrivileged1(Native Method)
       at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
       at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
       at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:98)
       at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
       at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
       at java.lang.Class.forName1(Native Method)
       at java.lang.Class.forName(Class.java(Compiled Code))
       at com.ddtek.jdbc.slbase.BaseLicenseUtility.isLocked(Unknown Source)
       at com.ddtek.jdbc.slbase.BaseConnection.open(Unknown Source)
       at com.ddtek.jdbcx.slbase.BaseXADataSource.getBaseConnectionPreparedForXA(Unknown Source)
       at com.ddtek.jdbcx.slbase.BaseXADataSource.getXAConnection(Unknown Source)
Problem WebSphere Application Server embeds its own version of the SequeLink JDBC driver, which is automatically placed on the class path. Both SequeLink JDBC drivers use the same package names, resulting in conflicts when both are on the class path at the same time.
Description The SequeLink JDBC driver declares the com.ddtek.jdbc.sequelink package as sealed in its manifest file. Sealed packages are packages for which all classes must be loaded from the same JAR file. A sealing violation occurs when a Java package is sealed but has classes defined in other JAR files. In this case, because the WebSphere-embedded SequeLink JAR files and those from the DataDirect Technologies SequeLink JDBC driver have the same package names, and these packages are declared as sealed, a sealing violation occurs.
Recommended response The two SequeLink drivers cannot coexist on the class path. To eliminate this scenario, take one of the following actions:
  • Configure your application to use only the WebSphere-embedded SequeLink JDBC driver.
  • Configure your application to use only the DataDirect Technologies SequeLink JDBC driver.

    If you make the second choice, you need to remove the embedded SequeLink JDBC driver from WebSphere Application Server. Uninstalling the embedded driver will keep it out of the class path; you can then use the DataDirect Technologies SequeLink JDBC driver without incurring the sealing error. To remove the embedded SequeLink JDBC driver, stop your application server and delete the following JARs:

    • %WAS_INSTALL%/lib/sljc.jar
    • %WAS_INSTALL%/lib/spy-sl.jar


Related tasks
Troubleshooting by task: What are you trying to do?
Related reference
Cannot access a data source
Problems accessing an Oracle data source
Problems accessing a DB2 database
Problems accessing a Cloudscape database
Problems accessing a Sybase data source



Searchable topic ID:   rtrb_dsaccess4
Last updated: Jun 21, 2007 4:12:58 PM CDT    WebSphere Application Server Express, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rtrb_dsaccess4.html

Library | Support | Terms of Use | Feedback