SQL Exception: Fail to convert between UTF8 and UCS2: failUTF8Conv

Hi,
I am trying to use the DBMS_OBFUSCATION_TOOLKIT to encrypt/decrypt some strings through JDBC, but I am getting the following exception:
SQL Exception: Fail to convert between UTF8 and UCS2: failUTF8Conv
The input and output parameters for the encryption/decryption functions are VarChar2.
Our database is using UTF8.
I will be glad if someone can help me on this.
Thanks,
Cenk

Susi,
This is just a wild guess, but your java client is on a different computer to your Oracle 9.2 server, and the locale (or encodings) on the two computers is different. Am I correct? If so, then I guess you need to change the locales (or encodings) so that they match.
Have you tried printing out the "System" properties for the two JVMs (Oracle's and your client's)? Something simple like this:
System.getProperties().list()Good Luck,
Avi.

Similar Messages

  • Java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv

    Hi all,
    I am writing a servlet that connects to Oracle 8.0.6 through jdbc for jdk1.2 on NT 4.0
    English version and it works fine.
    But when the servlet is deployed to a solaris with Oracle 8.0.5 (not a typo, the oracle on
    NT is 8.0.6 and oracle on solaris is 8.0.5) and jdbc for jdk1.2 (of course, for Solaris),
    the servlet failed with the Exception:
    java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
    (I am using JRun 3.0 as the application and web server for both NT and Solaris)
    (The database in both the NT and solaris platform are using UTF8 charset)
    My servlet looks like this: (dbConn is a Connection object proved to be connected to Oracle
    in previous segment of the same method):
    String strSQL = "SELECT * FROM test";
    try { Statement stmt = dbConn.createStatement();
    ResultSet rs = stmt.execute(strSQL);
    while (rs.next()) {
    out.println("id = " + rs.getInt("id"));
    System.out.println("id written");
    out.println("name = " + rs.getString("name")); // <-- this is the line the
    exception is thrown
    System.out.println("name written");
    } catch (java.sql.SQLException e) {
    System.out.println("SQL Exception");
    System.out.println(e);
    The definition of the "test" table is:
    create table test(
    id number(10,0),
    name varchar2(30));
    There are about 10 rows exists in the table "test", in which all rows contains ONLY chinese
    characters in the "name" field.
    And when I view the System log, the string "id written" is shown EXACTLY ONCE and then there
    is:
    SQL Exception
    java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
    That means the resultset is fetch back from the database correctly. The problem arise only
    during the getString("name") method.
    Again, this problem only happens when the servlet is run on the solaris platform.
    At first I would expect there are some strange code shown on the web page rather than having
    an exception. I know that I should use getBytes to convert between different encodings, but
    that's another story.
    One more piece of information: When all the rows contains ascii characters in their "name"
    field, the servlet works perfectly even in solaris.
    If anyone knows why and how to tackle the problem please let me know. You can feel free to
    send email to me at [email protected]
    Many thanks,
    Ben
    null

    Hi all,
    For the problem I previously posted, I found that Oracle had had such bug filed before in Oracle 7.3.2 (something like that) and is classified to be NOT A BUG.
    A further research leads me to the document of Oracle that the error message:
    "java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv"
    is a JDBC driver error message of error number ORA-17037.
    I'm still wondering why this behaviour will happen only in Solaris platform. The servlet on an NT machine I am using (which has an Oracle 8.0.6 and jdbc for jdk 1.2 running) is working just fine. I also suspect that this may be some sort of mistakes from jdbc driver.
    Nevertheless, I have found a way to work around the problem that I cannot get non-English string from Oracle in Solaris and I would like to share it with you all here.
    Before I go on, I found that there are many people out there on the web that encounter the same problem. (Some of which said s/he has been working on this problem for a month). As a result, if you find this way of working around the problem does help you, please tell those who have the same problem but don't know how to tackle. Thanks very much.
    Here's the way I work it out. It's kinda simple, but it does work:
    Instead of using:
    String abc = rs.getString("SomeColumnContainsNonEnglishCharacters");
    I used this:
    String abc = new String(rs.getBytes("SomeColumnContainsNonEnglishCharacters"));
    This will give you a string WITH YOUR DEFAULT CHARSET (or ENCODING) from your system.
    If you want to convert the string read to some other encoding type, say Big5, you can do it like this:
    String abc = new String(rs.getBytes("SomeColumneContainsNonEnglishCharacters"), "BIG5");
    Again, it's simple, but it works.
    Finally, if anyone knows why the fail to convert problem happens, please kindly let me know by leaving a word in [email protected]
    Again, thanks to those of you who had tried to help me out.
    Creambun
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by creambun creambun ([email protected]):
    Hi all,
    I am writing a servlet that connects to Oracle 8.0.6 through jdbc for jdk1.2 on NT 4.0
    English version and it works fine.
    But when the servlet is deployed to a solaris with Oracle 8.0.5 (not a typo, the oracle on
    NT is 8.0.6 and oracle on solaris is 8.0.5) and jdbc for jdk1.2 (of course, for Solaris),
    the servlet failed with the Exception:
    java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
    (I am using JRun 3.0 as the application and web server for both NT and Solaris)
    (The database in both the NT and solaris platform are using UTF8 charset)
    My servlet looks like this: (dbConn is a Connection object proved to be connected to Oracle
    in previous segment of the same method):
    String strSQL = "SELECT * FROM test";
    try { Statement stmt = dbConn.createStatement();
    ResultSet rs = stmt.execute(strSQL);
    while (rs.next()) {
    out.println("id = " + rs.getInt("id"));
    System.out.println("id written");
    out.println("name = " + rs.getString("name")); // <-- this is the line the
    exception is thrown
    System.out.println("name written");
    } catch (java.sql.SQLException e) {
    System.out.println("SQL Exception");
    System.out.println(e);
    The definition of the "test" table is:
    create table test(
    id number(10,0),
    name varchar2(30));
    There are about 10 rows exists in the table "test", in which all rows contains ONLY chinese
    characters in the "name" field.
    And when I view the System log, the string "id written" is shown EXACTLY ONCE and then there
    is:
    SQL Exception
    java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
    That means the resultset is fetch back from the database correctly. The problem arise only
    during the getString("name") method.
    Again, this problem only happens when the servlet is run on the solaris platform.
    At first I would expect there are some strange code shown on the web page rather than having
    an exception. I know that I should use getBytes to convert between different encodings, but
    that's another story.
    One more piece of information: When all the rows contains ascii characters in their "name"
    field, the servlet works perfectly even in solaris.
    If anyone knows why and how to tackle the problem please let me know. You can feel free to
    send email to me at [email protected]
    Many thanks,
    Ben<HR></BLOCKQUOTE>
    null

  • JBO-27022, Fail to convert between UTF8 and UCS2: failUTF8Conv

    steps to reproduce :
    on a Database with UTF8 as NLS_CHARACTERSET
    create table test (s1 varchar2(10), s2 varchar2(32));
    DECLARE
    l_data varchar2(4000);
    return_data varchar2(4000);
    skey varchar2(255);
    p_str varchar2(10);
    BEGIN
    p_str := 'Test';
    skey := chr(20) || chr(115) || chr(110) || chr(122) || chr(37) || chr(37) || chr(94) || chr(48);
    l_data := rpad (p_str,(trunc(length(p_str)/8)+1)*8, chr(0));
    dbms_obfuscation_toolkit.DESEncrypt (input_string=&gt;l_data, key_string =&gt;skey,
    encrypted_string =&gt; return_data);
    insert into test values ('1',return_data);
    END;
    commit;
    Now create a new Workspace and a new "Business Components Package"
    with only table test selected.
    In the tester we get an oracle.jbo.AttributeLoadException:
    (oracle.jbo.AttributeLoadException) JBO-27022: Failed to load value at index 2
    with java object of type java.lang.String due to java.sql.SQLException.
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) Fail to convert between UTF8 and UCS2: failUTF8Conv
    oracle.jbo.AttributeLoadException: JBO-27022: Failed to load value at index 2 with java object of type java.lang.String due to java.sq[i]Long postings are being truncated to ~1 kB at this time.

    This is still happening in jdev9031.
    And it is very easy to reproduce!
    How can we avoid this error?
    Thanks,
    Bert.

  • Help me,Fail to convert between UTF8 and UCS2: failUTF8Conv

    using SUN APP server 7.0 + Studio 4 +oracle9i to develop cmp, when i input chinese in some fields, i encount following errors:
    java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:916)
    at oracle.jdbc.dbaccess.DBConversion.failUTF8Conv(DBConversion.java:1958)
    at oracle.jdbc.dbaccess.DBConversion.utf8BytesToJavaChars(DBConversion.java:1797)
    at oracle.jdbc.dbaccess.DBConversion.charBytesToJavaChars(DBConversion.java:828)
    at oracle.jdbc.dbaccess.DBConversion.CHARBytesToJavaChars(DBConversion.java:783)
    at oracle.jdbc.ttc7.TTCItem.getChars(TTCItem.java:231)
    at oracle.jdbc.dbaccess.DBDataSetImpl.getCharsItem(DBDataSetImpl.java:1094)
    at oracle.jdbc.driver.OracleStatement.getCharsInternal(OracleStatement.java:2947)
    at oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatement.java:3103)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5089)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4964)
    at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:404)
    at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getConvertedObject(ResultDesc.java:399)
    at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:746)
    at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1197)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.loadForRead(SQLStateManager.java:3797)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:604)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at com.tops.gdgpc.EntityBean.SpeBaseTable.SpeBaseTableBean_1769729755_ConcreteImpl.jdoGetInstance(SpeBaseTableBean_1769729755_ConcreteImpl.java:2479)
    at com.tops.gdgpc.EntityBean.SpeBaseTable.SpeBaseTableBean_1769729755_ConcreteImpl.ejbLoad(SpeBaseTableBean_1769729755_ConcreteImpl.java:2267)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at com.tops.gdgpc.EntityBean.SpeBaseTable.SpeBaseTableBean_1769729755_ConcreteImpl_EJBObjectImpl.getSpeBaseTable(SpeBaseTableBean_1769729755_ConcreteImpl_EJBObjectImpl.java:24)
    at com.tops.gdgpc.EntityBean.SpeBaseTable._SpeBaseTable_Stub.getSpeBaseTable(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:233)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:98)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:191)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:127)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServle
    I think it is caused by that the fields' not enought long.UTF must use 3 characters for one chinese,but in our database only 2 characters for one chinese.How can I resolve this puzzle,please help me!

    I've got many more tips from our experts:
    1. One thing you can try to do is make sure that Oracle Databse is set to UTF-8. If this is the case then you need to make sure that the client encoding is UTF-8.
    2. A colleague at Oracle points out that oracle.jdbc.* is a package that Oracle
    provides, not Sun. He says you might try asking this question on an Oracle
    forum. He writes:
    We have Oracle Technology Network (OTN) discussion forum, which would be a good place to
    start with this question.
    Oracle Technology Network (OTN) " Technologies " Java " SQLJ/JDBC
    Try the SQLJ/JDBC forum first.
    -- markus.

  • Fail to convert between UTF8 and UCS2: failUTF8Conv

    We need to store possibly all UTF8 chararacter in his database
    especially $ & ( 4 8 < = > from WE8ISO8859P1 and from WE8ISO8859P15.
    So we install an UTF8 instance and set NLS_LANG to UTF8.
    We have to do select/update from a java client and sqlplus(like).
    When we insert with java client it's unreadable from sqlplus and
    when whe insert from sqlplus we've got 'Fail to convert between UTF8 and UCS2: failUTF8Conv '
    here the code made in sqlplus
    update CPW_TEST set lb_comportement='$ & ( 4 8 < = > ' WHERE ID_TEST=14805;
    here the code made in java
    update CPW_TEST set lb_comportement='$ & ( 4 8 < = > ' WHERE ID_TEST=14804;
    and then the result in database
    SELECT id_test,LB_COMPORTEMENT FROM CPW_TEST WHERE ID_TEST=14804 or ID_TEST=14805
    ID_TEST LB_COMPORTEMENT
    14804 B$ B& B( B4 B8 B< B= B> B
    14805 $ & ( 4 8 < = >
    2 rows selected
    and the dump
    SELECT id_test,dump(LB_COMPORTEMENT) FROM CPW_TEST WHERE ID_TEST=14804 or ID_TEST=14805
    ID_TEST DUMP(LB_COMPORTEMENT)
    14804 Typ=1 Len=26: 194,164,32,194,166,32,194,168,32,194,180,32,194,184,32,194,188,32,194,189,32,194,190,32,194,128
    14805 Typ=1 Len=17: 164,32,166,32,168,32,180,32,184,32,188,32,189,32,190,32,128
    2 rows selected
    I'm not sure, but it seems that sqlplus uses true UTF8 (variable length codes) and java client uses UCS-2 (2 bytes)
    How can I solve my problem?
    Our configuration
    javaclient (both thin and oci jdbc driver 8.1.7), sqlplus client and database Oracle 8.1.7.0.0 on the same computer (W2000 or NT4)
    Thank you for yoru attention.

    Hi Luis, thanks for your suggestions. You're right that problem was in JServ and his JVM.
    There was conflict between different versions of Java. While iFS was using JRE 1.3.1, JServ was configured to use JRE 1.1.8. As soon as I corrected link to the right Java, problem disappears.
    Radek

  • Failed to convert between UTF8 and UCS2: failUTF8Conv

    This error appear when trying to install the database cache. Does this have something to do with the classes111.zip or classes12.zip files?

    I have the same problem in XP. I installed the whole Oracle9i product on my desktop and after a day or two the message began appearing on my machine. I couldnt use any of the tools. I tried uninstallinmg according to Oracles instruction and after installing again had the same problem.
    I logged a TAR and they advised me to reinstall but according to Oracles instructions for removing the software first.
    Will keep you posted

  • Fail to convert between UTF8 and UCS2

    : java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
    (BC4J throws that exception)
    I got that error message when try to show the table's content in uix page.
    I use varchar2(40). the error occurs, when i set special characters like õ,ü,Ü.. and so on.
    This affects only UTF encoded database.
    We use: 9.0.2.5, Jdev9.0.3.3., UIX, iAS 9.4.2??(i dont'know)
    As i know the problem is when there is 40 letters in the column and it contains "special character" it can't convert it, because the neccessary space requered to store values is much more.
    If i use nvarchar, i don't think it fix this problem.
    And as i know, all sql constant must use where coulmn=N'constans value' format.
    Q:
    How can i set the UTF database and BC4J to run correctly.
    I mean... what type to use, what is the column size to set.
    Thanks in advice,
    Viktor

    I had the same problem using Oracle 9i. The problem lied within the Oracle JDBC driver itself! --;
    If you're using JDBC driver from Oracle 9i, stop using it!
    You should download JDBC driver of Oracle 10g from Oracle site and use that driver instead.
    After I changed the driver, I now have no problem of getting Korean characters from the database.
    Hope this would solve your problem too.

  • Fail to Convert between UTF8 and UCS2: fail UTF Conversion

    I'm using the JReport software, a product which generates java reports based on a jdbc datasource.
    during installation the JReport installation program located Microsoft java VM installed on my PC and I accepted this option to be working JVM for JReport.
    This worked very well. I have installed jdbc driver for Oracle 8.1.5 that worked fine as well on the design time (I have connected to Oracle, I have seen my tables and other information on my DB).
    But when I switched the run-time view (when real data is going to load) then the following exception message appeared :
    "Fail to Convert between UTF8 and UCS2: fail UTF Conversion" .
    if there is anybody who understood my problem any kind of help will be appreceated
    It will be helpfull to receive any suggestions made to this matter.
    Anything relative help will be welcome.
    thanks in advance.

    I had the same problem using Oracle 9i. The problem lied within the Oracle JDBC driver itself! --;
    If you're using JDBC driver from Oracle 9i, stop using it!
    You should download JDBC driver of Oracle 10g from Oracle site and use that driver instead.
    After I changed the driver, I now have no problem of getting Korean characters from the database.
    Hope this would solve your problem too.

  • Fail to convert between UTF8 and UCS2: failUTFConversion

    Hi
    I use Oracle 8.1.5 with NLS = 'CL8MSWIN1251' (russian).
    JDeveloper 3.0 and JDBC
    if I write - "select substr(str,1, 10 ) from table"
    I have not Exception, but I get instead of 10 symbol - only 5
    if I write - select substr(str,1, 11 ) from table
    I have Exception.
    if I write - "select Convert(str,'CL8MSWIN1251') from table"
    I have not any problem.
    What is it problem? How I can ok
    if I write- "select str from table"
    Igor Leonov
    null

    Hi!
    It's Oracle 7.3 server problem - wrong UTF conversion. Try to use Oracle8.

  • Sql Exception: Fail to convert to internal representation

    Hi
    I have a column in my ORACLE table defined as
    INTGROUPID NUMBER(10).
    When I try to select some rows from that table with a condition using this column "INTGROUPID" by the below code, I am getting the above metioned error.
    Code :
    select *
    from Sri.TBLGROUPCOCK
    where
    INTGROUPID = TO_NUMBER('747');

    actually the to_number command is used to convert a string to number..ok..but u used it to convert a number.how could it be possible to you.So there is no need to convert a number to number.just use the normal command to get the elements in the table...
    i hope it will help u......!

  • Sql Exceptionjava.sql.SQLException: Fail to convert to internal representat

    Hai,
    I tryed to execute the following code and getting the error as
    Sql Exceptionjava.sql.SQLException: Fail to convert to internal representation.
    try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   connection= DriverManager.getConnection("jdbc:oracle:thin:@180.190.30.30:1521:jb3db1","jbl_pathart","jbl_pathart");
    statment=connection.prepareStatement (
                                  "SELECT path.pathway_name, phy.physiology_name, org.organism_name, path.is_physiology," +
                                  " jpty.pathway_type_name, path.pathway_id" +
                                  " FROM pathway path, physiology phy, organism org, jbl_pathway.pathway_type jpty "+
                                  " WHERE path.physiology_id = phy.physiology_id "+
                                  " AND path.organism_id = org.organism_id "+
                                  " AND path.pathway_type_id = jpty.pathway_type_id "+
                                  " AND path.pathway_id = " + i);
                        ResultSet rs=statment.executeQuery();
                        while(rs.next()){                    
                             orgName          = rs.getString(1);
                             phyName          = rs.getString(2);
                             pathwayName     = rs.getString(3);
                             is_physiology     = rs.getString(4);
                             pathwayId          = rs.getInt(5);
    } catch (Exception e){
                   System.out.println("Sql Exception"+e);
         }

    Please do this first...replace the following bit of code:
    } catch (Exception e){
    System.out.println("Sql Exception"+e);
    }with
    } catch (Exception e){
        e.printStackTrace();
    }If you do this, it'll even tell you exactly which line is throwing the exception.

  • Cannot convert between unicode and non-unicode string datatypes

      My source is having 3 fields :
    ItemCode nvarchar(50)
    DivisionCode nvarchar(50)
    Salesplan (float)
    My destination is : 
    ItemCode nvarchar(50)
    DivisionCode nvarchar(50)
    Salesplan (float)
    But still I am getting this error : 
    Column ItemCode cannot convert between unicode and non-unicode string datatypes.
    As I am new to SSIS , please show me step by step.
    Thanks In Advance.

      My source is having 3 fields :
    ItemCode nvarchar(50)
    DivisionCode nvarchar(50)
    Salesplan (float)
    My destination is : 
    ItemCode nvarchar(50)
    DivisionCode nvarchar(50)
    Salesplan (float)
    But still I am getting this error : 
    Column ItemCode cannot convert between unicode and non-unicode string datatypes.
    As I am new to SSIS , please show me step by step.
    Thanks In Advance.
    HI Subu ,
    there is some information gap , what is your source ? are there any transformation in between ?
    If its SQL server source and destination and the datatype is as you have mentioned I dont think you should be getting such errors ... to be sure check advance properties of your source and check metada of your source columns
    just check simple oledb source as
    SELECT TOP 1 ItemCode = cast('111' as nvarchar(50)),DivisionCode = cast('222' AS nvarchar(50)), Salesplan = cast(3.3 As float) FROM sys.sysobjects
    and destination as you mentioned ... it should work ...
    somewher in your package the source columns metadata is not right .. and you need to convert it or fix the source.
    Hope that helps
    -- Kunal
    Hope that helps ... Kunal

  • Java.sql.SQLException: Fail to convert to internal representation:

    HI All,
    I have a procedure hich is taking the Varray ADDR_CONTACT_VA as input which is varray of object .
    ADDR_CONTACT_OBJ [] address = new ADDR_CONTACT_OBJ[20];
    address[0] = new ADDR_CONTACT_OBJ();
    address[0].setOpportunityId(26731);
    address[0].setAddr_ln_1("100, Street");
    address[0].setAddr_ln_2("Cast card Street");
    address[0].setAddr_ln_3("Cast card Street");
    address[0].setAddr_ln_4(null);
    address[0].setAddr_ln_5(null);
    address[0].setAddr_ln_6(null);
    address[0].setAddress_name("GVPN Testing");
    address[0].setAddressType("HQ");
    address[0].setCity("Mumbai");
    address[0].setContact_title("Mr.");
    address[0].setCountry("India");
    address[0].setEmail_contact_id(null);
    address[0].setName_contact_id(null);
    address[0].setOSO_Address_id(124959);
    address[0].setOso_contact_id(317694);
    address[0].setOso_party_site_id(69387);
    address[0].setPincode("470003");
    address[0].setState("Maharashtra");
    address[0].setContact_firstname("First");
    address[0].setContact_lastname("Last");
    address[0].setContact_email(null);
    address[0].setContact_phone_day("91-45234-4534556");
    address[0].setDay_phone_contact_id(287326);
    System.out.println("Vishwa3: after creating an y array");
    ArrayDescriptor desc1 = ArrayDescriptor.createDescriptor("ADDR_CONTACT_VA",nativeConnection);
    System.out.println("Vishwa4: after creating an y array");
    ARRAY input1 = new ARRAY(desc1,nativeConnection,address);
    System.out.println("Vishwa5: after creating an y array");
    %>
    <% proc_stmt = (OracleCallableStatement)nativeConnection.prepareCall("{ call DBP_UPDATE_STATUSCUSTOMER_DETAILS(?,?)}");
    proc_stmt.setArray(1,input1);
    proc_stmt.registerOutParameter(2,OracleTypes.CURSOR);
    System.out.println("Vishwa6: after creating an y array");
    %>
    <% proc_stmt.execute();
    ResultSet result =(ResultSet)proc_stmt.getObject(2);
    while(result!=null)
    System.out.println(result.getString(1));
    System.out.println(result.getString(2));
    System.out.println(result.getString(3));
    System.out.println(result.getString(4));
    System.out.println(result.getString(5));
    when i try to execute this procedure ai m gettin the exception like
    java.sql.SQLException: Fail to convert to internal representation: com.sy.vo.ADDR_CONTACT_OBJ@4a594a59_
    Please help me to resolve this probelm .it is verey verey urgrnt for me
    Thanks in Advance.....................
    Viswa

    First use code tags when posting code.
    Second you can't simply use a java object as an database array type. It certainly looks like you are doing that.

  • SSIS Package : While Extracting Sharepoint Lookup column, getting error 'Cannnot convert between unicode and non-unicode string data types'

    Hello,
    I am working on one project and there is need to extract Sharepoint list data and import them to SQL Server table. I have few lookup columns in the list.
    Steps in my Data Flow :
    Sharepoint List Source
    Derived Column
    its formula : SUBSTRING([BusinessUnit],FINDSTRING([BusinessUnit],"#",1)+1,LEN([BusinessUnit])-FINDSTRING([BusinessUnit],"#",1))
    Data Conversion
    OLE DB Destination
    But I am getting the error of not converting between unicode and non-unicode string data types.
    I am not sure what I am missing here.
    In Data Conversion, what should be the Data Type for the Look up column?
    Please suggest here.
    Thank you,
    Mittal.

    You have a data conversion transformation.  Now, in the destination are you assigning the results of the derived column transformation or the data conversion transformation.  To avoid this error you need use the data conversion output.
    You can eliminate the need for the data conversion with the following in the derived column (creating a new column):
    (DT_STR,100,1252)(SUBSTRING([BusinessUnit],FINDSTRING([BusinessUnit],"#",1)+1,LEN([BusinessUnit])-FINDSTRING([BusinessUnit],"#",1)))
    The 100 is the length and 1252 is the code page (I almost always use 1252) for interpreting the string.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Column "A" cannot convert between unicode and non-unicode string data types

    I am following the SSIS overview video-
    https://secure.cbtnuggets.com/it-training-videos/series/microsoft-sql-server-2008-business-development/6143?autostart=true
    I have a flat file that i want to import the contents onto a SQL database.
    I created a Dataflow task, source file and oledb destination.
    I am getting the folliwung error -
    "column "A" cannot convert between unicode and non-unicode string data types"
    in the origin file the data type is coming as string[DT_STR] and in the destination object it is coming as "Unicode string [DT_WSTR]"
    I used a data conversion object in between, dosent works very well
    Please help what to do

    I see this often.
    Right Click on FlatFileSource --> Show Advanced Editor --> 'Input and Output Properties' tab --> Expand 'Flat File Source Output' --> Expand 'Output Columns' --> Select your field and set the datatype to DT_WSTR.
    Let me know if you still have issues.
    Thank You,
    Jay

Maybe you are looking for

  • My iPhone is no longer allowing me to see an entire text message while typing it. Why?

    My text is now going beyond the regular typing window, and since I can't see what I've typed before I send the text, I'm having a huge amount of typos that make no sense whatsoever.

  • Need tables for the fields

    Hi,         I want to know the tables where these fields can be available...      Field “SERNR1”  -  Serial Number •     Field “MATNR1” – Assy Matl •     Field “SERNR” – Assy Serial NO •     Field “ARKTX” – Assy Description Pls let me know as soon as

  • Snow Leo is blocking  ports!

    Hello dear folks! I've got some nasty persistent problem with my mac. Neither of my torrent clients can establish connection; whenever I open preferences, it does say "port XXX : blocked". I've tried everything, enabling/disabling the FW, adding all

  • Historical Report Ordering

    Hi, Using the Web Layout editor I created a Historical Workflow Report. I want to change the ordering of the results, but I'm not able to find the option, can you please help me? Thanks in advance

  • Trying to figure out how to layer pics!

    Hi i'm Farely new to this part of photoshop and when i say this part i mean This....(lol) I have a buddy that wanted me to photograph him doing Tricks on his Motorcycle. I remember when i was younger i used to look at these Snowboarding Magazines and