Trying to use OCI Jdbc driver

I'm using OC4J v2, with JDK1.3.1 under Linux
what libs / configs are required to use OCI Jdbc Drivers ?
thanks
N.

Debu, I spent much time searching this forum for answers to the ocijdbcX.dll problems in OC4J. I finally found my answer on Metalink. Apparently this is Bug# 1918517. The recommended fix on metalink for this bug solved my problem and is probably the problem that everyone else is experiencing. Setting LD_LIBRARY_PATH and ORACLE_HOME had no affect on OC4J.
Jeff Kirby
Lockheed Martin Mission Systems

Similar Messages

  • Can't connect using OCI JDBC driver in OC4J 10.1.3.3 standalone

    Hi all,
    I've recently upgraded my JDev from 10.1.3.2 to 10.1.3.3 and now I'm unable to establish any OCI connections with my local Oracle 10.1.0.4 database. Not even through a connection pool. The strangest thing is that when I test an OCI connection running from JDeveloper it works fine and the JDBC jars and the oci client are exactly the same.
    The error is always the same when I execute a test on a connection pool using the OCI driver:
    WARNING J2EE DS-00001 Exception occurred testing connection. Exception: java.sql.SQLException: Closed Connection.
    If I just change the driver to the THIN one, the same test works. If I take the same URL from the OCI test and use it in a test class and run it inside JDeveloper, it works also.
    I've even downloaded the instant client 10.1.0.5 (which happens to be exactly the same version of the JDBC driver that comes with JDev 10.1.3.3) and tried to use it with no success.
    THIN connections are working just fine. The problem happens only when I try to connect via OCI and this problem was not happening in version 10.1.3.2.
    Any help?

    I found the cause of this problem. It turns out that you must be very careful with the environment variable ORACLE_HOME. On Windows, normally, we don't even set this variable because most applications are able to get it from the system's registry.
    Well, it happened that I've edited the script start_oc4j.bat and, for organization reasons, I set the ORACLE_HOME variable with my JDeveloper's home directory (which is the same as my OC4J standalone's). By doing that, I kind of confused the OCI client. Once I removed the "set ORACLE_HOME=C:\JDev" line from the script, everything worked just fine again.
    So, always remember: avoid setting environment variable ORACLE_HOME when using Windows and, if you must set it, be sure to do it right.
    Regards,
    Eduardo.

  • How to use a jdbc driver in caf

    Hi, all.
         I tried to make a ws to access DB with CAF, but I had no idea how to use a jdbc driver(.jar).
        Can anyone do me a favor? Thx 
        PS: my server is ce7.1
    Edited by: Louis HUANG on Jul 27, 2009 1:09 PM

    hi
    If you want to interact with db tables in caf,try like this.
    it may work..
    Using EJB call database tables using jdbc driver.
    Expose EJB as webservice.
    and using External service option of caf utilise this webservice in caf,do the necessary mappings..
    you can search in sdn,how to call DB tables in EJB..
    Regards
    sowmya.

  • SetString/executeBatch fails in Oracle 10g OCI JDBC driver

    Hi,
    I am using Oracle 10g OCI jdbc driver for batch updates.
    Following is the the code that I am using
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class BatchUpdates
    public static void main(String[] args)
    Connection conn = null;
    Statement stmt = null;
    PreparedStatement pstmt = null;
    ResultSet rset = null;
    int i = 0;
    try
    String url = "jdbc:oracle:oci:@kctutf8";
    try {
    String url1 = System.getProperty("JDBC_URL");
    if (url1 != null)
    url = url1;
    } catch (Exception e) {
    OracleDataSource ods = new OracleDataSource();
    ods.setUser("kctuser");
    ods.setPassword("kana");
    ods.setURL(url);
    conn = ods.getConnection ();
    stmt = conn.createStatement();
    try { stmt.execute(
    "create table mytest_table (col1 number, col2 varchar2(20))");
    } catch (Exception e1) {}
    pstmt = conn.prepareStatement("insert into mytest_table values (?, ?)");
    pstmt.setInt(1, 1);
    pstmt.setString(2, "row 1");
    pstmt.addBatch();
    pstmt.setInt(1, 2);
    pstmt.setString(2, "row 2");
    pstmt.addBatch();
    pstmt.setInt(1, 3);
    pstmt.setString(2, "row 3");
    pstmt.addBatch();
    pstmt.setInt(1, 4);
    pstmt.setString(2, "row 4");
    pstmt.addBatch();
    pstmt.setInt(1, 5);
    pstmt.setString(2, "row 5");
    pstmt.addBatch();
    pstmt.executeBatch();
    rset = stmt.executeQuery("select * from mytest_table");
    while (rset.next())
    System.out.println(rset.getInt(1) + ", " + rset.getString(2));
    catch (Exception e)
    e.printStackTrace();
    finally
    if (stmt != null)
    try { stmt.execute("drop table mytest_table"); } catch (Exception e) {}
    try { stmt.close(); } catch (Exception e) {}
    if (pstmt != null)
    try { pstmt.close(); } catch (Exception e) {}
    if (conn != null)
    try { conn.close(); } catch (Exception e) {}
    When I run this class I get the following output
    1, row 1
    2, row 3
    3, row 5
    4, null
    5,
    But It should have been
    1, row 1
    2, row 2
    3, row 3
    4, row 4
    5, row 5
    The same class runs fine if I use Thin driver.
    Can anyone please help me solve this issue.
    Note: This happens only in case we use setString with Varchar2 in the DB. This works fine if I have two number columns
    Thanks,
    Raja.S

    Please post this question to the Java forum. It is located under "Technologies".

  • Problems showing german special characters using DB2 jdbc driver

    Hi JDBC gurus,
    In my application the special german characters(umlauts...) are not shown correctly when I'm using IBM jdbc driver(type 2). When I switch to jdbcodbc driver everything is correct. So is there any trick, some connection parameter, some property or something like this? Something like "setCharset" or "umlauts" or something? I could not find anything in web :-(
    It is also hard to imagine that nobody has faced this problem. Or it is very trivial...
    The second problem:
    I have downloaded a new driver (com.ibm.db2.jcc.DB2Driver) but when I try to connect with DB I'm getting
    com.ibm.db2.jcc.b.SqlException: No license present. What does it mean - no license? I'm going to clear with our DB admin if the reason can be that I have no rights to connect directly with DB without having client installed locally on my PC. This is only what comes to my mind.
    Environment:
    DB: DB2 7.x
    Web-Server: Tomcat 5.x
    Hibernate 3.1.x

    Actually the problem is ONLY symbol � - scharfes S. Other umlauts are shown correctly...
    What is wrong with that symbol????
    Many thanks in advance,
    Giorgi

  • Required appropriate OCI JDBC driver for   Oracle 9i

    Required appropriate OCI JDBC driver for Oracle 9i Enterprise Edition Release 9.2.0.6.0.

    Stick to one thread please.
    http://forum.java.sun.com/thread.jspa?messageID=9552360

  • How to efficiently use an jdbc driver

    hi,
    I have used ifxjdbc.jar for connecting to informix server.
    But i have used that only for query execution.
    I want to know how one can efficiently use a jdbc driver.
    What all the classes that are coming with a .jar file.
    Please help me
    thankz to all

    Add ifxjdbc.jar to classpath.
    Driver Class name is com.informix.jdbc.IfxDriverConnection url is jdbc:informix-sqli://<host>:<port>/<database>:INFORMIXSERVER=<server>Datasource class is com.informix.jdbcx.IfxDataSource

  • SQL Developer 3.2 crashes with java error when using OCI/Thick Driver

    I just installed SQL Developer 3.2 on my linux desktop. SQL Developer crashes with a java error when I select a database from the object tree.
    When I check Use OCI/Thick driver the application will crash when I navigate to the tree and open a database.
    The app does not crash then I have Use OCI/Thick driver unchecked.
    Here are some details of my environment:
    Desktop OS: Fedora 17 Linux
    $ uname -a
    Linux 3.5.1-1.fc17.x86_64 #1 SMP Thu Aug 9 17:50:43 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    Java:
    $ java -version
    java version "1.6.0_34"
    Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
    Oracle instant client:
    $ sqlplus -V
    SQL*Plus: Release 11.2.0.3.0 Production
    Here are the error messages:
    $ sqldeveloper
    Oracle SQL Developer
    Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    # A fatal error has been detected by the Java Runtime Environment:
    # SIGSEGV (0xb) at pc=0x00007f6de7157664, pid=3049, tid=140109371119360
    # JRE version: 6.0_34-b04
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.9-b04 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # V [libjvm.so+0x516664] unsigned+0xd4
    # An error report file with more information is saved as:
    # /tmp/hs_err_pid3049.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    /opt/sqldeveloper/sqldeveloper/bin/../../ide/bin/launcher.sh: line 544: 3049 Aborted (core dumped) ${JAVA} "${APP_VM_OPTS[@]}" ${APP_ENV_VARS} -classpath ${APP_CLASSPATH} ${APP_MAIN_CLASS} "${APP_APP_OPTS[@]}"

    I also had the problem of SQL Developer crashing when using OCI/Thick driver but I've managed to solve it. My configuration is:
    - Windows 64-bit
    - Java 64-bit (1.6.0.34)
    - SQL Developer 3.2.09 64-bit
    - OCI Instant client 11.2.0.3 64-bit (without installation).
    The thing that solved the problem was copying two files, ojdbc5.jar and ojdbc6.jar, from Instant client installation folder to JAVA_HOME/lib/ext folder+.
    After that, I haven't had a single crash or error message.
    The same trick that solved the problem on 64-bit installation also solved the problem on another windows computer with 32-bit SQL Developer installation.

  • Is it supported to use Microsoft JDBC driver use in Java 7 (and 8) multithreaded applications?

    Hello everone
    is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?
    I am planning to use standard Java 7 threads library and use separate JDBC objects per each thread, i.e. Java threads will not share any JDBC objects among them, only the thread-safe Java collections/data structures will be shared between threads (such as
    ConcurrentHashMap etc). The JDBC connections, resultsets, statements, etc will be created and dedicated per each individual thread.
    If it is supported - do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs to access SQL Server 2012/2014 from Microsoft JDBC driver?
    Thanks
    Yuri Budilov
    Yuri Budilov Melbourne Australia

    >is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?
    Yes, so long as:
    > Java threads will not share any JDBC objects among them,
    >do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs >to access SQL Server 2012/2014 from Microsoft JDBC driver?
    Using threads should scale better than using processes (at least on Windows), as there is quite a bit of overhead with a process.  Each process has it's own JRE, it's own GC heap, its own threads...
    The bigger question, though, is how this scales on the SQL Server.  Your throughput may be limited by resources on your database server, and the thread's workloads may not be able to run concurrently because of locking. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • What are the benefits to using the OCI JDBC driver?

    I understand that the Thin JDBC driver is geared toward Applets since it is all Java and relatively small for download. If I am running servlets is there any compelling reason for me to use the OCI driver? I would think my application would be more portable if I stuck with the Thin driver even on the server side. This would allow me to easily move my servlet application to UNIX from NT, Java Web Server to IIS, IIS to Apache... So, does anyone know what one would gain by maintaining the Oracle Client software on the server and using the OCI driver?
    Thanks in advance.

    It's not a separate account. It's simply an additional address on your existing account and you can use it or not use it at your own convenience. Your @me.com address will be unaffected.

  • Using Weblogic JDBC driver 5.1.0sp8  with MSSQL, throwing "abstract method" error when trying to use scrollable resultsets

    I am using the weblogic driver with Allaire JRun.
    Using these lines, I am trying to make my resultsets scrollable and updatable.
    dbConnection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE
    ResultSet rs = queryStatement.executeQuery(query);
    When I run the code, I get this error ..
    java.lang.AbstractMethodError
    at allaire.jrun.sql.ConnectionProxy.createStatement(../sql/ConnectionProxy.java:413)
    at com.mindseye.utils.database.DBAccessor.executeQuery(DBAccessor.java:35)
    at com.fao.shopping.tag.HandleShoppingCartTag.checkExists(HandleShoppingCartTag.java:635)
    at com.fao.shopping.tag.HandleShoppingCartTag.doStartTag(HandleShoppingCartTag.java:90)
    at jrun__jsp__shoppingbag2ejsp14._jspService(jrun__jsp__shoppingbag2ejsp14.java:45)
    at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
    at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
    Everything works fine when I do not try and specify attributes to the statement
    object. (i.e. dbConnection.createStatement();)
    Anybody know what is going on?
    thanks,
    randy

    Hi. I don't see our code anywhere in the stacktrace, but I'll assume
    it's there somewhere. The basic fact is that our MS SQLServer driver
    implements practically zero of the JDBC 2.0 methods. There is a way
    to connect to this driver that has the methods defined, but then all
    the difference will be that you'll get an exception saying 'this jdbc 2.0
    method not implemented'.
    Joe
    randy shepherd wrote:
    >
    I am using the weblogic driver with Allaire JRun.
    Using these lines, I am trying to make my resultsets scrollable and updatable.
    dbConnection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE
    ResultSet rs = queryStatement.executeQuery(query);
    When I run the code, I get this error ..
    java.lang.AbstractMethodError
    at allaire.jrun.sql.ConnectionProxy.createStatement(../sql/ConnectionProxy.java:413)
    at com.mindseye.utils.database.DBAccessor.executeQuery(DBAccessor.java:35)
    at com.fao.shopping.tag.HandleShoppingCartTag.checkExists(HandleShoppingCartTag.java:635)
    at com.fao.shopping.tag.HandleShoppingCartTag.doStartTag(HandleShoppingCartTag.java:90)
    at jrun__jsp__shoppingbag2ejsp14._jspService(jrun__jsp__shoppingbag2ejsp14.java:45)
    at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
    at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
    Everything works fine when I do not try and specify attributes to the statement
    object. (i.e. dbConnection.createStatement();)
    Anybody know what is going on?
    thanks,
    randy

  • Error while trying to use oci driver

    hi all,
    When trying to use the utility loadjava for oci driver i get the following error
    d:\>loadjava -user jar/jar -oci8 -oracleresolver checkoci.jar
    SQL Error while connecting with oci8 driver to default database: Error while try
    ing to retrieve text for error ORA-12538
    Any idea
    pl mail to [email protected]
    or tell me how to connect

    Hi,
    For OPTIONAL support in 11.1.0.7.0, you need the following patch
    Patch 7600122: CURLY BRACE SYNTAX,VIRTUAL MODELS, NETWORK INDEXES AND HINTO FRAMEWORK SUPPORT
    Support for SPARQL FILTERs in SEM_MATCH is not available for 11.1.0.7.0. You will need version 11.2.0.1.0 or later for FILTER support. With 11.2.0.1.0, we recommend that you apply our latest patch set:
    Patch 9819833: SEMANTIC TECHNOLOGIES 11G R2 FIX BUNDLE 2
    All of the above patches are available through My Oracle Support.
    Thanks,
    Matt

  • Connecting to SQLserver 2005 via Web Analysis using a JDBC driver

    We are currently working on a web analysis suite and have been trying to create a SQL spreadsheet data object.
    After downloading and supposedly installing the sqljdbc.jar driver, we are having problems getting a connection to MS SQL server 2005.
    We set the classpath to this driver in the operating system (Windows server 2003) but are unsure exactly how to set this classpath in Tomcat 5.0.28 as recommended by the help file. We have tried editing the catalina.bat and catalina.50.bat in the \Hyperion\common\appServers\Tomcat\5.0.28\bin folder to point to sqljdbc.jar, but to no avail.
    So....does anyone have any experience on setting up the JDBC driver for MSSQLServer 2005 and making a connection in Web Analysis. Could you please give a step by step account of how this is done?

    Hi,
    In the past I have used two methods either updating the registry for the web application or by placing the jar file in the following directory
    \Hyperion\deployments\Tomcat5\WebAnalysis\webapps\WebAnalysis\WEB-INF\lib
    If you do place it in that directory you will need to restart the web analysis web server.
    Then in web analysis studio go to file > new > database connection >Relational
    Select Microsoft SQL Server
    JDBC Driver
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection string
    jdbc:microsoft:sqlserver://<servername>:1433;DatabaseName=<dbname>;SelectMethod=cursor
    Enter username/password
    There is always the Merant SQL server connection that can be used as well.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to use Oracle jdbc driver fixedString property?

    Oracle pads values in char columns so if I insert "a" in a CHAR(2) column then I cannot get that record by comparing that column to "a", I should get it by comparing it to "a ". Right?
    To solve this problem the Oracle jdbc driver has the property fixedString but I cannot make it work. (look for fixedString here )
    I'm using ojdbc14.jar driver for Oracle 10gR2 and accessing an Oracle 10gR2 database.
    This is my code:
    try {
    Properties props = new Properties();
    props.put("user", "****");
    props.put("password", "****");
    props.put("fixedString", true);
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String jdbcUrl = "jdbc:oracle:thin:@<host>:<port>:<sid>";
    Connection connection = DriverManager.getConnection(jdbcUrl, props);
    PreparedStatement ps = connection.prepareStatement(
    "SELECT * FROM MY_TABLE WHERE MY_TABLE_ID = ?");
    ps.setObject(1, "abc"); // (*)
    // MY_TABLE_ID is CHAR(15)
    ResultSet rs = ps.executeQuery();
    while (rs.next())
    System.out.print("data: ");
    System.out.println(rs.getString("MY_TABLE_ID"));
    rs.close();
    ps.close();
    connection.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    } catch (ClassNotFoundException ex) {
    ex.printStackTrace();
    The above code executes fine (no exceptions thrown) but the ResultSet is empty after executeQuery().
    If I change the line (*) for
    ps.setObject(1, "abc ");
    Then I get the column I wanted. So it seems the driver is ignoring the fixedString option.
    I've also tried changing the line (*) for
    ps.setObject(1, "abc", java.sql.Types.CHAR);
    But the ResultSet I get is empty again. What am I missing?
    Thanks in advance

    Es un Bug se corrige en la versión del OAS 10.1.2.3
    Bug 10222534: UNABLE TO SET FIXEDSTRING PROPERTY IN DATASOURCE

  • Cant get OCI jdbc driver working on Mac OS X

    I have installed the 10g final release for Mac OS X 10.3.7.
    I did a custom install...ONLY the JDBC drivers...nothing else.
    I have gotten the THIN driver to work fine and connect to the database. But when I try to use the OCI driver, I keep getting unsatisifed link errors. I have set my LD_LIBRARY_PATH and such but no luck. Anyone got any ideas for what I need to do?
    Environment vars:
    echo $LD_LIBRARY_PATH
    /Users/michaelm/other/oracle/product/10.1.0/client_1/lib
    This shows that the file in question DOES exist:
    ls -l /Users/michaelm/other/oracle/product/10.1.0/client_1/lib/libocijdbc10.jnilib
    -rw-r--r-- 1 michaelm michaelm 93028 29 Dec 21:22 /Users/michaelm/other/oracle/product/10.1.0/client_1/lib/libocijdbc10.jnilib
    When I run the program, I get this:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/michaelm/other/oracle/product/10.1.0/client_1/lib/libocijdbc10.jnilib:
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:2927)
    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:225)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:347)
    at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:139)
    at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:79)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:549)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:196)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:146)
    at Test.getConnection(Test.java:32)
    at Test.main(Test.java:12)
    What else do I need to do?

    Same error. I just don't get it. Here are some of the environment vars:
    echo $ORACLE_HOME
    /Users/michaelm/other/oracle/product/10.1.0/client_1
    echo $LD_LIBRARY_PATH
    /Users/michaelm/other/oracle/product/10.1.0/client_1/lib
    echo $DYLD_LIBRARY_PATH
    /Users/michaelm/other/oracle/product/10.1.0/client_1/lib
    What in the world am I doing wrong? Seems like with such a basic installation (just the JDBC drivers) this thing would work!
    thanks,
    Mike

Maybe you are looking for

  • How do I stop this error "Firefox is already running, but is not responding"

    Hello, I got this issue where I'm logged into more then on computer at a time. If I have Firefox running on one computer I'm prevented from running Firefox on anther computer. This because my user account has its home directory mounted across all the

  • Internal Application Error

    Whenever I try to convert a certain .mpg file into a .flv, I get the following error: 2008-08-13 13:40:54 : ENCODING FAILED - Source file: [censored].mpg - Output file: [censored].flv - Video codec: On2 VP6 - Alpha channel encoded: no - Deinterlace:

  • Switching to BT Infinity - Need to know a few thin...

    I have asked to switch to BT Infinity from BT Broadband option 3 and would like to know a few things before the engineer comes in the latter part of next week. 1) Does the BT Infinity Hub connect to the BT phone socket by a standard ADSL modem/router

  • I have a problem with Yahoo messenger

    Ever since I installed Mountain Lion, I can't get my Yahoo messenger to work. Does anyone else have this problem or experienced the same? Thank you.

  • Can't Contact A specific person on the bbm

    I need some help here please. BBM has stopped working with one specific contact after i updated the software and the bbm so. I can't send this contact a BBM message  and always it  gives me the mark ( X). However, when this person tries to send me a