Transliteration failed exception writing a large Java Unicode char

From: Katherine (Katherine_at_discussions.microsoft.com)
Date: 08/26/04


Date: Thu, 26 Aug 2004 10:17:02 -0700

We are getting the following error. I have included the java code snippet.
This error stems for a TDS error we have been getting in SQL Server 17805
error which stated MS Support: case SRX040819601164 the
Problem:
The Web Server's application (estar) is generating an error 17805 when

trying to write to the SQL Server database Cluster.
Cause:
There was an update statement that passes a NVARCHAR parameter that

exceeds the limit of 4000b. This update statement was discovered in the

TDS traffic being sent by the Web Server to the database server NODE2.

update INFO_WHSE_ENTRY set DETAIL_TEXT=@P1 where

INFO_WHSE_ENTRYMIX_ENTRY_LOCAL_ID=@P2 and INFO_WHSE_ENTRYENTRY_SEQ=@P3

SQL Server is becoming more strict about checking the formation of the

TDS streams it receives from clients to avoid the receipt of malformed

TDS packets. Especially with SP3/SP3a and with MS03-031 there is a

tightening of the restrictions that check for a properly formed TDS

stream. A correctly formed TDS stream includes legal definitions of the

data type size.

 For example: According to SQL Server Books Online, nvarchar is a

Variable-length Unicode character data of n characters. n must be a

value from 1 through 4,000. If you specify a size that is more than 4000

for an nvarchar parameter, then you have a malformed TDS packet.

Proposed Resolution:
The clients application that runs on the web server needs to set

the parameters for its SQL statements to values which can support the

amount of data being passed. Otherwise you'll have a buffer overrun

which will result in a 17805 error. Also the Database should also have

it's data types set accordingly for the data being pushed to SQL Server.

This resolution did not work and is now causing another error as I have
included below. Can anyone help - Thanks

Transliteration failed exception writing a large Java Unicode character
stream (with standard Latin characters) to an nText column in a Sql
Server 2000 - SP3/SP3a database with the
latest JDBC Type 4 driver SQLServer 2.2.0040. The exception is being
thrown by class:
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest().

Here is the Java code snippet:

liLength = ((String)aoObject).length();
StringReader lReader = new StringReader((String)aoObject);
iPreparedStatement.setCharacterStream(aiBindIndex, lReader, liLength);

Here is the stack trace:

2004-08-25 15:43:07,731 INFO [STDOUT] java.sql.SQLException -
eStarPreparedStatement.executeUpdate - PreparedStatement.executeUpdate()
2004-08-25 15:43:07,731 INFO [STDOUT] java.sql.SQLException:
[Microsoft][SQLServer JDBC Driver]Transliteration failed.
        at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown
Source)
        at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown
Source)
        at com.microsoft.jdbc.base.BaseStatement.executeInternal(Unknown
Source)
        at com.microsoft.jdbc.base.BasePreparedStatement.execute(Unknown
Source)
        at
com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown
Source)
        at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(W
rappedPreparedStatement.java:335)
        at
com.estar.database.eStarPreparedStatement.executeUpdate(eStarPreparedSta
tement.java:68)

 



Relevant Pages

  • Re: Is TDS used only if server is local?
    ... If TDS are the actual data, ... CFMX accessing SQL Server stored procedures via ODBC SQL Server driver ... > typically the client and server TDS parsers don't even know what transport ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Add Records
    ... TDS is "tabular data stream". ... It opens a delimited text file and imports the data to SQL Server using the SqlBulkCopy class. ... Dim WithEvents bc As SqlBulkCopy ... All of these techniques can import data from anything that can be read by a .NET data provider, an OLE DB data provider, and ODBC driver or your own custom-written data provider that exposes a DataReader. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Using Kerberos Authentication to Login
    ... TDS for SQL Server is a proprietary data access protocol which you can ... license from Microsoft. ... TDS and I can direct you to the right people. ... PM, Microsoft SQL Server ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Is TDS used only if server is local?
    ... Data Provider for SQL Server because it has less layers, that is, the ... provider itself talks to the server (using TDS - in fact, ... ODBC managed provider + the SQL Server ODBC driver, ...
    (microsoft.public.dotnet.framework.adonet)

Loading