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......!

Similar Messages

  • 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.

  • Fail to convert to internal representation: oracle.sql.DATE

    I'm using the oracle 8.1.7 jdbc driver against oracle 8.1.7 running on NT, and I get the exception message below when I attempt to insert an jpub object structure into a prepared statement.
    All date objects have been constructed from a timestamp object, using the oracle.sql.DATE Timestamp constructor. So I'm surprised to get this error given the timestamp object was successfully constructed.
    I've tried session date formats of 'yyyy-mm-dd hh24:mi:ss' and 'mm/dd/yyyy hh24:mi:ss', with no success.
    I can call stringValue on oracle.sql.DATE and it returns a valid date.
    Can someone confirm that they have been able to use the oracle.sql.DATE class to insert a date correctly into the database? Its seems a silly question to ask but you have to start somewhere!
    Exception : Fail to convert to internal representation: oracle.sql.DATE@3c144e8a
    Stack trace : java.sql.SQLException: Fail to convert to internal representation: oracle.sql.DATE@3c144e8a
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
    at oracle.jdbc.oracore.OracleTypeADT.toDatum(OracleTypeADT.java:261)
    at oracle.sql.StructDescriptor.toOracleArray(StructDescriptor.java:385)
    at oracle.sql.StructDescriptor.toArray(StructDescriptor.java:560)
    at oracle.sql.STRUCT.<init>(STRUCT.java:95)
    at oracle.jpub.runtime.MutableStruct.toDatum(MutableStruct.java:65)
    null

    The JPub/JDBC runtime is converting your Java object into Oracle-specific representation (all data is put in oracle.sql.XXXX format). The top level object is an oracle.sql.STRUCT, the attributes of which are represented as an array of oracle.sql.Datum objects - in your case an oracle.sql.NUMBER and an oracle.sql.DATE. However, the error does occur in the StructDescriptor which describes the SQL type and the shape of the object. Is the error dependent on the data values? Might null values not be dealt with, correctly?
    One thing to try to do is create such an oracle.sql.STRUCT object from scratch with the same attribute values and insert/manipulate that using SQL.
    I have not dealt with TAR's. If you send me a self-contained test case, I'll check it against the current development version of JDBC. (At least you'll know if the next JDBC release fixes this issue :-) I might also file a bug.

  • Wm_Valid: Fail to convert to internal representation error while inserting

    Hi,
    I'm trying to execute an insert via XmlCommand. The table is created with this statement:
    create table testtable4 (testtable4_pk number, mydate date, myts timestamp with time zone, wm_valid wm_period);
    I have a problem while inserting on a simple table with wm_period field. The c# code is the following:
    OracleConnection oraConnection;
    OracleCommand insertCommand;
    string[] KeyColumnsList = null;
    string[] UpdateColumnsList = null;
    string xml1 = "<?xml version=\"1.0\"?>\n" +
    "<ROWSET>\n" +
    "<MYROW num = \"1\">\n" +
    "<TESTTABLE4_PK>1</TESTTABLE4_PK><MYDATE>2012-01-20T00:00:00.00000</MYDATE><MYTS>01-01-11T00:00:00.000000000 +00:00</MYTS>" +
    "</MYROW>\n" +
    "</ROWSET>\n";
    string xml2 = "<?xml version=\"1.0\"?>\n" +
    "<ROWSET>\n" +
    "<MYROW num = \"2\">\n" +
    "<TESTTABLE4_PK>2</TESTTABLE4_PK><MYDATE>2012-01-20T00:00:00.00000</MYDATE><MYTS>01-01-11T00:00:00.000000000 +00:00</MYTS><WM_VALID><VALIDFROM>01-01-11T00:00:00.000000000 +00:00</VALIDFROM></WM_VALID>" +
    "</MYROW>\n" +
    "</ROWSET>\n";
    KeyColumnsList = new string[1];
    KeyColumnsList[0] = "TESTTABLE4_PK";
    UpdateColumnsList = new string[4];
    UpdateColumnsList[0] = "TESTTABLE4_PK";
    UpdateColumnsList[1] = "MYDATE";
    UpdateColumnsList[2] = "MYTS";
    UpdateColumnsList[3] = "WM_VALID";
    try
    string ConnString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + host + ")(PORT=" + port + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + sid + ")));User Id=" + username + ";Password=" + password + ";";
    oraConnection = new OracleConnection(ConnString);
    oraConnection.Open();
    using (OracleCommand cmd = new OracleCommand())
    cmd.Connection = oraConnection;
    cmd.CommandText = "alter session set NLS_DATE_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SS.SSSSS'";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "alter session set NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SS.SSSSS'";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "alter session set NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SSXFF TZH:TZM'";
    cmd.ExecuteNonQuery();
    insertCommand = new OracleCommand();
    insertCommand.Connection = oraConnection;
    insertCommand.XmlCommandType = OracleXmlCommandType.Insert;
    insertCommand.XmlSaveProperties.KeyColumnsList = KeyColumnsList;
    insertCommand.XmlSaveProperties.RowTag = "MYROW";
    insertCommand.XmlSaveProperties.Table = "TESTTABLE4";
    insertCommand.XmlSaveProperties.UpdateColumnsList = UpdateColumnsList;
    insertCommand.XmlSaveProperties.Xslt = null;
    insertCommand.XmlSaveProperties.XsltParams = null;
    //this works
    insertCommand.CommandText = xml1;
    insertCommand.ExecuteNonQuery();
    //this fails
    insertCommand.CommandText = xml2;
    insertCommand.ExecuteNonQuery();
    insertCommand.Dispose();
    oraConnection.Close();
    oraConnection.Dispose();
    catch (Exception err)
    this.WriteLogErr("ERROR: " + err.Message);
    With the first ExecuteNonQuery I attempt an insert of a data value and a timestamp with timezone value. The execution is ok (xml1).
    When the second ExecuteNonQuery is run (with the value of wm_valid), the execution fails with this error:
    ERROR: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: Fail to convert to internal representation: 01-01-11T00:00:00.000000000 +00:00' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 111
    ORA-06512: at line 1
    The stored procedure at row 111 calls this Java method:
    oracle.xml.sql.dml.OracleXMLStaticSave.insertXML(int, java.lang.String) return int
    The structure of complex data type wm_period is:
    CREATE OR REPLACE TYPE wm_period AS OBJECT (
    validfrom TIMESTAMP WITH TIME ZONE,
    validtill TIMESTAMP WITH TIME ZONE);
    The problem is: I am able to insert a timestamp with timezone value (myts) but I'm not able to insert a wm_valid that contains two values of the same type...
    This works: <MYTS>2011-01-01T00:00:00.00000</MYTS>
    This fails: <WM_VALID><VALIDFROM>2011-01-01T00:00:00.00000</VALIDFROM></WM_VALID>
    I also tried to change the format of NLS_TIMESTAMP_TZ_FORMAT with a lot of various setup, but nothing changed.
    Thanks in advance for your precious help.
    Best Regards,
    Mario.

    Hi jschell ...thnx for ur reply......
    the getString(2) parameter is just avarchar which
    return the error from the procedure, if its ok,then
    the query is executed properly..its just a check I've
    kept to jump into the next step.If the status is OK,
    then I'm retrieving the values from the cursor. I'm
    getting right value for this parameter.I wasn't questioning the logic. I understand what you are doing.
    However JDBC drivers can have problems when items are retrieved out of order.
    You might also try switching driver types. If the thin works and oci doesn't (or visa-versa) then you know it is a driver problem and you will just have to try a work around.

  • 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.

  • Fail to convert to internal representation

    I'm using the oracle 8.1.7 jdbc driver against oracle 8.1.7.0.0 running on Windows2000. I get the exception message below when I attempt to insert an jpub object structure into a callable statement.
    java.sql.SQLException: Fail to convert to internal representation: com.neogenesis.alis.confirmation.mapping.JHitCollection@536ff3
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
    at oracle.jdbc.oracore.OracleTypeADT.toDatumArray(OracleTypeADT.java:299)
    at oracle.jdbc.oracore.OracleTypeUPT.toDatumArray(OracleTypeUPT.java:137)
    at oracle.sql.ArrayDescriptor.toOracleArray(ArrayDescriptor.java:750)
    at oracle.sql.ARRAY.<init>(ARRAY.java:116)
    Is this a bug of JDBC driver? Any Clue?
    Thanks,
    -Charlie

    From the stacktrace, it looks like a problem. However, if you can provide more code for this. We can figure out what went wrong. By the way, did you try this on Windows NT?
    -cc

  • 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.

  • 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

  • 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.

  • 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.

  • Central Administraion Internal server error 500 | event id 5586 sharepoint foundation unknown sql exception 2812 could not find stored procedure dbo.proc_gettimerlock

    Hi,
    We have two SharePoint 2010 SP2 servers with one SQL 2012 Backend.
    Recently we cannot open the central administration, getting 500 internal server error and multiple SQL errors in event viewer:
    event id 5586 sharepoint foundation unknown sql exception 2812 could not find stored procedure dbo.proc_gettimerlock
    event id 5586 sharepoint foundation unknown sql exception 2812 occured could not find stored procedure 'proc_fetchdocforhttpget'
    Also I cannot run SharePoint configuration wizard, getting this error: sharepoint 2010 failed to resgister sharepoint services
    In the log file, I found this error "an exception of type microsoft.sharepoint.spexception was thrown 0x80131904"
    Any ideas?
    Thanks, Shehatovich

    As You can see below stored procedure has its specific Permission's, check user who is performing action as well as CentralAdministation Pool has right permission and their permissions are not modified from SQL Server.
    -Samar
     =
    Sr. Software engineer

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

  • SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)

    SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)
    SELECT    
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO AS T0 LEFT OUTER JOIN
                          VPM2 AS T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
         OVPM AS T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1 AS T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate>='[%0]' and T0.DocDate<='[%1]'

    Hi,
    Try this:
    SELECT   
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO  T0 LEFT OUTER JOIN
                          VPM2  T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry
    LEFT OUTER JOIN
         OVPM  T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1  T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate >= '[%0]' and T0.DocDate <='[%1]'
    group by T0.DocStatus,T0.DocDate ,
    T0.DocNum ,
    T0.NumAtCard,
    T0.TransId ,
    T0.Comments ,
    T0.CardCode,
    T0.CardName ,
    T0.WTSum ,
    T3.DueDate ,
    T3.CheckSum
    Thanks & Regards,
    Nagarajan

  • EM: Creation process for a physical standby DB failed with SQL Exception

    Version: EM Oracle 10.2.5 (agents running, repository running, primary db running, all targets visible and reachable with EM)
    I try to create a physical standby database with the enterprise manager and each time the process is aborted with a SQL exception during the preparation of the job by the EM. I have added a part of the OMs log containing the error at the end of the excerpt.
    =============
    2010-04-29 16:00:39,856 [EMUI_16_00_39_/console/targets] WARN pref.SubtabPref getFolders.710 - Unknown folder id: VirtualServers retrieved from repository
    2010-04-29 16:01:04,765 [EMUI_16_01_04_/console/database/dataguard/create] ERROR em.dataguard validate.1329 - CreateBean: ClassNotFoundException: null
    2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone checkSetFileError.79 - DatabaseFileAttributes.checkSetFileError(): Null database file!
    2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone setControlfiles.160 - DatabaseFileAttributes.setDatafiles(): Invalid control file!
    2010-04-29 16:02:05,492 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone getControlFileNames.616 - DatabaseFileAttributes.getDatafileNames(): null datafile names!
    2010-04-29 16:02:32,823 [Thread-28] ERROR em.jobs remoteOp.2389 - DBVerify.remoteOp(): Error: max_stamp# 6071384
    2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3297 - DBCloneObject.submitJobPreparation(): getMaxLogSequenceNum: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3501 - DBCloneObject.submitJobPreparation(): Exception: java.lang.Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitDBCloneJob.3716 - DBCloneObject.submitDBCloneJob(): Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    2010-04-29 16:02:37,496 [EMUI_16_02_37_/console/database/dataguard/create] ERROR em.dataguard onEvent.1243 - CreateConfigController: Exception: oracle.sysman.db.dg.util.VxxStandbyException: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    =========
    I have set the agent perl script tracing to DEBUG, but can't find any reason, why the job preparation failed.
    Has anyone an idea why the job cannot be prepared? Thanks in advance for investigation :-)

    gromit wrote:
    Is there a difference if:
    I install EM Version 10.2.0.1/10.2.0.2 -> upgrade it to 10.2.0.3 -> upgrade it to 10.2.0.5
    OR
    I install EM Version 10.2.0.1/10.2.0.2 and directly upgrade it to 10.2.0.5 ???Hi,
    Both are same. Result will be same. Finally you are reaching 10.2.0.5 version..
    But I would suggest to choose 2nd option.. i.e. install EM Version 10.2.0.1/10.2.0.2 and directly upgrade it to 10.2.0.5.
    Because it will save your time..
    Regards
    Rajesh

