Strange problem: JDBC: Oracle Connection: Cursor hangs in ResultSet

Hi,
My program connects to an oracle db and queries all records (480'000) from a table with 4 columns (of which one, Z00_DATA, is of type LONG (and on average is about 1000 chars long)).
From my Windows machine, the program runs fine.
From a linux box the same program doesn't: it executes the statement, but when I skim through the returned resultset (even if I only count the number of records in it, it gets stuck on record 80. No exception thrown (I'm catching a general Exception object), it just hangs.
[[ while (rs.next) { counter++; System.out.println(counter);} ]]
When I change my query slightly and select only 3 columns (all except the LONG one), it runs fine again.
This seems very odd to me since I'm not even reading the data inside the resultSet. (I will later, I'm just debugging now).
Here's the code, if anyone can, please help.
Charlie
code:
public void getNoticesData(String tableName, String[][] cols){   
try {           
     // statements
     Statement stmt = alephConn.createStatement();
     String selectSQL = "select Z00_DOC_NUMBER, Z00_NO_LINES, Z00_DATA_LEN, Z00_DATA from lux01.z00";
     // get data from DB
     stmt.execute(selectSQL);
     ResultSet rs = stmt.getResultSet();
     p("SELECT SQL EXECUTED: " + selectSQL);
     int resultsCounter=0;
     // for all results
     while (rs.next()) {       
          resultsCounter++;
          p(resultsCounter + ", ");
     } // cursor
     // Close resources
     stmt.close();
catch (Exception e) {     
     p("Exception thrown: " + e);
finally {     
     p("Finally clause");
}

Hi,
My program connects to an oracle db and queries all
records (480'000) from a table with 4 columns (of
which one, Z00_DATA, is of type LONG (and on average
is about 1000 chars long)).
And what is the maximum?
And with the query order what is the size of the long field for the 80th row.
From my Windows machine, the program runs fine.
From a linux box the same program doesn't: it
executes the statement, but when I skim through the
returned resultset (even if I only count the number
of records in it, it gets stuck on record 80. No
exception thrown (I'm catching a general Exception
object), it just hangs.Orcacle drivers for some reason have a tendency to have odd problems.
What are the field types?
Do you have the long field at the end of the field list?
Try it with no data in the long field. And then increase it up to the maximum in the database.

Similar Messages

  • JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..

    JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..
    I am getting below error when i m trying to access oracle db using oracle 11g client. It works with earlier oracle client versions. how do i resolve this. is there any issue with version of ojdbc6.jar that i am using??? I cant use thin driver since its an old application for which i dont have source files.
    Apr 6, 2013 1:00:59 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:992)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at PettyCash.SysDate.getSysSubSys(SysDate.java:232)
    at org.apache.jsp.PettyCash.index_jsp._jspService(org.apache.jsp.PettyCash.index_jsp:186)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Code is as follow for reference
    import oracle.jdbc.driver.*;
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    conn = DriverManager.getConnection ("jdbc:oracle:oci8:@" + database,db_user, db_pass);
    eNVIRONMENT VARIABLES set are as follows:
    classpath
    C:\Program Files\apache-tomcat-5.5.12\common\lib\servlet-api.jar;C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\classes12.jar;C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\ojdbc6.jar;
    JAVA_HOME
    C:\Program Files\Java\jdk1.5.0_04
    PATH
    C:\Program Files\Java\jdk1.5.0_04\bin
    ORACLE_HOME
    D:\Oracle11\product\11.2.0\client_1\BIN

    Apr 8, 2013 5:24:06 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
         at org.apache.jsp.abc.index_jsp._jspService(org.apache.jsp.abc.index_jsp:280)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)

  • Strange problems in Oracle 8.1.7 driver

    Hi, gurus,
    I have a strange problem in Oracle 8.1.7 ODBC driver on Windows 2000 Server. I use Visual C++ and ODBC to access database information.
    Our program uses character with ASCII code bigger than 127, for example, 170, 132, etc.
    When I try to get characters from the database, the value is different than the one I put in. For example, if I put in 132, I get back 191. It is very strange, can someone please help me out?
    Thanks a lot.
    Jerry

    I'd speculate that you're either trying to insert a character that's not defined in the database's character set or that you have a problem where you're not being consistent about whether you're requesting/providing ASCII or Unicode data.
    What are your NLS settings, both on the client and on the database?
    Justin

  • Mars has broken existing JDBC Oracle connections

    Hi all,
    I've upgraded to Eclipse Mars - but loading the current workspace (I told it to upgrade from Luna for compatibility) has broken the JDBC Oracle connection.
    The only settings that may have changed are my machine's Java version. Windows 8.1 has caused me no end of bother recently by having multiple Java installations and being fussy interacting with both 64 and 32 bit versions. I got round this with Luna by forcing a path to v7 in eclipse.ini, but v6 is installed "as default" according to the control panel info. However, both 7 and 8 are supposedly installed.
    Using the new Eclipse installer, it was happy to function using the newest version of Java, but I don't think the binary app is reading it.
    Error fairly standard from Java - when testing connection
    "Cannot load JDBC Driver class: oracle.jdbc.OracleDrvier."
    Nothing has changed with the native Oracle instant client.
    Posted in both Eclipse and BIRT forums as it's BIRT I'm using.
    Any thoughts or more info needed?
    Thanks

    Fixed already: Mars needed to restore the previously used OJDBC.jar driver which didn't automatically get read for some reason.

  • Strange Problem in Oracle Forms.

    Hello,
    I have a strange problem of a form not opening in the migrated App Server but is working fine in the existing server.
    The problem is that we have now migrated to App Server 10.1.2.3.0 (patch applied to 10gR2 App Server installation) from 9.2.0.4.
    The issue is that the same form works perfectly fine in 9.2.0.4 but doesnt open up in the 10.1.2.3.0 server itself !
    The form is called using "new_form" procedure.
    I even cross checked by giving other form names; they work fine. But this set of forms (for which problem occurs) only doesnt open up.
    All the forms are compiled against 10.1.2.3 Compiler; All point to the same OLB and all of them have a common menu bar.
    Peculiar thing is WEBUTIL is working for all forms. Version is 1.0.6. No problems in WebUtil.
    Please help me making this sole out as we need to migrate this ASAP.
    Requesting one and all.
    Thanks.

    Solved it out..
    It was an error in frmwebutil.jar installation.
    Below is the link from Metalink:
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=421930.1
    Cheers !

  • JDBC Oracle Connectivity

    Hello All genius plz,
    I make a user in Oracle and add a table in it then i want to connect it with my java application what can i do Which driver i select Form DSN .And if any one send me sample code so i will be very thankful to u on [email protected]
    1 think i clear here that i already try lot of techinique like adding classes12.zip folder in my lib directory and also extracting and then add it. Setting classpath and try lot of DSN driver but nothing is work please help me on that.
    Regards
    Uzair Baig
    (Always belive in logic)

    Hello All genius plz,Ah! Finally someone understands! :)
    Connection
    con=DriverManager.getConnection("jdbc:oracle:thin:@127..0.1:1521:uzair","system","manager");
    Is that correct. and which driver i select form DSN
    1)Oracle ODBC driver OR 2)Microsoft ODBC driver for OracleThe connection string you are using will allow you to connect to your Oracle database using the Oracle thin (type 4) driver. The type 4 driver does not require any ODBC DSN. The type 4 driver does not use ODBC. The type 4 driver allows you to connect to your Oracle database from any machine that has the type 4 driver in it's CLASSPATH, there is no need for the Oracle client or any Oracle network setup on the client (TNS).
    The connection string looks OK to me, except the IP address which appears to be missing a zero (0).
    Make sure 1521 is the port that Oracle is listening for connections. The port number is user defined and is sometimes changed to allow for multiple listeners or for security reasons.

  • (ORA-12505) JDBC - Oracle connectivity Error

    Hi
    Experts
    I am SAP developer.
    I am trying to connecting remote server through webDynpro ( SAP programming Tool.) through JDBC. I can directly get connected to Oracle server through SQL plus.
    My code to establish connection is
    conn =DriverManager.getConnection ("jdbc:oracle:thin:@132.132.48.4:1521:orclahd.adaniahd.com","scott", "tiger");
    and i am getting exception.
         java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: 132.132.48.4:1521:orclahd.adaniahd.com

    your database is not registered with the listener.
    you need to go to the server and check the status of the listener to see if the database service is registered. If not you need to do it manually.
    LSNRCTL status

  • Jdbc oracle connection

    ADVERTISEMENT
    hi ,
    i can connect to oracle database. also can retrieve a row (as many
    elements in a row) into an object. however wen i retrieve many rows
    into an array of objects i get an error "ResultSet has no more data".
    However i can retrive many rows into an array of objects in
    pointbase database . same code isnt workin for oracle.
    I am using a inner class in the database contol.
    i am usin weblogic's 2XA driver to connect to oracle.
    please provide some insight.
    THANK YOU

    I have it working....the IP address was wrong.:)
    Is it possible to write a simple connection pool class common to all containers and driver vendors using reflections?

  • Connection Pool hangs

    Hello,
    We have a strange problem with Oracle Connetion pool on IAS 10.1.3.1.0.
    Sometimes (for example once a week, sometimes one a month) connection pool hangs. Enterprise Manager / Connection pool monitor page shows information about threads waiting for connection (see below) and users are unable to work with application.
    Connections In Use                1
    Free Connections                13
    Total Connections in Pool           14
    Threads Waiting for Connections      534
    WebApp installed on IAS is a simple Toplink based application. There are no strange messages in error logs, so why connection pool is unable to assign free connection to user ?
    Thanks in advance
    Tom
    Edited by: olos on Sep 30, 2008 8:57 PM

    Hello,
    Thanks for response. I will try if it is possible to test connection from AS control during next connection pool crash. BTW we must check if this situation is not caused by operation system (Linux) swapping process.
    Regards
    Tom
    My datasources file is:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <data-sources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd"
    schema-major-version="10" schema-minor-versio
    n="1">
    <managed-data-source connection-pool-name="Example Connection Pool"
    jndi-name="jdbc/OracleDS" name="OracleDS"/>
    <managed-data-source connection-pool-name="Bufor List Connection Pool"
    jndi-name="jdbc/BuforListDS" name="Bufor List Data Source"/>
    <connection-pool name="Example Connection Pool">
    <connection-factory
    factory-class="oracle.jdbc.pool.OracleDataSource" user="scott"
    password="tiger" url="jdbc:oracle:thin:@//localhost:1521/ORCL"/>
    </connection-pool>
    <connection-pool name="PRD Connection Pool"
    abandoned-connection-timeout="120" connection-retry-interval="3"
    max-connect-attempts="5" max-connections="200" min-connections="3"
    property-check-interv
    al="600">
    <connection-factory
    factory-class="oracle.jdbc.pool.OracleDataSource" user="user"
    password="password"
    url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=tcp)(HOST
    =host01)(PORT=1521))(ADDRESS=(PROTOCOL=tcp)(HOST=host02)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=SN.DOMENA.PL)))"/>
    </connection-pool>
    </data-sources>

  • Oracle Connection Manager

    Hi,
    i'm having a problem configuring Oracle Connection Manager. It does start the instance of connection manager
    Summary of my environment is
    10g Application server and infrastructure machine OS: Windows 2003
    9i Database Server: Windows 2003
    Client : Java Applet
    JDBC driver type : THIN
    Installed: 10g Infra first and then 10g midiier(portal and wireless) in seperate oracle homes on the same machine. Eveything is up and running as i was able to login seperately in infra and midtier enterprise managers.
    Final Goal : Trying to connect to an Oracle 9i database on a differnt machine than the appserver using an applet, thin drivers and Oracle Connection Manager
    Problem : Connection manager instance not started however cmanADMIn service started.
    CMCTL:CMAN_oracle9-app> administer cmanOracleAS
    Current instance cmanOracleAS is not yet started
    Connections refer to (address=(protocol=tcp)(host=10.10.1.101)(port=1610)).
    The command completed successfully.
    CMCTL:cmanOracleAS> startup
    Service Oracleoracle_infraCMAdmincmanOracleAS already running.
    TNS-04012: Unable to start Oracle Connection Manager instance.
    CMCTL:cmanOracleAS>
    Steps done to configure Oracle Connection manager
    1. Copied 4 .exe (CMADMIN, CMCTL,CMGW,CMMIGR) files to bin folder of Appserver or midtier's main ORACLE_HOME/BIN folder.
    2) created a cman.ora file and copied in appservers /NETWORK/ADMIN directory
    3) On cammand prompt type CMCTL...ADMINISTER cman_OracleAS where cman_OracleAS is the name of cman instance used in cman.ora file.
    My cman.ora file is as follows
    # Copyright (c) 2001,2002, Oracle Corporation. All rights reserved.
    # NAME
    # cman.ora
    # DESCRIPTION
    # Sample CMAN configuration file that the user can modify for their
    # own use.
    # NOTES
    # 1. Change <fqhost> to your fully qualified hostname
    # 2. Change <lsnport> to the listening port number
    # 3. Change <logdir> and <trcdir> to your log and trace directories
    # MODIFIED (MM/DD/YYYY)
    # asankrut 10/05/2002 - Added Rule List Specifications
    # asankrut 06/11/2002 - Modified to add new parameters; added comments.
    # asankrut 12/31/2001 - Creation.
    # CMAN Alias
    cmanOracleAS =
    (configuration=
    # Listening address of the cman
    (address=(protocol=tcp)(host=appserver_name)(port=1610))
    # Configuration parameters of this CMAN
    (parameter_list =
    # Need authentication for connection?
    # Valid values: boolean values for on/off
    (aso_authentication_filter=off)
    # Connection statistics need to be collected?
    # Valid values: boolean values for on/off
    (connection_statistics=yes)
    # Log files would be created in the directory specified here
    (log_directory=D:\GAV\OracleAS10\NETWORK\log)
    # Logging would be in done at this level
    # Valid values: OFF | USER | ADMIN | SUPPORT
    (log_level=ADMIN)
    # Maximum number of connections per gateway
    # Valid values: Any positive number (Practically limited by few 1000s)
    (max_connections=256)
    # Idle timeout value in seconds
    # Valid values: Any positive number
    (idle_timeout=0)
    # Inbound connect timeout in seconds
    # Valid values: Any positive number
    (inbound_connect_timeout=0)
    # Session timout in seconds
    # Valid values: Any positive number
    (session_timeout=0)
    # Outbound connect timeout in seconds
    # Valid values: Any positive number
    (outbound_connect_timeout=0)
    # Maximum number of gateways that can be started
    # Valid values: Any positive number (Practically limited by
    # system resources)
    (max_gateway_processes=16)
    # Minimum number of gateways that must be present at any time
    # Valid values: Any positive number (Practically limited by
    # system resources)
    # max_gateway_processes > min_gateway_processes
    (min_gateway_processes=2)
    # Remote administration allowed?
    # Valid Values: Boolean values for on/off
    (remote_admin=on)
    # Trace files would be created in the directory specified here
    (trace_directory=D:\GAV\OracleAS10\NETWORK\trace)
    # Trace done at this level
    # Valid values: OFF | USER | ADMIN | SUPPORT
    (trace_level=ADMIN)
    # Is timestamp needed with tracing?
    # Valid values: Boolean values for on/off
    (trace_timestamp=on)
    # Length of the trace file in kB
    # Valid values: Any positive number (Limited practically)
    (trace_filelen=1000)
    # No. of trace files to be created when using cyclic tracing
    # Valid values: Any positive number
    (trace_fileno=1)
    # Maximum number of CMCTL sessions that can exist simultaneously
    # Valid values: Any positive number
    (max_cmctl_sessions=4)
    # Event logging: event groups that need to be logged
    (event_group=init_and_term,memory_ops)
    # Rule list
    # Rule Specification:
    # src = Source of connection; '*' for 'ANY'
    # dst = Destination of connection; '*' for 'ANY'
    # srv = Service of connection; '*' for 'ANY'
    # act = Action: 'accept', 'reject' or 'drop'
    # Action List Specification:
    # aut = aso_authentication_filter
    # moct = outbound_connect_timeout
    # mct = session_timeout
    # mit = idle_timeout
    # conn_stats = connect_statistics
    (rule_list=
    (rule=
    (src=*)(dst=databaseIP)(srv=*)(act=accept)
    (action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
    (rule=
         (src=appserverIP)(dst=127.0.0.1)(srv=cmon)(act=accept)
    Please help
    Thanks
    Atul Jain
    [email protected]

    Forgot to mention that
    cmanOracleAS.log file i.e connection manger log file is as follows.
    It says does not currently know of service 'cmon' but i have the rule which
    allows cmctl to conect locally with 127.0.0.1 .
    TNSLSNR for 32-bit Windows: Version 10.1.0.3.0 - Production on 17-MAR-2005
    12:17:53
    Copyright (c) 1991, 2004, Oracle. All rights reserved.
    System parameter file is D:\GAV\oracle_infra\network\admin\sqlnet.ora
    Command-line specified parameter file is D:\GAV\oracle_infra\network\admin\
    cman.ora
    Log messages written to D:\GAV\OracleAS10\NETWORK\log\cmanoracleas1_924.log
    Trace information written to D:\GAV\OracleAS10\NETWORK\trace\
    cmanoracleas1_924.trc
    Trace level is currently 6
    Started with pid=332
    Running in PROXY mode
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.1.101)
    (PORT=1610)))
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    17-MAR-2005 12:22:07 * (connect_data=(service_name=cmon)(pid=ctl)) *
    (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.1.101)(PORT=4589)) * establish * cmon *
    12514
    TNS-12514: TNS:listener does not currently know of service requested in
    connect descriptor
    17-MAR-2005 12:22:10 * (connect_data=(service_name=cmon)(pid=ctl)) *
    (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.1.101)(PORT=4596)) * establish * cmon *
    12514
    TNS-12514: TNS:listener does not currently know of service requested in
    connect descriptor
    17-MAR-2005 12:23:31 * (connect_data=(service_name=cmon)(pid=ctl)) *
    (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.1.101)(PORT=4782)) * establish * cmon *
    12514
    Thanks
    Atul jain

  • PHP Oracle connection randomly slow

    Hello,
    I have a very strange problem concerning the connection to a oracle database with php. Sometimes the same SQL-Statement takes a very long time to load for no obvious reason (more than 5 minutes). But if you try it later it pops up at once. During the waiting time Toad is just showing "SQL*Net message from client" for the session.
    Here the code:
    $db = "<connection string>";
    $c = oci_connect("user", "pwd", $db);
    $s = ociparse($c, "select content from database WHERE CATEGORY = '$category'");
    if(ociexecute($s)) {
    while (ocifetch($s))
    echo ociresult($s, "CONTENT");
    Maybe I should also mention that I'm using a page with frames with a navigation bar on the left which loads the code in the frame on the right with the variable $category. We are using Oracle9i Release 9.0.1 .
    I would really appreciate any help.

    Perceived slowness is something that is dealt with by using process called "tuning". Tuning process requires an extensive knowledge because it should go from end to end, starting with the application. There may be an issue with your application, database, operating system, middle tier or network and one has to know all of the above to be able to tune the application properly. It's always the application one tunes, because it's the application that makes the end users unhappy. In your posts, there is not enough information to even begin thinking about tuning, so I will outline the tuning process for you. One always begins the tuning process by blaming the network and by letting the network engineers use sniffer and dig out the slow component. Typical response from the network people is "network is OK but the server XXX is slow with responses
    and that's what causing the timeouts"). Now you know where the problem is so you can concentrate on a single server and figure out what the problem is. Whatever the problem is, it is usually solved by improving the cache hit ratio by increasing the SGA. Network engineers are
    used to that and they do not mind, but if you want to be mr. nice guy, you can go directly to your boss and ask him for more memory. That is so called modified method C, by Cary Millsap. That is why it's called "method C".

  • JDBC Connection problem in Oracle 11g

    Hello Everyone,
    Recently we have upgraded our Oracle server from 9.2 to 11g. Since then our Java program scheduled in a shell script (on the Sun Unix server) is not working
    and is giving below error
    "java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified"
    What is strange is that our Web application which is on the same server (application server is iPlanets) is able to connect successfully. Also I ran the same program on
    my local machine and it is able to connect to the 11g database. It is only on unix server (where the app server resides) that is giving problem. FYI the unix server
    does not have Oracle client installed so we are using the below in db.properties file (used by application for connection details).
    URL=jdbc:oracle:thin:@59.90.26.156:1521:LDPR
    The Web application and the stand alone java program (giving problem) call the same program to db connection and also share the same environment (class folder/library files etc).
    Also the program was working perfectly fine with Oracle 9.2. Please suggest the solution as I have tried everything that came to my mind.
    Regards,
    Sid.

    Hi ...
    Yeah BPEL connect from the back end rather than using weblogic, but to change it ... we need to change the code from BPEL side to connect from the weblogic JDBC services.

  • Lot of cursors hanging even the jdbc connection are closed

    We use tomcat and thin oracle driver for out application. But we found lot of cursors hanging even the jdbc connection are closed.
    We use a connection pool to manage the connections.

    after properly closing the connections ,try to set all the Connection objects and ResulSet objects to null (force to null) , most likely these inactive sessions will dissapear.
    might be a java garbage collection issue?
    anyhow. I managed to get most of these inactive sessions to disappear. although I am using a Servlet. some of them are still not closed
    Regards

  • Problem to establish connection between Oracle SQL and JDBC

    Hi friends i have been trying this code from two days i donno whats wrong please try to sort the problem thank u in advance this is my program:
    //This is my Connection class
    package com.java.jdbc.util;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class EmployeeUtil {
    public EmployeeUtil()
    public static Connection getconnection()
    Connection con=null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORANT","system","manager");
    // Class.forName("sun.jdbc.odbc.OracleDriver").newInstance();
    // con = DriverManager.getConnection("jdbc:odbc:Javatut","System","manager");
    } catch (ClassNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (InstantiationException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IllegalAccessException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return con;
    //This is my DB class:
    package com.java.jdbc.DB;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import com.java.jdbc.info.EmployeeInfo;
    import com.java.jdbc.util.EmployeeUtil;
    public class EmployeeDB {
    Connection connection=null;
    public EmployeeDB()
    //this.connection=EmployeeUtil.getconnection();
    public void select(EmployeeInfo empinfo)
    this.connection=EmployeeUtil.getconnection();
    String stb = "select * from employee";
    try {
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery(stb);
    System.out.println(rs);
    //EmployeeInfo empinfo = new EmployeeInfo();
    while(rs.next())
    empinfo.setEmpId(rs.getString(1));
    empinfo.setEmpfName(rs.getString(2));
    empinfo.setEmplName(rs.getString(3));
    empinfo.setEmpAge(rs.getString(4));
    empinfo.setEmpSalary(rs.getString(5));
    System.out.println("The EmployeeID is : "+empinfo.getEmpfName());
    System.out.println("The Employee First Name is : "+empinfo.getEmpfName());
    System.out.println("The Employee Last Name is : "+empinfo.getEmplName());
    System.out.println("The Employee Age is : "+empinfo.getEmpAge());
    System.out.println("The Employee Salary is : "+empinfo.getEmpSalary());
    connection.commit();
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    //This is my info object
    package com.java.jdbc.info;
    public class EmployeeInfo {
    private String empId;
    private String empfName;
    private String emplName;
    private String empAge;
    private String empSalary;
    public String getEmpAge() {
    return empAge;
    public void setEmpAge(String empAge) {
    this.empAge = empAge;
    public String getEmpfName() {
    return empfName;
    public void setEmpfName(String empfName) {
    this.empfName = empfName;
    public String getEmpId() {
    return empId;
    public void setEmpId(String empId) {
    this.empId = empId;
    public String getEmplName() {
    return emplName;
    public void setEmplName(String emplName) {
    this.emplName = emplName;
    public String getEmpSalary() {
    return empSalary;
    public void setEmpSalary(String empSalary) {
    this.empSalary = empSalary;
    //This is my Controller class:
    package com.java.jdbc.controller;
    import com.java.jdbc.DB.EmployeeDB;
    import com.java.jdbc.info.EmployeeInfo;
    public class EmployeeController {
    public static void main(String args[])
    EmployeeDB empdb = new EmployeeDB();
    EmployeeInfo emp = new EmployeeInfo();
    empdb.select(emp);
    // I got these errors:
    java.sql.SQLException: Io exception: Got minus one from a read call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.java.jdbc.util.EmployeeUtil.getconnection(EmployeeUtil.java:18)
    at com.java.jdbc.DB.EmployeeDB.select(EmployeeDB.java:20)
    at com.java.jdbc.controller.EmployeeController.main(EmployeeController.java:11)
    Exception in thread "main" java.lang.NullPointerException
    at com.java.jdbc.DB.EmployeeDB.select(EmployeeDB.java:23)
    at com.java.jdbc.controller.EmployeeController.main(EmployeeController.java:11)

    Are you using Oracle 10.2 in shared server configuration under Windows?
    If so it's a driver bug (BUG - Connection pooling with 10g 10.1.3 Preview 4 App Server Oracle suggest to use OCI driver.

  • JDBC Connection Driver Problem for Oracle in a J2EE servlet/class

    Hi,
    I am having a big problem with setting up a JDBC connection with my oracle database, I have been trying to fix it for about 6 hours now with no joy, I have read that many threads about JDBC, class paths etc.. that i dont know which way is up any more!!
    Here is the issue:
    (Please bare in mind that I am new to this when posting replies)
    I have a Web Application set up as a project in the netbeans IDE. I have a servlet which creates a new object call dbaseFunc which is a public class I have wrote and within this class is a function called getAppConfigCon(). The code for this function is below:
    public Connection getAppConfigCon()
    Connection con = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","cavdev", "password");
    catch (SQLException e)
    e.printStackTrace();
    catch (ClassNotFoundException e)
    e.printStackTrace(System.out);
    return con;
    The database is Oracle XE and is installed on the same machine I am developing on, the database is up and I can connect to it via the netbeans IDE database interface after telling it where the driver is (C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.zip). Obviously this is just IDE functionality and allows you to browse the database objects from netbeans however I now need to know how to tell the jre where the drivers are, right??
    Well like I said multiple forums led me down the classpath route and I have a system environment variable called CLASSPATH set up with the oracle jdbc driver specified as its value, when i run the set command from the command line ( I am running Windows XP Pro) I can see the class path entry in the output as follows:
    CLASSPATH=C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.zip
    When I try to run my web app it doesnt assign the connection object with a value, i.e. when i was debugging my con object was null after calling the method mentioned above. After some time debugging i found a ClassNotFoundException was being thrown when the following command was executed:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Which I understand is because their is a problem with the class path but what is the problem??? The IDE likes the driver so why doesnt the jre.
    I am runnin jdk and jre 1.5, an Oracle XE Database using the netbeans environment.
    Some one please help me, I have spent far to much time on this rather than actually working on my project!!!!
    Thanks
    Keith

    Well After 10.5 hrs I actually sorted this myself, the two problems that were throwing me were this:
    1. Netbeans does not stop the tomcat server when it finishes running the app, you either have to stop the server from the menu or exit netbeans, until the server restarts it will not pick up on any driver files you add to common/lib
    2. You are very right Kiros tomcat does not do .zip files!!!!~~~###
    In order to sort this I had to add the oracle driver as a package to my project using the netbeans ide Project > Libraries > New Jar file, this allowed me to access the oracle classes. Then I had to set the server up to deal with the drivers as well, this meant adding the .jar file (not the latest .zip as it wont work) to the bundled tomcat common lib directory and restart the server via the ide (using the start/stop bat files in the tomcat conf directory doesnt work for some reason when its bundled with netbeans!)
    Thanks for the help guys but in the end it took 10 hrs a lot of reading and 2 bottles of lucozade to keep the brain goin.
    Keith

Maybe you are looking for

  • How do I stop an automatic 'sharing' of my files with another Mac user in my address book?

    Hi all I have just installed Lion and it has started to 'share' access to other mac users files - all of which come from my address book. How do I stop this and delate the links that have been created ? Very embarrassing right now - some of these peo

  • Opening document in Word, sent from a PC.

    Since I updated to Snow Leopard I can't open e-mail attached documents in Word. The system wants to use Pages, which I do not have installed.  Why does it do that?  Any ideas how I can have the attachment open in Word?

  • Problems with my processor

    Tengo un procesador AMD 64 bits con MSI 8T, el problema viene que el equipo se reinicia cada dos por tres con windows xp, el código que muestra windows es el siguiente 0x0000007e (0xc0000005,0x805922ce,0xf8966f60,0xf8966c60). Gracias I have got a AMD

  • Error in database ltdx(lt)

    I have this sentente in a program; IMPORT LT_DBFIELDCAT TO RT_DBFIELDCAT        LT_DBSORTINFO TO RT_DBSORTINFO        LT_DBFILTER   TO RT_DBFILTER        LT_DBLAYOUT   TO RT_DBLAYOUT                      FROM DATABASE LTDX(LT)                      ID

  • Looking for old mac os 9 software called "The Music Maid"

    My wife is a music teacher and needs this software installed on an old OS  9 laptop to access old music files we have for her Marching Band.