Error: “Output data invalid” when SQL Server data type LONGNVARCHAR/NCHAR/NCLOB/NVARCHAR/SQLXML/ROWID is used with the native driver (sqljdbc4.jar) in JDBC activities (JDBC Query etc.).

Error: “Output data invalid” when SQL Server data type LONGNVARCHAR/NCHAR/NCLOB/NVARCHAR/SQLXML/ROWID is used with the native driver (sqljdbc4.jar) in JDBC activities (JDBC Query etc.).

book

Article ID: KB0094315

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Description:
=======
The following data types are not recognized in TIBCO BW when used with the latest SQL Server driver “sqljdbc4.jar” in JDBC activities such as JDBC Query:

LONGNVARCHAR
NCHAR
NCLOB
NVARCHAR
SQLXML
ROWID

Sample Error (Here SizeDesc is defined as nchar) :
----------------------------------------------------
Output data invalid.caused by: org.xml.sax.SAXException:validation error: unexpected content "SizeCode"; expected "SizeDesc"   ({com.tibco.xml.validation}COMPLEX_E_UNEXPECTED_CONTENT) at /resultSet[1]/Record[2]/SizeCode[1]
com.tibco.xml.validation.exception.UnexpectedElementException: unexpected content "SizeCode"; expected "SizeDesc"
----------------------------------------------------

Environment:
========
All

Symptoms:
=======


An error, such as the following ( SizeDesc is defined as nchar) :

----------------------------------------------------
Output data invalid caused by: org.xml.sax.SAXException:validation error: unexpected content "SizeCode"; expected "SizeDesc"   ({com.tibco.xml.validation}COMPLEX_E_UNEXPECTED_CONTENT) at /resultSet[1]/Record[2]/SizeCode[1]
com.tibco.xml.validation.exception.UnexpectedElementException: unexpected content "SizeCode"; expected "SizeDesc"
----------------------------------------------------

Cause:
=====
The above data types were not implemented in BW versions prior to  5.12.

Resolution:
=======
1). Upgrade to BW 5.12


-OR-


1). Use the TIBCO Data direct driver.

2).    Use sqljdbc.jar with the TIBCO environment pointing to JRE 1.5.

Issue/Introduction

Error: “Output data invalid” when SQL Server data type LONGNVARCHAR/NCHAR/NCLOB/NVARCHAR/SQLXML/ROWID is used with the native driver (sqljdbc4.jar) in JDBC activities (JDBC Query etc.).