Ojdbc14.jar connect to 10g so slow with JRE1.5.0_05

Our guests complained the speed is so slow that they can not stand up with this...
So I run the tests base on JRE1.5.0_05 and ojdbc14.jar and Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
try {
                    Class.forName("oracle.jdbc.driver.OracleDriver");
                    String url = "jdbc:oracle:thin:@//host:1521/orcl";
                    Date now = new Date();
                    Connection conn = DriverManager.getConnection(url, "user",
                              "password");
                    System.out.println(System.currentTimeMillis() - now.getTime());
                    conn.setAutoCommit(false);
                    Statement stmt = conn.createStatement();
                    ResultSet rset = stmt
                              .executeQuery("select BANNER from SYS.V_$VERSION");
                    while (rset.next()) {
                         System.out.println(rset.getString(1));
                    stmt.close();
                    System.out.println("Ok.");
               } catch (Exception ex) {
                    ex.printStackTrace();
The output is :
4875
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE     10.2.0.1.0     Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Ok.
the statement Connection conn = DriverManager.getConnection(url, "user", "password") execution time is 4875 milliseconds!!!!!
so i switched to 9i the output is:
0
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE     9.2.0.1.0     Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
Ok.
I change the JDK version to 1.4 or 1.6 the execution time is also 0.
I walk through the internet and finally found the solution:
ProxySelector.setDefault(null);
But i am still confused when it come to the same environment the same code to connect to the 9i,10g, the getConnection() method execution time is so different without the statement ProxySelector.setDefault(null). so I suspect that this is an issue to 10g not the JDK1.5.x.
Edited by: user12084131 on 2010-9-20 上午1:46
Edited by: user12084131 on 2010-9-20 上午1:47

Thanks for the reply,
One correction to the above <Corrected now in my original post>
Its connecting to " com.bea:ServerRuntime=managed03,Name=managed03,Type=JRockitRuntime"
Tried with previous version again, it works perfect. But i still have issue with new JRE version.
Regards,
Rana
Edited by: user13387204 on 02-Oct-2010 19:01

Similar Messages

  • Is ojdbc14.jar the correct driver to use with Java 1.6.0 and Oracle 10?

    I have a customer using Oracle 10.2.0.3 and a JVM of 1.6.0. They are using ojdbc14.jar as their JDBC driver. I am confused because while ojdbc14.jar is listed as the driver for Oracle 10.2.0.3, it is not listed as compatible with JDK1.6.

    the 14 part means it is for Java 1.4. You should use a driver from either the ODJBC5 (Java 5) or OJDBC6 range (Java 6). All drivers are backwards compatible, so you can use the latest drivers to connect with older Oracle releases. Just don't assume that the latest one is the best one, check Google for specific problems before using a specific driver release.

  • Oracle Type4 driver (ojdbc14.jar) connection proble

    Hi,
    I'm trying to connect to my oracle 8i installed in my local machine through type4 driver.
    I've downloaded ojdbc14.jar and included its path to classpath
    The following lines are included in my code
    Class.forName("oracle.jdbc.OracleDriver");
    cn = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@localhost:1521:dbmsConnect ")
    I've created the DSN as follows (in Windows XP)
    Control Panel - Administrative Tools - Data Sources - Add - Took Oracle ODBC Driver - entered DSN name as dbmsConnect -added user id as scott
    When I ran the code, Igot following exception
    Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)
    (ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    Could anyone help me please

    You may need a later version of the driver:
    http://www.dbforums.com/showthread.php?t=971271
    Pl. also see:
    http://forum.java.sun.com/thread.jspa?threadID=563288&messageID=2773243
    http://forum.java.sun.com/thread.jspa?threadID=300137&messageID=1189780

  • Connecting oracle 10g express edition to jdeveloper

    I am having all kinds of problems connecting oracle 10g express edition with my jdeveloper 10.1.3.3. I can query the database from my command line so I know it is set up, but for whatever reason jdeveloper will not connect with it. When I try to connect with the database through jdeveloper here is the error I keep getting:
    Listener refused the connection with the following error:
    ORA-12518, TNS:listener could not hand off client connection
    The Connection descriptor used by the client was:
    localhost:1521:ORCL
    I have been all through the google results looking for an answer and have come to the conclusion that it is something with either the listerner file or the tns file, but as of yet have been unable to locate them. here are both of those files too.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ##########)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = #########)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    Please any help would be appreciated I have been at this for days, thanks.

    This has to be some kind of bug with 10g express because I see lots of people having similar problems. I'm in the process of uninstalling 10g, and I will re-install it see if that makes a difference. Again if anyone has any other ideas please keep them coming because this is utter BS it shouldn't be this hard.

  • Is it possible to connect OJDBC14.JAR with tomcat?!

    Hello,
    I�m using tomcat and receiving the error bellow ...
    I�m using ojdbc14.jar and I configured the tomcat like this:
    URL: jdbc:oracle:thin:@localhost:1521:xe
    Class: oracle.jdbc.driver.OracleDriver
    There is no problem to visit pages that only show the result of searches... So the problem happend when i try to visit the pages that creates or updates a data base register...
    What is the problem?! Is it possible to connect tomcat and oracleXE DB using ojdbc14.jar?!?
    Please someone....help me
    Gustavo Callou
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.lang.RuntimeException: java.sql.SQLException: handle de instru��o n�o foi executado: getMetaData
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
    Apache Tomcat/5.5.17

    Hi,
    the problem is that is I little bit dificult to debug with tomcat...
    I have already read:
    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=63633
    and the marco�s blogs on:
    http://blogs.sun.com/marcoscorner/entry/creator_2_ea_webapps_and
    So I concluded that it is possible to use the ojdbc14.jar of oracle, but I still receiving the getMetaData erro... what am i supose to do?!
    Is it possible to someone send me some example that works fine?!
    Bellow there is a code example that i use to update the data of one row...
    In the development It works fine... but with tomcat using the OJDBC14.jar does not... I�m receiving this:
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.lang.RuntimeException: java.sql.SQLException: handle de instru��o n�o foi executado: getMetaData
    How can I change my code to does not receive this erro anymore with tomcat using OJDBC14.jar version 10.2.0.1.0?!
    public void prerender() {
    try {
    getSessionBean1().getTb_setorRowSet().setObject(1,
    getRequestBean1().getCodigoSetor());
    tb_setorDataProvider.refresh();
    } catch (Exception e) {
    error("Cannot read tracks for " +
    getRequestBean1().getCodigoSetor() +
    ": " + e.getMessage());
    log("Cannot read tracks for " +
    getRequestBean1().getCodigoSetor() + ": ", e);
    public void destroy() {
    tb_setorDataProvider.close();
    public String btn_salvar_action() {
    try {
    tb_setorDataProvider.commitChanges();
    log("update: changes committed");
    info("Opera\347\343o Salva");
    } catch(Exception e) {
    log("update: cannot commit changes ", e);
    error("Cannot commit changes: " + e.getMessage());
    return null;
    Please Marco or anyone help me!!!
    Thanks
    Gustavo

  • Performance problem with ojdbc14.jar

    Hi,
    We are having performance problem with ojdbc14.jar in selecting and updating (batch updates) entries in a table. The queries are taking minutes to execute. The same java code works fine with classes12.zip ans queries taking sub seconds to execute.
    We have Oracle 9.2.0.5 Database Server and I have downloaded the ojdbc14.jar from Oracle site for the same. Tried executing the java code from windows 2000, Sun Solaris and Opteron machines and having the same problem.
    Does any one know a solution to this problem? I also tried ojdbc14.jar meant for Oracle 10g, that did not help.
    Please help.
    Thanks
    Yuva

    My code is doing some thing which might be working well with classes12.zip and which does not work well with ojdbc14.jar? Any general suggestions to make the code better, especially for batch updates.
    But for selecting a row from the table, I am using index columns in the where cluase. In the code using PreparedStatement, setting all the reuired fields. Here is the code. We have a huge index with 14 fields!!. All the parameters are for where clause.
    if(longCallPStmt == null) {
    longCallPStmt = conn.prepareStatement(longCallQuery);
    log(Level.FINE, "CdrAggLoader: Loading tcdragg entry for "
    +GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH"));
    longCallPStmt.clearParameters();
    longCallPStmt.setInt(1, cdrAgg.iintrunkgroupid);
    longCallPStmt.setInt(2, cdrAgg.iouttrunkgroupid);
    longCallPStmt.setInt(3, cdrAgg.iintrunkgroupnumber);
    longCallPStmt.setInt(4, cdrAgg.iouttrunkgroupnumber);
    longCallPStmt.setInt(5, cdrAgg.istateregionid);
    longCallPStmt.setTimestamp(6, cdrAgg.time_hour);
    longCallPStmt.setInt(7, cdrAgg.icalltreatmentcode);
    longCallPStmt.setInt(8, cdrAgg.icompletioncode);
    longCallPStmt.setInt(9, cdrAgg.bcallcompleted);
    longCallPStmt.setInt(10, cdrAgg.itodid);
    longCallPStmt.setInt(11, cdrAgg.iasktodid);
    longCallPStmt.setInt(12, cdrAgg.ibidtodid);
    longCallPStmt.setInt(13, cdrAgg.iaskzoneid);
    longCallPStmt.setInt(14, cdrAgg.ibidzoneid);
    rs = longCallPStmt.executeQuery();
    if(rs.next()) {
    cdr_agg = new CdrAgg(
    rs.getInt(1),
    rs.getInt(2),
    rs.getInt(3),
    rs.getInt(4),
    rs.getInt(5),
    rs.getTimestamp(6),
    rs.getInt(7),
    rs.getInt(8),
    rs.getInt(9),
    rs.getInt(10),
    rs.getInt(11),
    rs.getInt(12),
    rs.getInt(13),
    rs.getInt(14),
    rs.getInt(15),
    rs.getInt(16)
    }//if
    end_time = System.currentTimeMillis();
    log(Level.INFO, "CdrAggLoader: Loaded "+((cdr_agg==null)?0:1) + " "
    + GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH")
    +" tcdragg entry in "+(end_time - start_time)+" msecs");
    } finally {
    GeneralUtility.closeResultSet(rs);
    GeneralUtility.closeStatement(pstmt);
    Why that code works well for classes12.zip (comes back in around 10 msec) and not for ojdbc14.jar (comes back in 6-7 minutes)?
    Please advise.

  • Which ojdbc14.jar JDBC driver to use for Oracle 10g database

    When ODI is installed there seems to be an Oralce JDBC driver in place in the drivers folder (ojdbc14.jar).
    When we connect to an Oracle datastore and point to a table and use the 'reverse' function to populate the columns - it sort of works OK but does not bring back the datatypes properly. This is found to be when the Oracle table has UNICODE character datatypes NCHAR and NVARCHAR. If a table has CHAR and VARCHAR it is all OK but any table that has UNICODE datatyoe has a problem.
    Is this likely to be the JDBC driver ?
    We have tried replacing this ojdbc14.jar with the older classes12 and this, as expected, did not resolve the issue.
    We then tried replacing it with the latest 10.2.0.4 ojdbc14.jar but again no difference.
    Does anyone have any experience with Oracle JDBC drivers and what release level to use - and using against UNICODE datatypes in tables ?
    Regards

    Our problem is that when we use 'reverse' to populate the columns from a physicla table in an Oracle database - ODI is obviously 'seeing' the ORacle table and is correctly understanding the columns in the table and defining them in it's model - but wherever there is a column with a datatype in the ORacle database of NCHAR or NVARCHAR it fails to populate the datatype or the 'length' of these columns. If I manually try to specify the datatype these 2 unicode data types do NOT exist in the pull down list of datatypes.
    I see what you are asking - if these datatypes are actually defined as datatypes within the actual technology - I cant access my lab right now but will check as soon as I can. Thanks for the suggestion.

  • Remote Desktop Connection Mouse Slow with Windows 2012

    Hello:
    I am connecting to a customer site with Citrix and using Citrix's Remote Desktop. I know this may be a Citrix issue but not sure. Customer isn't helping so thought I would check here.
    I have two connections to computers in their network with Remote Desktop. One is to a Windows 2003 Server which works fine. When I connect to Windows 2012 the mouse is slow. I tried adjusting the mouse settings but it doesn't help.
    Has anyone else experienced this? Is it an issue specific to Citrix or to Remote Desktop in general?
    Thanks,

    check out this blog, it's for virtual PC though but also using RDP.
    just try it out whether it helps or not
    http://mattrefghi.com/blog/solutions/virtual-pc/slow-mouse-when-controlling-a-virtual-pc-through-remote-desktop/
    Slow Mouse When Controlling a Virtual PC Through Remote Desktop
    Right-click the Desktop, and select Properties.
    Move to the Settings tab in the Display
    Properties dialog.
    Click the Advanced button.
    Move to the Troubleshoot tab in the Monitor
    Properties dialog.
    Move the Hardware acceleration slider all the way to the right, so it is right next to Full.
    Click OK in the Monitor Properties dialog.
    Click OK in the Display Properties dialog.
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.

  • Problem with ojdbc14.jar (oracle10g Rel. 2 driver) in updating a BLOB field

    Hello All,
    Our web application uses oracle10g Release 2 jdbc driver with websphere 5.1.1.4 and oracle 9i. When it tries to update a BLOB field in the database updation is successful but it is updating that field with a null value. So rest of our application fails as this value is becoming null. We use an entity bean to update this table and websphere uses a prepared statement to update this table. Just before setting this BLOB field using setBinaryStream() on prepared statement I am printing to see whether it is null or not as shown in the code snippet below. And it is printing it correctly as non null. But after execution of the prepared statement some how the value stored in database is null.
    Is this a known issue with this driver? Does any one know work around or a solution to this? We have 3 BLOB fields in that table. Is that a problem? If we separate these BLOB fields into separate tables will the problem be solved? Any input on this is very much appreciated.
    // For column ORIGINAL_CONTENT
    byte[] tempbyteArray;
    tempbyteArray=(byte[])inputRecord.get(25);
    if (tempbyteArray == null) {
    System.out.println("DqPageBeanFunctionSet_f9c724af: tempbyteArray NULLLLLLL");
    } else {
    System.out.println("DqPageBeanFunctionSet_f9c724af: orig tempbyteArray length: " + tempbyteArray.length);
    if(tempbyteArray != null) {
    pstmt.setBinaryStream(25,new java.io.ByteArrayInputStream(tempbyteArray),tempbyteArray.length);
    else pstmt.setNull(25,java.sql.Types.BLOB);
    Thanks & Regards,
    -Sunitha

    I have similar problem and I solved it using ojdbc14.jar oracle9i version.
    try...

  • I am trying to connect oracle develper suit form with oracle 10g database

    i am trying to connect oracle develper suit form with oracle 10g database
    but when i pass username and password
    this message apperars
    ORA-12560:TNS:protocol adapter error
    every time even i try to connect Report or Designer each time same problem
    making no connection .
    can any body help can help me to reslove this prblem
    Arshad khan

    Duplicate thread:
    Re: connection problem

  • Usage of java.sql.Timestamp with classes12.zip and ojdbc14.jar  ?

    Hi all,
    If i'm using java.sql.Timestamp with classes12 it is functioning perfectly,
    if i'm using ojdbc14 and java.sql.Timestamp it is functioning in different way and failing to do the action..
    Example : update set xxx=yy where time = my Timestamp object set in Prepared statement
    Hope to see the answer

    http://forum.java.sun.com/thread.jspa?threadID=460615&messageID=2116517
    Timestamp insert problem
    Using the "classes12.zip" file that comes with the distribution for Oracle versions 8.1.6.x and 8.1.7.x, Oracle's DATE datatype is mapped to the "java.sql.Timestamp" class. However, the "ojdbc14.jar" driver maps DATE to "java.sql.Date", and "java.sql.Date" only holds a date (without a time), whereas "java.sql.Timestamp" holds both a date and a time.

  • Connection to HDMI Mini when display is off is slow with ARD 3.x

    Anybody notice, well I don't know how you couldn't, that you connect to an HDMI Mini with the display off that the CPU is at 100% and you can't do anything until you turn on the display?  It is easy to reproduce.  I have my Mini hooked to a Yamaha A2000 stereo and when it is off any connection is so slow it is impossible to do anything until the stereo is turned on.  Turn it off and it will go back to 100% cpu usage.  I've seen so many posts about the 100% cpu usage I'm wondering if this is the root cause of issues.
    Dan

    I found out if I unplug the HDMI cable then I can remotely connect.  I'm wondering if the stereo I have the mini hooked up to is causing the issue or the mini is the issue.  I'll see what setup options I have on the stereo.

  • 4G connection super slow with freedome

    My internet connection is super slow with freedome. Normally without VPN I get 50Mdown and 10Mup, but with freedome I get only about 8Mdown and 10Mup. My ping is still pretty nice 35ms with your service. (normally I have 25ms ping) I use 4G USB tethered internet from motorola moto E phone. I already tried and they did nothing or made it worse: Tested many other servers/location, Disable firewall and other security applications, Reinstall windows (I had to do it anyway in near future), Made speed tests at different times and many times. I just made a year subcription for your service and atm your service is unusable for me.

    Hello The_Monkey,
    Sorry for not getting back to you earlier. Do you still observe  speed issues?
    Note that any VPN Application will lower connection speed. Also tethering isn't supported with Freedome. 

  • Connect Oracle 10g Developer with Oracle 8i database

    Is it possible to connect Oracle 10g Developer with Oracle 8i database. If possible then plz guide how i can.

    with Oracle Developer 10g 9.0.4 is no problem to connect to Oracle 8i.
    with Oracle Developer 10g 10.1.2. you need the Patch 8.1.7.4 for 8i, i think.

  • Non supported character set with ojdbc14.jar

    Hi.
    I have an application that uses JMS/AQ and works great under JDK1.4 and with libraries:
    -classes12.jar
    -nls_charset12.jar
    I looked at the oracle web site that says you should use the new JDBC drivers(ojdbc14.jar) but I fail to get it working. I keep getting;
    oracle.jms.AQjmsException: Non supported character set: oracle-character-set-178
    at oracle.jms.AQjmsSession.addDurableSubscriber(AQjmsSession.java:2616)
    at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2124)
    at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:1872)
    at prevision.socketserver.JMSThread.checkForNewAlarms(JMSThread.java:84)
    Any help would be greatly appreciated!
    Best regards,
    Christer Nordvik

    hi Christer,
    I have looked at the drivers download page at:http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html and there isn't any nls_charset12.jar for JDK1.4. I've tried using the one with JDK1.3
    There isn't any nls_charset12.jar for 1.4, its the one that comes with 1.3, just wanted to check it you are using the latest version of nls_charset12.jar
    BTW are you running this program from command-line or app server ? Incase of app server the latest jar's must be replaced in oc4j_home/jdbc/lib dir.
    Elango.

Maybe you are looking for