Monday, July 8, 2013

DB Adapter fails to return nVarchar Type from stored procedure with MS SQLServer 2005

When you are using DbAdapter to access MS SQLServer 2005 Stored Procedures that return resultsets as dynamic row sets with nVarchar column types, a class type mapping exception is thrown.

You will see a stack trace as follows:

<faultstring>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation '***' failed due to: Unimplemented string conversion.
Conversion of JDBC type to String is not supported.
An attempt was made to convert a Java object to String using an unsupported JDBC type: .
Use a data type with a supported JDBC type.
".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.</faultstring>


The issue can be resolved by switching the driver from  com.microsoft.sqlserver.jdbc.SQLServerDriver c to weblogic.jdbc.sqlserver.SQLServerDriver


But there is a limitation of maximum size  4000 characters that can be returned by any column of the stored procedure while using this driver.



5 comments:

  1. We are facing the same issue even when we tried with weblogic.jdbc.sqlserver.SQLServerDriver. Please suggest if any other option available.

    ReplyDelete
  2. The above fix is working fine for us in Oracle SOA Platform Version 11.1.1.7.0. I believe a patch is available with Oracle for other versions.

    ReplyDelete
  3. Same exception is coming when calling oracle procedure from OSB business service. Can you please help me .

    ReplyDelete
    Replies
    1. What is the datatype returned by the procedure and what driver are you using?

      Delete
  4. Thank You and that i have a neat offer: Does Renovation Increase House Value home renovation in canada

    ReplyDelete