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.

Similar Messages

  • 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

  • Where can i download oracle oci jdbc driver 1.2?

    http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
    some error in this page. several days.

    Please be more specific about the file(s) you are having trouble with.
    Regards,
    OTN

  • Problem JDBC Connection using OCI Driver on Weblogic Portal on Linux

    Hi Team,
    I want a JDBC connection using OCI Driver in Weblogic Portal 8.1 sp4 on Linux. When I had tested using JDBC connection using Plain Java Code it is working. Also when I create the OCI Connection Weblogic Connection Pool it is working.
    But My Requirement is to create the connection using Java Code in Portal Application
    But When I create OCI connection in the code it is throwing NO SUITABLE DRIVER Found.
    ---------- Code in Plain Java Code ------------ Same code is used in Weblogic Portal Application --------------------------------
         public static void main(String[] args) throws Exception{
              Class.forName("oracle.jdbc.driver.OracleDriver");
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              String url="jdbc:oracle:oci8:@TESTDB";
              Properties props = new Properties();
         props.put("user","scott");
         props.put("password","tiger");
              conn=DriverManager.getConnection(url,props);
    When I am using the same code in Weblogic Portal and Deployed on Weblogic Portal Server 8.1 SP4 it is throwing following error.
    -------------- Exception on Server Log --------------------
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
    at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
    My Environment is
    LINUX
    Weblogic 8.1 SP4
    Oracle 9i Client on Same Machine
    Oracle 10g Server on Different Machine
    My Environment Variables on the Linux Server also set properly as following
    PATH=/apps/pmaaum/ant/apache-ant-1.6.5/bin:.:/apps/beahomedev/jdk142_05/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/product/9.2.0/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/bin
    LD_LIBRARY_PATH=/usr/lib:/apps/oracle/ora9i/product/9.2.0/lib:/apps/oracle/ora9i/product/9.2.0/lib32:/apps/oracle/ora9i/product/9.2.0/rdbms/lib:/usr/openwin/lib:/apps/oracle/ora9i/product/9.2.0/jdbc/lib
    JAVA_HOME=/apps/beahomedev/jdk142_05
    JDBC_LIB=/apps/oracle/ora9i/product/9.2.0/jdbc/lib
    CLASSPATH=:.:/apps/beahomedev/jdk142_05/lib/rt.jar:/apps/oracle/ora9i/product/9.2.0/jdbc/lib/classes12.jar
    Please help me, Let me know if you required anything.
    Thanks in Advance
    Vishnu
    Edited by: vishnuk on Oct 23, 2009 4:07 AM
    Edited by: vishnuk on Oct 23, 2009 4:10 AM

    Hi Vishnu
    Looks like a classloader issue. BEA class loader is very tricky. Any jar added manually in classpath, will end up loading only those classes. Any imports that we have in any of those classes do not get loaded. Anyhow, coming to your point, add classes12.jar inside your portal web project Web-Inf/lib folder and see if that helps. Usually thats where we put all the JARs for 8.1 SPxx applications. If this still breaks, then remove the jar from web-inf/lib folder and add under your portal app App-Inf/lib folder. First try with app-inf/lib folder having this jar. If not then with web-inf/lib. Basically web-inf is specific to that web app only. If you have a different app having this jdbc code, then put under app-inf/lib folder. Make sure that you remove the classes12.jar that you added in classpath either in env variable or in setdomainenv.cmd file.
    When weblogic uses native OCI Drivers, it refers to jars at this location: ....\beawlp814\weblogic81\server\ext\jdbc\oracle\10g or 9g. Try using one of these jars and see if that works. Most of the times I used these jars only for oracle specific native drivers.
    Word of caution. Try to use Connection Pool and a DataSource created in weblogic console for your jdbc code. This Datasource can still use the Oracle drivers that you want (instead of BEA Weblogic wrapper oci drivers) located in above location. Use JNDI Lookup and get Datasource and then connection. This is more recommended approach with many advantages then using DriverManager approach..
    Goud

  • Jdbc connection using oracle thin driver( using jdk1.4 and oracle8 )

    hello ..
    while i was tring to connection using oracle thin driver and jdk1.4 am getting the below error message. i have set the class path for the driver also. am using oracle8 personal edition and jdk1.4.
    [java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
            at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
            at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:468)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
            at java.sql.DriverManager.getConnection(DriverManager.java:512)
            at java.sql.DriverManager.getConnection(DriverManager.java:171)
            at Connexa.main(Connexa.java:18)[/b]
    Press any key to continue...
    my program is....
    import java.sql.*;                                          
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    // needed for new BFILE class
    import oracle.sql.*;
       public class Connexa {
      public static void main (String args []) throws Exception {
            Statement stmt=null; 
      try{
        // Load the Oracle JDBC driver                            
        //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Class.forName("oracle.jdbc.driver.OracleDriver");
        // Connect to the database
        // You can put a database name after the @ sign in the connection URL.
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","scott","tiger");
        //Connection conn =
        //  DriverManager.getConnection ("jdbc:odbc:datasource", "system", "manager");
        stmt = conn.createStatement ();
    catch (SQLException e)
          e.printStackTrace();

    The code itself is fine; the problem is with one of:
    1) the connection URL
    2) intermediate networking
    3) the database itself
    1) your connection URL is "jdbc:oracle:thin:@127.0.0.1:1521:orcl"
    - is Oracle really running on the default port, 1521
    - is the installation SID really "orcl"
    2) lots of possibilities, but only a couple are likely
    - is TCP/IP configured and running on your host
    - is there a persoanl firewall rpduct running? perhaps it's blocking the connection
    3) Is Oracle running?
    Is the listener running?

  • Can i connect a external hard drive to apple tv 3 generation, for see my movies itunes with out use streaming or icloud?

    can i connect a external hard drive to apple tv 3 generation, for see my movies itunes with out use streaming or icloud?  in apple tv 3 and 2?
    That  i want to know is i can connect a external hard drive to apple tv, for see my movies that i keep in my external hard drive,  i dont want to see then  whit the streaming and icloud, or used my  laptop o pc for access de movies and stuff.
    i put iny spanish to, because i feel my english is not so good, but i hope you understand me.
    if i can´t  connect a external hard  drive, wich others media players divices you know that can see itunes movies?
    ¿quisiera saber si se puede conectar una memoria externa al apple tv, para ver el contenido de itunes que tengo guardado en esa memoria como peliculas, ect?
    lo que no quiero es usar  la icloud, o el servicio streamig para ver mi contenido, ni tener que usar la computadora para ver mi contenido el la tv?
    y de no poderse conectar  que otros dispositivos media pleyer conoces para ver peliculas de itunes  en la tv?

    Welcome to the Apple Community.
    can i connect a external hard drive to apple tv 3 generation
    Unfortunately not.

  • 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

  • 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

  • Sysdba connectivity using OCI

    Hi guys,
    I have a problem With Oracle sysdba connectivity using OCI.
    Can you any one please forward the Source code to connect SYSDBA using OCI.
    My server is Oracle 10g
    I am using VC++ as interface.
    Please respond,
    Regards,
    kishore

    You should confirm that you can connect to the DB with a simple Java class using the url that the code you posted is using.
    This will show that the OCI client is installed and executing properly. If you can't connect externally you will need to fix that first.
    Is the Oracle client installed on the same machine the JDBC code is running on?

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

  • Can I connect an external hard drive to Time Capsule for off site back up?

    I like having a copy of everything at another site in case of a house fire. Can I connect an external hard drive to Time Capsule to make a duplicate of what is on Time Capsule? I would store that hard drive at work and bring it home monthly or something to back up Time Capsule. Thanks!

    Can I connect an external hard drive to Time Capsule to make a duplicate of what is on Time Capsule?
    That is exactly what the Archive function on the Time Capsule is for. Connect a USB drive and click Archive, and a mirror image of your Time Capsule will be copied over to the USB drive.  It's a slow process that will take 4-8 hours depending on how much data is on the Time Capsule, so best to start things late at night and let them run overnight.
    Another option would be to use a commercial application like Carbon Copy Cloner to keep your backup.  The advantage to this approach is that once the first "master" backup is done, the application will only back up the changes on the Time Capsule that have occurred since the last backup. So, subsequent backups will be much faster, probably only taking about 10-15 minutes.

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

  • Can i connect an external hard drive?

    Can I connect an external hard drive to the ipad? How about the new one or the iPad 2?  I would like to be able to watch movies stored on the external drive.

    Ordinarily no but I seem to recall someone once describing such a device.  Mr. Google is your friend.

  • Can i connect thunderbolt duo hard drive to the mini display port of a late 2008 macbook pro which do not have thunderbolt port, but have mini display port.

    hi, i have a late 2008 15 inch macbook pro, which have a mini display port.
    I noticed that thunderbolt and mini display port looks a like. So, my question is :
    can i connect thunderbolt duo hard drive to the mini display port of a late 2008 macbook pro which do not have thunderbolt port, but have mini display port.
    thank you

    ken94538,
    no, you’d need a Thunderbolt-to-FireWire adapter or Thunderbolt-to-USB adapter to be able to access your Thunderbolt hard drive from your 2008 MacBook Pro.

Maybe you are looking for

  • Unable to load certain types of forums

    While browsing some, some forums wont load properly in Mozilla Firefox(same with IE), while when using Google Chrome, it loads perfectly, this has been a trouble to me for about 2-3 months no. I'm not sure if its the explorer problem, or is some encr

  • I want to use time machine on a network drive

    i know in the past Apple holds us hostage to buy their time capsule.  With Lion now launched, is there a work around to allow families to buy there own hard drive and use it for multiple macs for time machine? Im fairly new to Mac, convinced my wife

  • How to create a new BARCODE PREFIX   (for SAPScripts)

    In SE73 transaction, we can create a NEW printer barcode. For this we require 'barcode prefix' .There are some SAP standard barcode prefixes(for eg.SBP01)...but I want to create a new barcode prefix.. Please let know how to create a new BARCODE PREFI

  • Select only 2 type in selection screen

    i have a parameter called zzzzz i want that the user can chosse only '99' and '88' how i do it? thanks.

  • How do I get an unlimited license for ARD

    I need to supply a school lab manager with Apple Remote Desktop for daily operations- (about 45 iMacs). Is the Volume Purchase Program version a limited or unlimited license at $79.99? None of the online documentation says.