Maybe you are looking for

  • How to Batch "Package" more that 1 file at a time?

    As part of out new Digital Asset Management (DAM) system we are trying to find a way of Batch Processing groups of Illustrator files (version Mac CC 14) into Packages (separate folders with links). The new "packaged" folders in a new location then ne

  • Report: Vendor Evaluation

    Dear Expert, I am preparing a new report with sum of amount (Paid Amount and Contract Amount separately ) to particular vendor with specified time period against PO/WO. Actually, I am confused for the field of paid & contract amount. Kindly, guide me

  • PSE 4 on Mac, VCD or other Slideshow options?

    I bought a Wacom tablet which comes with Photoshop Elements 4 for Mac and PC. I installed on Mac first and found some cool features like being able to export a slideshow in .wmv format which I would like to use. I then installed it on my Mac and foun

  • Appletv out put to audio and video

    Hi Have an ATV2 and have the HDMI going to tv. Sorted, lovely. Am going to get a BOSE sound bar under the telly, and I want to connect the ATV to the TV and the sound bar so that I can play iTunes music throu AirPlay to the ATV in the lounge without

  • NHL Gamecenter Live problems

    Curious if anyone began to have problems with NHL Gamecenter Live last night.  I was able to watch games through aTV2 until about 9:30 PM EST last night, and then, all of a sudden, when I go into the games option to attempt to watch live content, I g