JDBC Thin & NLS & Linux

I wrote Java application, which uses JDBC Thin 8.1.5 and runs on
Linux. When I inserts Russian text into table, JDBC inserts some
undefined (big black boxes in SQLPLUS output) characters. Output
from same table in my Java application seems to "???".
Oracle database (8.1.5 on RedHat 6.0) created in CL8KOI8R
charset.
All environment variables are valid:
NLS_LANG=RUSSIAN_CIS.CL8KOI8R
LC_ALL=ru_RU
CLASSPATH includes path to nls_charset11.zip
Russian works fine in SQLPLUS and Perl DBD::Oracle applications
on the same machine.
What I can do?
null

Have you tried more recent JDBC versions? Several NLS issues were fixed in post 8.1.5 JDBC releases (including, I believe, a problem with Hebrew). The JDBC folks would be able to give you more specific information about where which fixes appeared.
It should be worth a try, though, to check out a newer JDBC version, particularly if you are using the thin driver.

Similar Messages

  • JDBC Thin/OCI - Linux

    There are downloads for the latest JDBC drivers for Oracle provided for Solaris and NT.
    We only seem to be able to download a thin driver on Linux - is there an OCI version going to be becoming available or have I missed something?
    Thanks
    Jason.

    There are downloads for the latest JDBC drivers for Oracle provided for Solaris and NT.
    We only seem to be able to download a thin driver on Linux - is there an OCI version going to be becoming available or have I missed something?
    Thanks
    Jason.

  • Jdbc thin driver - nls parameters

    Hi,
    Does anyone have the experience on how the Oracle JDBC Thin Driver decide its NLS session related parameters? It looks to us that it will have its own settings which override the instance-level settings? If we want to set some specific settings (for example, NLS_DATE_FORMAT), is there any way besides setting them up via "alter session"?
    Best Regards
    A.C.

    Did you try the ALTER SESSION command ? For example , you just need to execute 2 SQL statements at the beginning of each SQL sessions to establish the correct locale environment ..
    ALTER SESSION SET NLS_LANGUAGE = french;
    ALTER SESSION SET NLS_TERRITORY = france;

  • JDBC thin drivers for oracle 8.0.5 for linux

    I want to use Java SDK 1.2.2 and need the oracle thin drivers.
    I have trouble with the 816 thin drivers connecting to the 8.0.5
    server.
    when using statement.executeQuery(..... I get the following
    Exception.
    Exception error: java.sql.SQLException: ORA-03120: two-task
    conversion routine:integer overflow
    I think my solution is to upgrade to a 8.1.6 server or use the
    java 1.1.6 driver on the JDK1.1.6
    I tried downoading the 8.1.5 enterprise server but this fails to
    complete.
    Can someone help me to this version on CDROM or to the JDBC thin
    driver for the 8.0.5 server?
    null

    You must include "classes12.zip" instead of "classes111.zip".
    Since "classes111.zip" is required only for Java 1
    and "classes12.zip" is required for Java 2 which means from J2SE 1.2 on forward.
    In adition you might need to inlcude "nls_charset12.zip" as well. Try it first without and if it is not working include it as well.
    The required files can you get from the OTN.
    This should help
    Roger

  • Oracle Not Avaliable on 8.1.6 for Linux with JDBC Thin Connection

    HI All,
    While I m trying to connect the Oracle 8.1.6 server with the JDBC Thin driver I m getting Error
    ORA - 01034 Oracle not Available.
    I m using jdk 1.2.2 and in the Classpath I have given the path for classes12.zip.
    I have tried using classes111.zip file though I m getting same Error Message.
    Anybody can help me out.
    Thanx,
    Chirag oza
    null

    did you have your oracle database running?
    01034, 00000, "ORACLE not available"
    // *Cause: Oracle was not started up. Possible causes include the following:
    // - The SGA requires more space than was allocated for it.
    // - The operating-system variable pointing to the instance is
    // improperly defined.
    // *Action: Refer to accompanying messages for possible causes and correct
    // the problem mentioned in the other messages.
    // If Oracle has been initialized, then on some operating systems,
    // verify that Oracle was linked correctly. See the platform
    // specific Oracle documentation.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by chirag oza ([email protected]):
    HI All,
    While I m trying to connect the Oracle 8.1.6 server with the JDBC Thin driver I m getting Error
    ORA - 01034 Oracle not Available.
    I m using jdk 1.2.2 and in the Classpath I have given the path for classes12.zip.
    I have tried using classes111.zip file though I m getting same Error Message.
    Anybody can help me out.
    Thanx,
    Chirag oza
    <HR></BLOCKQUOTE>
    null

  • JDBC Drviers and Linux

    What driver should I use for O8.1.6 using RedHat 6.2 Linux
    Thanks
    P.S. Please respond to [email protected]

    the jdbc driver readme file:
    Oracle JDBC Drivers release 8.1.7 README
    ========================================
    What Is New In This Release?
    These are the major new features/enhancements in this release:
    - Statement Caching
    * Implicit Statement Caching
    * Explicit Statement Caching
    - Full XA Support
    * Including XA Recover and Forget
    * OracleXid independent implementation for 8.1.7 servers and above
    - Connection Caching
    * New Scheme (FIXED_WAIT_SCHEME)
    * Statement Caching coupling
    - PLSQL Tables Support for Scalar types (for OCI driver only)
    - User-Defined Datatypes Performance Enhancement
    - Object Types Extensions
    * Serializable Type Descriptors
    * Accessing collection elements in Java primitive types
    * Buffering and indexing collection elements
    * Creating empty Lobs
    - Support for 56-bit encryption algorithms for connection using
    the Thin JDBC driver.
    These are the major bug fixes:
    - BUG-903011
    The JDBC Thin driver could not be used with usernames that
    contained Latin-1 characters when the server used UTF8 character
    set. This problem has been fixed in release 8.1.7.
    - BUG-1052489
    There was a problem with PreparedStatements being executed
    multiple times and the length of one of the bind variables (bound
    with setBinaryStream or setCharacterStream) increased. This
    problem has been fixed in release 8.1.7.
    - BUG-1069768
    There was a problem with insertion of ADTs with an image bigger
    than 4K with the JDBC Thin driver. This problem has been fixed
    in release 8.1.7.
    - BUG-1247015
    When using ResultSet::getObject() to access CHAR or VARCHAR columns
    in scrollable result sets, ResultSet::getObject() returned null.
    - BUG-1349713
    getString() of scrollable result sets returns incorrect values if
    the column data contains multibyte characters.
    Driver Versions
    These are the driver versions in the 8.1.7 release:
    - JDBC OCI Driver 8.1.7
    Client-side JDBC for use on a machine where OCI 8.1.7 is installed.
    - JDBC Thin Driver 8.1.7
    100% Java client-side JDBC for use in applets and applications.
    - JDBC Thin Server-side Driver 8.1.7
    JDBC for use by Java Stored Procedures or by Java CORBA objects
    running in Oracle 8.1.7. This driver is typically used in a middle
    tier server.
    - JDBC Server-side Internal Driver 8.1.7
    Server-side JDBC for use by Java Stored procedures or by Java CORBA
    objects running in Oracle 8.1.7. This driver used to be called the
    "JDBC Kprb Driver".
    For complete documentation, please refer to "JDBC Developer's Guide
    and Reference".
    Contents Of This Release
    The [ORACLE_HOME]/jdbc/lib directory contains:
    - classes111.zip
    Classes for use with JDK 1.1.x. It contains the JDBC driver
    classes except classes necessary for NLS support in Object and
    Collection types.
    - nls_charset11.zip
    NLS classes for use with JDK 1.1.x. It contains classes necessary
    for NLS support in Object and Collection types.
    - classes111_g.zip
    Same as classes111.zip, except that classes were compiled with
    "javac -g".
    - classes12.zip
    Classes for use with JDK 1.2.x. It contains the JDBC driver
    classes except classes necessary for NLS support in Object and
    Collection types.
    - nls_charset12.zip
    NLS classes for use with JDK 1.2.x. It contains classes necessary
    for NLS support in Object and Collection types.
    - classes12_g.zip
    Same as classes12.zip, except that classes were compiled with
    "javac -g".
    Note that the packaging of the JDBC classes to support NLS was
    changed in 8i. The classes pertaining to specific character sets
    support in Object and Collection types have been separated from the
    basic zip files. These NLS classes are now packaged into the
    extension zip files. This allows the user to include the NLS
    classes only if necessary. Please refer to the "NLS Extension Zip
    Files (for client-side only)" for further details.
    [ORACLE_HOME]/lib directory contains libocijdbc8.so and
    libocijdbc8_g.so (on Solaris), which are the shared libraries used by
    the JDBC OCI driver.
    [ORACLE_HOME]/jdbc/doc/javadoc.tar contains the JDBC Javadoc. This
    release contains a beta release of the Javadoc files for the public
    API of the public classes of Oracle JDBC.
    [ORACLE_HOME]/jdbc/demo/demo.tar contains sample JDBC programs.
    Demo programs written for JDK 1.1 must be modified to run in JDK 1.2.
    Please refer to the "Support For JDK 1.2" for porting details.
    NLS Extension Zip Files (for client-side only)
    The JDBC Server-side Internal Driver provides complete NLS support.
    It does not require any NLS extension zip files, nls_charset*.zip.
    Discussions in this section do not apply to the JDBC Server-side
    Internal Driver. You can skip this section if you only use the
    Server-side Internal Driver.
    The basic zip files, classes111.zip and classes12.zip, contain all the
    necessary classes to provide complete NLS support for:
    - Oracle Character sets for CHAR/VARCHAR/LONGVARCHAR/CLOB type data
    that is not retrieved or inserted as a data member of an Oracle 8
    Object or Collection type.
    - NLS support for CHAR/VARCHAR data members of Objects and
    Collections for a few commonly used character sets. These
    character sets are: US7ASCII, WE8DEC, WE8ISO8859P1 and UTF8.
    Users must include the appropriate extension zip in their CLASSPATH
    if utilization of other character sets in CHAR/VARCHAR data members
    of Objects/Collections is desired. It is important to note that
    extension zip files are large in size due to the requirement of
    supporting a large number of character sets. Users may choose to
    include only the necessary classes from the extension zip file.
    To do so, users can first unzip the extension zip file, and then put
    only the necessary classes in the CLASSPATH. The character set
    extension class files are named in the following format:
    CharacterConverter<OracleCharacterSetId>.class
    where <OracleCharacterSetId> is the hexidecimal representation of the
    Oracle character set id of the corresponding character set.
    Installation
    Please do not try to put multiple versions of the Oracle JDBC drivers
    in your CLASSPATH. The Oracle installer installs the JDBC Drivers in
    the [ORACLE_HOME]/jdbc directory.
    Setting Up Your Environment
    On Win95/Win98/NT:
    - Add [ORACLE_HOME]\jdbc\lib\classes111.zip and
    [ORACLE_HOME]\jdbc\lib\nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x is used.)
    - Add [ORACLE_HOME]\jdbc\lib to your PATH.
    On Solaris/Digital Unix:
    - Add [ORACLE_HOME]/jdbc/lib/classes111.zip and
    [ORACLE_HOME]/jdbc/lib/nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x is used.)
    - Add [ORACLE_HOME]/jdbc/lib to your LD_LIBRARY_PATH.
    On HP/UX:
    - Add [ORACLE_HOME]/jdbc/lib/classes111.zip and
    [ORACLE_HOME]/jdbc/lib/nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x is used.)
    - Add [ORACLE_HOME]/jdbc/lib to your SHLIB_PATH and LD_LIBRARY_PATH.
    On AIX:
    - Add [ORACLE_HOME]/jdbc/lib/classes111.zip and
    [ORACLE_HOME]/jdbc/lib/nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x is used.)
    - Add [ORACLE_HOME]/jdbc/lib to your LIBPATH and LD_LIBRARY_PATH.
    Some Useful Hints In Using the JDBC Drivers
    Please refer to "JDBC Developer's Guide and Reference" for details
    regarding usage of Oracle's JDBC Drivers. This section only offers
    useful hints. These hints are not meant to be exhaustive.
    These are a few simple things that you should do in your JDBC program:
    1. Import the necessary JDBC classes in your programs that use JDBC.
    For example:
    import java.sql.*;
    import java.math.*;
    2. Register the Oracle driver before before calling other JDBC APIs.
    (This is not needed if you are using the JDBC Server-side Internal
    Driver because registration is done automatically in the server.)
    To register the Oracle driver, make sure the following statement
    is executed at least once in your Java session:
    DriverManager.registerDriver(
    new oracle.jdbc.driver.OracleDriver());
    3. Open a connection to the database with the getConnection call.
    Different connection URLs should be used for different JDBC
    drivers. The following examples demonstrate the different URLs.
    For the JDBC OCI8 Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:oci8:@<database>",
    "scott", "tiger");
    where <database> is either an entry in tnsnames.ora or a SQL*net
    name-value pair.
    For the JDBC Thin Driver, or Server-side Thin Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:thin:@<database>",
    "scott", "tiger");
    where <database> is either a string of the form
    <host>:<port>:<sid> or a SQL*net name-value pair.
    For the JDBC Server-side Internal Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:kprb:");
    Note that the trailing ':' character is necessary. When you use
    the Server-side Internal Driver, you always connect to the
    database you are executing in. You can also do this:
    Connection conn
    = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    Java Stored Procedures
    Please note that examples for callins and instance methods using Oracle
    8 Object Types are provided in:
    [ORACLE_HOME]/javavm/demo/demo.zip
    Once unzipped, the directory containing the examples is:
    [ORACLE_HOME]/javavm/demo/examples/jsp
    Known Problems/Limitations In This Release
    The following is a list of known problems/limitations:
    1. There is a limitation regarding the use of stream input for LOB
    types. Stream input for LOB types can only be used for 8.1.7
    JDBC OCI driver connecting to an 8.1.7 Oracle server. The use of
    stream input for LOB types in all other configurations may result
    in data corruption. PreparedStatement stream input APIs include:
    setBinaryStream(), setAsciiStream(), setUnicodeStream(),
    setCharacterStream() and setObject().
    2. BUG-1018797
    Extra characters may be appended to the end of a CLOB value
    mistakenly under the following conditions:
    - setCharacterStream() is used to insert a CLOB value, and
    - The Oracle server uses multi-byte character set.
    (See 1 for limitation of stream input for LOB type.)
    3. Programs can fail to open 16 or more connections using our
    client-side drivers at any one time. This is not a limitation
    caused by the JDBC drivers. It is most likely that the limit of
    per-process file descriptors is exceeded. The solution is to
    increase the limit.
    4. The Server-side Internal Driver has the following limitation:
    - Data access for LONG and LONG RAW types is limited to 32K of
    data.
    - Inserts of Object Types (Oracle 8 Objects, Collections and
    References) will not work when the database compatibility mode
    is set to 8.0. This limitation does not apply when the
    compatibility mode is set to 8.1.
    - Statement.cancel() is not implemented.
    - In a chain of SQLExceptions, only the first one in the chain
    will have a getSQLState value.
    5. The JDBC OCI driver on an SSL connection hangs when the Java
    Virtual Machine is running in green threads mode. A work-around
    is to run the Java Virtual Machine in native threads mode.
    6. Date-time format, currency symbol and decimal symbols are always
    presented in American convention.
    7. When using OracleStatement.defineColumnType(), it is not necessary
    to define the column type to be the same as the column type
    declared in the database. If the types are different, the
    retrieved values are converted to the type specified in
    defineColumnType.
    Note: Most reasonable conversions work, but not all. If you find
    a conversion that you think is reasonable, but that does not wo rk,
    please submit a TAR to Oracle Support.
    8. The utility dbms_java.set_output or dbms_java.set_stream that is
    used for redirecting the System.out.println() in JSPs to stdout
    SHOULD NOT be used when JDBC tracing is turned on. This is
    because the current implementation of dbms_java.set_output and
    set_stream uses JDBC to write the output to stdout. The result
    would be an infinite loop.
    9. The JDBC OCI and Thin drivers do not read CHAR data via binary
    streams correctly. In other word, using getBinaryStream() to
    retrieve CHAR data may yield incorrect results. A work-around is
    to use either getCHAR() or getAsciiStream() instead. The other
    alternative is to use getUnicodeStream() although the method is
    deprecated.
    10. BUG-899078 (since 8.1.6 SDK):
    The JDBC Server-side Internal driver has extra space padding with
    PL/SQL CHAR OUT (2 to 3 space depending on character set).
    Problem occurs in most of the multibyte database character set
    except UTF8.
    11. There is a limitation for Triggers implemented in Java and Object
    Types. It only affects the IN argument types of triggers
    implemented using Java on the client-side. The restriction does
    not apply to JDBC programs running inside the server. Triggers
    implemented as Java methods cannot have IN arguments of Oracle 8
    Object or Collection type. This means the Java methods used to
    implement triggers cannot have arguments of the following types:
    - java.sql.Struct
    - java.sql.Array
    - oracle.sql.STRUCT
    - oracle.sql.ARRAY
    - oracle.jdbc2.Struct
    - oracle.jdbc2.Array
    - any class implementing oracle.jdbc2.SQLData or
    oracle.sql.CustomDatum
    12. The scrollable result set implementation has the following
    limitation:
    - setFetchDirection() on ScrollableResultSet is not supported.
    - refreshRow() on ScrollableResultSet does not support all
    combinations of sensitivity and concurrency. The following
    table depicts the supported combinations.
    Support Type Concurrency
    no TYPE_FORWARD_ONLY CONCUR_READ_ONLY
    no TYPE_FORWARD_ONLY CONCUR_UPDATABLE
    no TYPE_SCROLL_INSENSITIVE CONCUR_READ_ONLY
    yes TYPE_SCROLL_INSENSITIVE CONCUR_UPDATABLE
    yes TYPE_SCROLL_SENSITIVE CONCUR_READ_ONLY
    yes TYPE_SCROLL_SENSITIVE CONCUR_UPDATABLE
    13. BUG-1324918
    Repeatedly updating a clob with jdbc-oci, prepared statement,
    and setCharacterStream consumes the temporary tablespace. If
    you repeatedly update the clob, either the temp tablespace will
    continue to grow, or you may get a Exception in thread "main"
    java.sql.SQLException: ORA-01652: unable to extend segment if
    you have a limit on the tablespace size. The work-around is to
    use oracle.sql.CLOB::setCharacterOutputStream() instead.

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • Jdbc oracle jdbc-thin driver subname

    I am working on Windows 2000 environment, using oracle8i 8.1.7 JDBC-Thin driver for use with JDK 1.2.x. The oralce8i 8.1.7 database is on another linux box. I can access the linux box through its ip address, but not by its hostname since it's not accessiable by the dns server. In my code, in the JDBCUrl, I used ip address instead of the hostname, e.g. "jdbc:oracle:thin:@10.0.113.108:1521:ora1". But I got the error like: "java.sql.SQLException: Io exception: The Network Adapter could not establish the connection". If I add a entry in my working machine's hosts file to map the hostname, I can fix the problem. But I don't know if this is the solution, or there is other better solutions.
    Thanks
    null

    Using a hosts file entry is a common solution for problem where the dns lookup does not contain an entry for a RDBMS server platform.
    The real solution is to resolve this issue :
    "where the dns lookup does not contain an entry for a RDBMS server platform."

  • JDBC thin driver, failUTF8Conv

    I browse through JDBC some records from an Oracle 8.1.7 DB with NLS_CHARACTER=EL8ISO8859P7 and greek data.
    Some records (columns are type varchar2) are displayed ok, but at some other certain records, an exception occurs and I get:
    "JBO-27022: Failed to load value at index 3 with java object of type java.lang.String due to java.sql.SQLException.
    Error Message: Fail to convert between UTF8 and UCS2:failUTF8Conv"
    How can this be solved?
    (Oracle 8.1.7 on linux, Oracle JDBC thin driver)

    See posting in Oracle java help.

  • JDBC DRIVERS 와 NLS 의 관계

    제품 : JDBC
    작성날짜 : 2003-08-06
    JDBC DRIVERS 와 NLS 의 관계
    ==========================
    PURPOSE
    JDBC drivers 가 지원하는 National Language Support (NLS) 에 대해서
    알아봅니다.
    JDBC Drivers 는 NLS 와 conversion 을 지원합니다.
    JDBC Drivers 는 NLS 를 지원합니다. 오라클이 지원하는 character set
    을 가진 database 라면 어떤 character set 에서라도 data 를 입력, 출력
    할 수 있습니다.
    ASCII 나 ISO-Latin-1 databases 의 경우에는 conversion 이 일어나지
    않아 간단합니다.
    NLS database 라고 하면 일반적으로 non-ASCII database 나
    non-ISO-Latin-1 databases 를 의미 합니다.
    ( 예를 들어 Japanese, Korean 같은 ..)
    JDBC program 에서는 database 가 어떤 character set 을 사용하던지
    간에 target character set 은 항상 Java unicode (UCS-2) 입니다.
    이것은 CHAR 과 VARCHAR2 data 에 한합니다.
    RAW data 의 경우에는 conversion 이 일어나지 않습니다.
    JDBC OCI Driver 와 NLS
    JDBC OCI 의 경우 database 가 특정 character set 을 가지고
    client 또한 고유의 character set 을 가집니다.
    client 의 character set 은 database 와 다를 수 있습니다.
    client 의 character set 은 install 시에 결정되며,
    database 의 character set 은 database 생성시에 결정됩니다.
    따라서 JDBC driver 는 적절한 conversion 을 해주어야 합니다.
    JDBC OCI driver 가 character set conversion 할때 다음 3가지
    사항들을 고려 합니다.
    - database character set 과 language
    - client side character set 과 language
    - JAVA unicode (UCS-2)
    JDBC OCI 를 사용할 경우 data 가 server 에서 client 로 전달될때
    database 의 character set 으로 전달되게 됩니다.
    data 는 client 에 도착할때 까지는 conversion 이 일어나지 않습니다.
    client side 에 도달하면 표준 Oracle conversion routines 을 사용하는
    OCI routines 에 의해 database character set 에서 client character set
    으로 변환되게 됩니다.
    JDBC 개발자들은 각각의 database character set 에 따라 각각 다른
    conversion programs 을 사용하는 것이 아니라 한가지 character set 에서
    Java unicode (UCS-2) 로 변환하는 한가지의 conversion routine
    사용하도록 했습니다.
    오라클이 지원하는 많은 수의 언어들을 encoding 하게 해주는 이 character set
    는 UTF8 (Oracle 7 에서는 AL24) 입니다.
    NLS_LANG 에 따라 data 변환은 다릅니다.
    NLS_LANG 이 설정이 안되어 있거나 ASCII 나 ISO-Latin-1 character set 로
    설정되어 있는 경우에는 JDBC OCI driver 는 ISO-Latin-1 나 ASCII 로 부터
    Java 내에서 UCS-2 로 직접 변환합니다.
    ISO-Latin-1 나 ASCII 로 부터의 변환은 최적화되어 있습니다.
    NLS_LANG 이 ASCII 나 ISO-Latin-1 character set 이외의 character set
    으로 설정되어 있을 경우에는 driver 가 client 에서 NLS_LANG parameter
    를 UTF-8 로 변경합니다. 이것은 JDBC program 에 한하며, system 의
    NLS_LANG 환경에는 영향을 주지 않습니다.
    이것은 자동으로 일어나므로 user 는 해줄일이 없습니다.
    OCI 는 NLS_LANG parameter 값을 읽어와 data 를 database character set
    에서 UTF-8 로 변환해 줍니다. 이 변환은 C 에서 이루어지며 Java 에서
    이루어지는것이 아닙니다. 그 이유는 Java 내에서 이루어지는 변환의
    회수를 줄이기 위해서 입니다.
    그리고 난 후에 JDBC OCI driver 는 UTF-8 data 를 UCS-2 로 변환합니다.
    JDBC Thin Driver 와 NLS
    JDBC thin 에서는 UTF8 로의 변환이 server side 에서 일어나게 됩니다.
    그러나 만일 database 가 ASCII 나 ISO-Latin-1 character set 를 사용하고
    있다면 server side 에서의 변환은 일어나지 않습니다.
    client 에서 JDBC driver 는 UTF8 을 UCS-2 로 바꾸게 됩니다.
    ==================================================================
    주의: OCI 와 Thin drivers 는 모두 동일하게 NLS 를 지원합니다.
    ==================================================================
    Server Driver 와 NLS
    server 에서 실행되는 JDBC code 가 database 에 접속할때
    JDBC Server dirver 는 database character set 를 기반으로
    character set 변환을 수행합니다.
    모든 Java programs 의 target character set 은 UCS-2 입니다.
    JDBC Server driver 는 ASCII 와 ISO-Latin-1 character sets 만을
    지원합니다.
    database server 에 있는 Java VM 이 ASCII 와 ISO-Latin-1 character set
    만을 지원하기 때문입니다.
    Related Documents
    "JDBC Developer's Guide and Reference" , (A64685-01), Chapter 5, Advanced
    Topics, 'Using NLS'.
    "National Language Support Guide", (A67789-01).

  • Oracle JDBC Driver for Linux

    I'm looking for a place to download an Oracle JDBC driver for Linux. I have installed Oracle 8.1.5 for Linux, but don't find the driver either in the installation, nor on the CD. Can anyone point me to someplace I might be able to find it?
    Also, generic help in setting this up to work, JDBC API calls would also be of great help.
    Thanks.

    Luis Claudio Rodrigues da Silveira (guest) wrote:
    : How can I configure JDBC driver in a Suse environment? What
    are
    : the necessary steps?
    : Thanks in advance.
    1) You need classes111.zip usually located at
    $ORACLE_HONE/jdbc/lib.
    2) Add classes111.zip to CLASSPATH and export
    3) If you use thin driver your code should look like:
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    // Connect to the database
    // You must put a database name after the @ sign in the
    connection URL.
    // You can use either the fully specified SQL*net syntax or
    a short cut
    // syntax as <host>:<port>:<sid>. The example uses the
    short cut syntax.
    Connection conn =
    DriverManager.getConnection
    (jdbc:oracle:thin:@hostname:port:ORACLE_SID,
    USER_NAME, PASSWOED);
    null

  • RMS installation error: JDBC-thin client oracle/jdbc/driver/T2CConnection.getLibraryVersionNumber()

    Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
    Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
    Checks performed:
    RMS Application code location and directory contents:
    [oracle@test-rms-app application]$ pwd
    /binary_files/STAGING_DIR/rms/application
    [oracle@test-rms-app application]$ ls -ltr
    total 144
    -rw-r--r-- 1 oracle oinstall   272 Dec 7  2010 version.properties
    -rw-r--r-- 1 oracle oinstall   405 Jan 16 2011 expected-object-counts.properties
    -rw-r--r-- 1 oracle oinstall   892 May 13 2011 ant.install.properties.sample
    -rw-r--r-- 1 oracle oinstall 64004 Jun  6  2011 build.xml
    drwxr-xr-x 9 oracle oinstall  4096 Jun 16 2011 rms13
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 installer-resources
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 antinstall
    drwxr-xr-x 2 oracle oinstall  4096 Jun 16 2011 ant-ext
    drwxr-xr-x 5 oracle oinstall  4096 Jun 16 2011 ant
    -rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
    -rwxr-xr-x 1 oracle oinstall  4249 Dec 18 10:01 install.sh
    drwxr-xr-x 4 oracle oinstall  4096 Dec 18 10:06 common
    -rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
    -rw-r--r-- 1 oracle oinstall   689 Dec 19 10:37 ant.install.log
    [oracle@test-rms-app application]$
    Application installation:
    [oracle@test-rms-app application]$ ./install.sh
    THIS IS the driver directory
    Verified $ORACLE_SID.
    Verified SQL*Plus exists.
    Verified write permissions.
    Verified formsweb.cfg read permissions.
    Verified Registry.dat read permissions.
    Verified Java version 1.4.2.x or greater. Java version - 1.6.0
    Verified Tk2Motif.rgb settings.
    Verified frmcmp_batch.sh status.
    WARNING: Oracle Enterprise Linux not detected.  Some components may not install properly.
    Verified $DISPLAY - 172.16.129.82:0.0.
    This installer will ask for your "My Oracle Support" credentials.
    Preparing installer. This may take a few moments.
    Your internet connection type is: NONE
    Integrating My Oracle Support into the product installer workflow...
         [move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
    Installer preparation complete.
    MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
    ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
    ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
    DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
    WLS_INSTANCE=WLS_FORMS
    ORACLE_SID=rmsdbtst
    JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
    Launching installer...
    To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
    [oracle@test-rms-app application]$ tnsping rmsdbtst
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
    OK (0 msec)
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ ping test-rms-db
    PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
    --- test-rms-db.vonmaur.vmc ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ uname -a
    Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ cat /etc/*-release
    Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
    Red Hat Enterprise Linux Server release 5.3 (Tikanga)
    [oracle@test-rms-app application]$
    The database is created and all the batch file scripts have been successfully deployed.  Now working on the application server.  The  Weblogic server is installed and 11g forms and reports are installed successfully.
    Any help would be helpful.
    Thanks,
    Ram.

    Please check MOS Notes:
    FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1)

  • JDBC thin on Oracle

    I loaded Oracle8, I start the TNS-Listener ($lsnrctl start), I am
    not using Oracle names server.
    I test the connection to Oracle8 whith JDBC thin, I use the
    sample $ORACLE_HOME/jdbc/samples/thin/JdbcApplet.java
    No problem on localhost, but i have problem (no connect on
    Oracle8) whith another host on my network.
    Please help me,
    Abdallah
    null

    Abdallah (guest) wrote:
    : I loaded Oracle8, I start the TNS-Listener ($lsnrctl start), I
    am
    : not using Oracle names server.
    : I test the connection to Oracle8 whith JDBC thin, I use the
    : sample $ORACLE_HOME/jdbc/samples/thin/JdbcApplet.java
    : No problem on localhost, but i have problem (no connect on
    : Oracle8) whith another host on my network.
    : Please help me,
    : Abdallah
    I am not sure this if this is what is causing you trouble, but
    I had to fix OOB (out-of-band breaks, the way Net8 handles
    Crtl-C) setting on my Linux machines for them to
    talk to each other using Net8.
    I had to put "disable_oob = ON" in my sqlnet.ora to get Net8
    working.
    Good Luck !
    Anwar.
    null

  • JDBC Drivers for Linux

    How come Oracle's web site only has downloads for NT and Solaris. Where do I get the latest JDBC driver for Linux?

    You should be able to use clases111.zip from AIX or NT with your
    Linux client, just copy the file, and add it to your CLASSPATH.
    I'm using classes111.zip from AIX (8.1.5) on NT and Win95
    clients.
    This will work for the thin client, the oci8 needs SQL*Net
    (and some more support libs.) installed to work
    Hilsen Jan
    Greg Patrick (guest) wrote:
    : Well that's no good! I don't have the database client
    : for Linux. Our 8.0.5 DB is on AIX. We have Windows NT
    : 8.0.5 client CD's. I shouldn't need an entire 8.0.5
    : Linux client installation just to use JDBC, should I?
    : JDBC drivers are available for download for NT and Solaris,
    : why not Linux?
    : John Salvo (guest) wrote:
    : : They are included with the 8 and 8i installations.
    : : Greg Patrick (guest) wrote:
    : : : I can't find any JDBC drivers for Linux on the Oracle
    : Technet
    : : : site... It seems very strange that Oracle would have an
    : : : 8i database for Linux but not have JDBC drivers. Is this
    : true?
    : : : All I want is for a java program on a Linux machine to be
    : : : able to use the OCI drivers to talk to the database on
    : another
    : : : machine. Even JDBC thin drivers would be better than
    : nothing.
    : : : Where are they?
    : : : Thanks,
    : : : Greg Patrick
    : : : http://www.abe.com
    null

  • Does oracle 8.1.6.0 jdbc thin driver support jdk1.3 and oracle 8.0.5 database ?

    I have downloaded oracle 8.1.6.0 jdbc thin driver(named classes12.zip) to run with jdk1.3 to access oracle 8.0.5, but when I compile and run the jdbccheckup.java downloaded from oracle website like this:
    javac -classpath d:\jdbc\classes12.zip jdbccheckup.java
    (compile succeed)
    java -classpath d:\jdbc\classes12.zip jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

    Try this isntead.
    java -classpath d:\jdbc\classes12.zip;. jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

Maybe you are looking for

  • YouTube is not working properly of my Safari. Can you help fix it?

    So for some reason YouTube is not working properly on my Safari. I don't know why but its normal for Chrome. Can anyone help me fix this? Here is what is happening.

  • Mobileme widget

    hi, when i insert a mobileme widget, I only can see my videos but my photos albums remain black : no pictures are visible as it is shown in the tutorial. I only can click on the link to go to my gallery photo album directly. Any help about that ?

  • IDOc posting  error

    hai friends iam getting idocs form xi system (matmas) in this MBEWM segement  is repeting meny times in this segment BWTAR field some times not having any value at that time if the that segement is is first segment then it is posting proparly but if

  • I hope someone has the answer

    Alright, when I open an existing file, it gives me an error saying: "Seek failure..blah blah" What the heck does this mean!!! How do I get to open my file again, or will I ever!!! I have been working on it for the past 4 d**n months! Help please.

  • Converting QT to WMV files for PowerPoint presentation on PC

    Hi All, I have a client on a tight budget who wants to incorporate some talking heads into their Powerpoint presentation on their PC. I did a test with a full resolution Quicktime file but they could not play it. My plan is to export as a Windows Med