ConnectionPool crashes once database server is down

Hi,
I have written a connection pool to connect to a Oracle database from a servlet script. The connection pool creates a pool of say 5 connections and when required a servlet picks up a connection from the pool uses it and then frees it. Now once the database server goes down the servlet throws sqlexception when it tries to connect to the database with the connection obtained from the pool...this is just fine. But now even if the database is up and running again the servlet still throws the same SQLException(IO problem). I have to restart the Application server to get my servlet working again.
Does anyone have any idea about why this happens ?????????

Seems to me that your Connection object should catch the "failed to connect" error and set an internal flag to indicate that it is now unusable. (And then throw that error on to its caller, of course.) And then the code that gives out Connections from the pool should inspect that flag, and if the Connection is unusable it should throw it away and try to create a new one.

Similar Messages

  • Why does my database server shut down frequently?

    My DB Server just has one HardDisk and 1024MB ram,OS is W2K,RDBMS is Oracle 8i.But it is shutted automatically in often.It doesn't work unless you restart the service or restart the computer.My initORCL.ora file configed as following,could you point where the failure is ?
    open_cursurs=600
    db_buffer=32000
    share_pool_size=256M
    large_pool_size=100M
    java_pool_size=50M
    log_buffer=16M
    db_block_size=8192
    processes=500
    Thanks a lot!

    Thanks.The following paragraph is in my alert.log,but I can not find the problem yet.And in my trace file ,there is no information for that day.
    Sun Apr 06 05:15:53 2003
    Thread 1 advanced to log sequence 282
    Current log# 3 seq# 282 mem# 0: D:\ORACLE\ORADATA\MPTDATA\REDO03.LOG
    Mon Apr 07 05:15:29 2003
    Thread 1 advanced to log sequence 283
    Current log# 1 seq# 283 mem# 0: D:\ORACLE\ORADATA\MPTDATA\REDO01.LOG
    Dump file D:\Oracle\admin\mptdata\bdump\mptdataALRT.LOG
    Mon Apr 07 19:32:42 2003
    ORACLE V8.1.6.0.0 - Production vsnsta=0
    vsnsql=e vsnxtr=3
    Windows 2000 Version 5.0 , CPU type 586
    Starting up ORACLE RDBMS Version: 8.1.6.0.0.
    System parameters with non-default values:
    processes = 500
    shared_pool_size = 134217728
    large_pool_size = 1048576
    java_pool_size = 20971520
    control_files = D:\Oracle\oradata\mptdata\control01.ctl, D:\Oracle\oradata\mptdata\control02.ctl, D:\Oracle\oradata\mptdata\control03.ctl
    db_block_buffers = 32000
    db_block_size = 8192
    compatible = 8.1.0
    log_buffer = 16777216
    log_checkpoint_interval = 10000
    log_checkpoint_timeout = 1800
    db_files = 1024
    db_file_multiblock_read_count= 8
    max_enabled_roles = 30
    remote_login_passwordfile= EXCLUSIVE
    global_names = TRUE
    distributed_transactions = 10
    instance_name = mptdata
    service_names = mptdata
    mts_dispatchers = (protocol=TCP)
    open_links = 4
    sort_area_size = 65536
    sort_area_retained_size = 65536
    db_name = mptdata
    open_cursors = 600
    os_authent_prefix =
    job_queue_processes = 4
    job_queue_interval = 60
    parallel_max_servers = 2
    background_dump_dest = D:\Oracle\admin\mptdata\bdump
    user_dump_dest = D:\Oracle\admin\mptdata\udump
    max_dump_file_size = 10240
    oracle_trace_collection_name=
    PMON started with pid=4
    DBW0 started with pid=7
    LGWR started with pid=13
    CKPT started with pid=19
    SMON started with pid=24
    RECO started with pid=30
    SNP0 started with pid=6
    SNP1 started with pid=14
    SNP2 started with pid=20
    SNP3 started with pid=23
    Mon Apr 07 19:32:46 2003
    starting up 1 shared server(s) ...
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    Mon Apr 07 19:32:47 2003
    alter database mount exclusive
    Mon Apr 07 19:32:55 2003
    Successful mount of redo thread 1, with mount id 1041561895.
    Mon Apr 07 19:32:55 2003
    Database mounted in Exclusive Mode.
    Completed: alter database mount exclusive
    Mon Apr 07 19:32:55 2003
    alter database open
    Beginning crash recovery of 1 threads
    Mon Apr 07 19:33:00 2003
    Thread recovery: start rolling forward thread 1
    Recovery of Online Redo Log: Thread 1 Group 1 Seq 283 Reading mem 0
    Mem# 0 errs 0: D:\ORACLE\ORADATA\MPTDATA\REDO01.LOG
    Mon Apr 07 19:33:01 2003
    Thread recovery: finish rolling forward thread 1
    Thread recovery: 0 data blocks read, 0 data blocks written, 0 redo blocks read
    Crash recovery completed successfully
    Mon Apr 07 19:33:05 2003
    Thread 1 advanced to log sequence 284
    Thread 1 opened at log sequence 284
    Current log# 2 seq# 284 mem# 0: D:\ORACLE\ORADATA\MPTDATA\REDO02.LOG
    Successful open of redo thread 1.
    Mon Apr 07 19:33:07 2003
    SMON: enabling cache recovery
    SMON: enabling tx recovery
    Mon Apr 07 19:33:13 2003
    Completed: alter database open
    Mon Apr 07 19:39:31 2003
    Shutting down instance (immediate)
    License high water mark = 37
    Mon Apr 07 19:40:36 2003
    alter database close normal
    Mon Apr 07 19:40:36 2003
    SMON: disabling tx recovery
    SMON: disabling cache recovery
    Mon Apr 07 19:40:40 2003
    Thread 1 closed at log sequence 284
    Mon Apr 07 19:40:40 2003
    Completed: alter database close normal
    Mon Apr 07 19:40:40 2003
    alter database dismount
    Completed: alter database dismount
    archiving is disabled
    Dump file D:\Oracle\admin\mptdata\bdump\mptdataALRT.LOG
    Mon Apr 07 19:41:42 2003
    ORACLE V8.1.6.0.0 - Production vsnsta=0
    vsnsql=e vsnxtr=3
    Windows 2000 Version 5.0 , CPU type 586
    Starting up ORACLE RDBMS Version: 8.1.6.0.0.
    System parameters with non-default values:
    processes = 500
    shared_pool_size = 268435456
    large_pool_size = 943718400
    java_pool_size = 20971520
    control_files = D:\Oracle\oradata\mptdata\control01.ctl, D:\Oracle\oradata\mptdata\control02.ctl, D:\Oracle\oradata\mptdata\control03.ctl
    db_block_buffers = 32000
    db_block_size = 8192
    compatible = 8.1.0
    log_buffer = 16777216
    log_checkpoint_interval = 10000
    log_checkpoint_timeout = 1800
    db_files = 1024
    db_file_multiblock_read_count= 8
    max_enabled_roles = 30
    remote_login_passwordfile= EXCLUSIVE
    global_names = TRUE
    distributed_transactions = 10
    instance_name = mptdata
    service_names = mptdata
    mts_dispatchers = (protocol=TCP)
    open_links = 4
    sort_area_size = 65536
    sort_area_retained_size = 65536
    db_name = mptdata
    open_cursors = 200
    os_authent_prefix =
    job_queue_processes = 4
    job_queue_interval = 60
    parallel_max_servers = 2
    background_dump_dest = D:\Oracle\admin\mptdata\bdump
    user_dump_dest = D:\Oracle\admin\mptdata\udump
    max_dump_file_size = 10240
    oracle_trace_collection_name=
    PMON started with pid=3
    DBW0 started with pid=6
    LGWR started with pid=11
    CKPT started with pid=15
    SMON started with pid=19
    RECO started with pid=24
    SNP0 started with pid=28
    SNP1 started with pid=32
    SNP2 started with pid=36
    SNP3 started with pid=5
    Mon Apr 07 19:41:46 2003
    starting up 1 shared server(s) ...
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    Mon Apr 07 19:41:47 2003
    alter database mount exclusive
    Mon Apr 07 19:41:54 2003
    Successful mount of redo thread 1, with mount id 1041535042.
    Mon Apr 07 19:41:54 2003
    Database mounted in Exclusive Mode.
    Completed: alter database mount exclusive
    Mon Apr 07 19:41:54 2003
    alter database open
    Mon Apr 07 19:41:57 2003
    Thread 1 opened at log sequence 284
    Current log# 2 seq# 284 mem# 0: D:\ORACLE\ORADATA\MPTDATA\REDO02.LOG
    Successful open of redo thread 1.
    Mon Apr 07 19:41:57 2003
    SMON: enabling cache recovery
    SMON: enabling tx recovery
    Mon Apr 07 19:42:01 2003
    Completed: alter database open
    Shutting down instance (immediate)
    License high water mark = 52
    Mon Apr 07 22:28:45 2003
    alter database close normal
    Mon Apr 07 22:28:45 2003
    SMON: disabling tx recovery
    SMON: disabling cache recovery
    Mon Apr 07 22:28:49 2003
    Thread 1 closed at log sequence 284
    Mon Apr 07 22:28:50 2003
    Completed: alter database close normal
    Mon Apr 07 22:28:50 2003
    alter database dismount
    Completed: alter database dismount
    archiving is disabled
    Dump file D:\Oracle\admin\mptdata\bdump\mptdataALRT.LOG
    Mon Apr 07 22:29:24 2003
    ORACLE V8.1.6.0.0 - Production vsnsta=0
    vsnsql=e vsnxtr=3
    Windows 2000 Version 5.0 , CPU type 586
    Starting up ORACLE RDBMS Version: 8.1.6.0.0.
    System parameters with non-default values:
    processes = 500
    shared_pool_size = 268435456
    large_pool_size = 943718400
    java_pool_size = 20971520
    control_files = D:\Oracle\oradata\mptdata\control01.ctl, D:\Oracle\oradata\mptdata\control02.ctl, D:\Oracle\oradata\mptdata\control03.ctl
    db_block_buffers = 32000
    db_block_size = 8192
    compatible = 8.1.0
    log_buffer = 16777216
    log_checkpoint_interval = 10000
    log_checkpoint_timeout = 1800
    db_files = 1024
    db_file_multiblock_read_count= 8
    max_enabled_roles = 30
    remote_login_passwordfile= EXCLUSIVE
    global_names = TRUE
    distributed_transactions = 10
    instance_name = mptdata
    service_names = mptdata
    mts_dispatchers = (protocol=TCP)
    open_links = 4
    sort_area_size = 65536
    sort_area_retained_size = 65536
    db_name = mptdata
    open_cursors = 600
    os_authent_prefix =
    job_queue_processes = 4
    job_queue_interval = 60
    parallel_max_servers = 2
    background_dump_dest = D:\Oracle\admin\mptdata\bdump
    user_dump_dest = D:\Oracle\admin\mptdata\udump
    max_dump_file_size = 10240
    oracle_trace_collection_name=
    PMON started with pid=4
    DBW0 started with pid=8
    LGWR started with pid=14
    CKPT started with pid=21
    SMON started with pid=28
    RECO started with pid=35
    SNP0 started with pid=42
    SNP1 started with pid=49
    SNP2 started with pid=56
    SNP3 started with pid=63
    Mon Apr 07 22:29:28 2003
    starting up 1 shared server(s) ...
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    Mon Apr 07 22:29:29 2003
    alter database mount exclusive
    Mon Apr 07 22:29:36 2003
    Successful mount of redo thread 1, with mount id 1041548688.
    Mon Apr 07 22:29:36 2003
    Database mounted in Exclusive Mode.
    Completed: alter database mount exclusive
    Mon Apr 07 22:29:36 2003
    alter database open
    Mon Apr 07 22:29:38 2003
    Thread 1 opened at log sequence 284
    Current log# 2 seq# 284 mem# 0: D:\ORACLE\ORADATA\MPTDATA\REDO02.LOG
    Successful open of redo thread 1.
    Mon Apr 07 22:29:39 2003
    SMON: enabling cache recovery
    SMON: enabling tx recovery
    Mon Apr 07 22:29:42 2003
    Completed: alter database open

  • In TestStand 2.0, will a record be lost if an Oracle database server is down? Can it be written to a file to be entered later?

    I currently have TestStand 2.0 setup to log information to an Oracle 8i server located on a network. Everything works correctly; however, if I lose the network connection, what happens to the database record that is,or would be, created? Is it lost? Can it be saved to a file and entered into the database at a later date?

    TestStand has no built in mechanism for handling a database that is offline. The logging sequence will generate an error if it is unable to write. You could modify the sequence to trap the error, write to a backup file, and then transfer the records when the database is back on line. What we're implementing here is to always write to a local database and an ActiveX component running in the background transfers records to the network database when it is available.

  • Error when starting up my database server

    . I was taking a backup for the:
    (1) Oracle Online Backup & Recovery,
    (2) File System.
    By the time I zip system files, database server went down due to the power failure.
    Thats were problem started.

    If you have issue in database server boot .. You can contact SYS admin .
    fater server up .. you can try to startup db.if it doesnot start automatically
    --Girish                                                                                                                                                                                                                                                                                                                                           

  • If RH Server's database goes down, does RH Server go down also?

    Hi experts. I've a couple RH Server questions:
    Supposing RH Server's database fails, or at least it's connection to the database fails. What would be the consequences. That is, would RH Server crash and not serve up anything. Or, would it simply be that reports are no longer accessible, etc.
    Has anyone used RH Server (installed on a Win 7 system) connected to a SQL Server Express instance (installed on another Win 7 system to spread CPU load).
    My IT Manager is very leery of the free database option (for performance/reliability reasons), but there's no way we're going to spend almost 20K$ on SQL Server or Oracle DB. So, I'd like to allay his concerns about the SQL Service Express option.
    Thanks in advance.
    -Kurt

    Rh Server *is* a database-driven application and as such it requires a database be up and working for both serving content as well as reporting.
    Your IT person raises good points. I have used the "SQL Express" version without issues. As your IT person already knows, there are certain Microsoft connection and size limitations on its use. Otherwise it would be better than Access and assuming it fits the other DB/OS combination requirements I noted in the links above.
    Unless something has changed, the open-source Apache Tomcat Server itself does not support "Load Balancing" and so I don't think you can "spread the CPU load". Although I am not that network savvy, so a call to Adobe support (asking to be escalated for Rh Server-specific assistance) to verify this would be a good idea. That said, I know organizations that have set up "fault tolerance" configurations to their satisfaction (but can't be more specific than that.)
    Thanks
    John Daigle
    Adobe Certified RoboHelp and Captivate Instructor
    Evergreen, Colorado
    303-670-8955
    www.showmethedemo.com

  • My iPhone 4S has crashed 7 times. I hold down the home key and on button to reboot. I tried a restore but has crashed once since. Do I have a faulty phone ?

    My new iPhone 4S has crashed 7 times ie the screen does not come back on when I press the home key. I hold down the home key and on button to reboot and it always comes back. I tried a restore but it has crashed once since. Is this right  ? Do I have a faulty phone ? Any suggestions ?

    Does the screen come back on if you press the sleep/power button?
    Have you tried powering down (hold sleep/power button and swipe red slider) then power back up?  Power cycling sometimes will clear problems.
    If neither works, and you can get to an Apple store, have the genius bar folks try it out...they are very good about replacement if faulty.

  • Cannot connect to the configuration database when App Server is down

    Hi, 
    We had a App Server not come up after a restart.
    When trying to access a site we get
    the "Cannot connect to the configuration database"
    We have now started the App Server and everything working again...
    My problem, there are 2 WFE servers with NLB Configured apart of the App Server ....Why wont the site work and why cant i connect to config DB?
    Something must be misconfigured? Sites should be connecting to the WFE servers and work if App server is down.
    Yes, NLB Points to the WFE Servers.
    Any ideas where i can look? This is a Project PWA Server, not sure if that will make a difference but the root SharePoint site had the same issue.
    Thanks

    Hi Danie,
    is it possible that the SQL Server is running on the same box as the SharePoint (application) server? This would be the only thing that can explain the symptoms. Please check following:
    IP address of the SharePoint Application server by typing nslookup AppServerName on the SharePoint WFE in Command Prompt (cmd.exe). Replace
    AppServerName with the FQDN of the application server, e.g. appserver.domain.local
    IP address of the SQL server by typing nslookup SQLServerName on the SharePoint WFE in Command Prompt (cmd.exe). Replace
    SQLServerName with the FQDN of the SQL server, e.g. sqlserver.domain.local
    SQL Server alias configuration by checking the entries in the cliconfg.exe on both SharePoint WFEs
    In most cases, SQL server has nothing to do with the SharePoint Application server role and it is stored on the separate box. My guess here is that the farm started as one-server farm setup and over the time got expanded by additional 2 WFEs, moving
    Web Server roles from the initial server, leaving it with the application role (service applications) and SQL server on the same box.
    But, I am just making an educated guess here. Can you provide some additional information?
    Hth,
    Aleks

  • Mimic Database/Server crash

    Guys,
    What is the best way to mimic Database/Server crash to test the backup and recovery strategy?
    Thanks

    Unplug the server. I'm not joking, that's the way I do it on my laptop (on which I installed Oracle). If you want a more elegant way, a "shutdown abort" is exactly like an instance crash.
    Daniel

  • My iPhone 3Gs has started crashing when using apps once the battery gets down to around 80%.

    My iPhone 3Gs has started crashing when using apps once the battery gets down to around 80%. Sometimes it will reboot on its own, and other times you have to leave it for an hour or so and then manually turn the phone on again. Any ideas?

    Did you try to reset the phone by holding the sleep and home button until the Apple logo comes up again?
    If this does not work, try to save as much data as you can and set it up "as new device": How to back up your data and set up as a new device

  • JMS Exception when server goes down (Urgent) ?

    Hi All,
    I have three topics in the JMS Server which is on the top of Web logic server 8.1.
    On the client side I have Swing thick cleint.For each topic I have a listener.
    When the web logic server goes down ( I shut down manually ) Only one listener is recieving the Exception and the Swing client reacts accordingly.
    After this ,
    Client continousoly checks whether the server is up or not. Once the server is up again the Exception is thrown that server is down ( I guess now the second listener is recieving the message).
    After some time again the third listener recives the message.....
    and the client reacts on that exception 3 times.
    How can I get rid of this ?
    thanks in advance.
    san

    Hi,
    this is probably a very good question to ask support. 'Logical' deployment sequence
    was added to the WebLogic only recently (6.1sp?) ('logical' means that first datasources
    are deployed, then EJB's and then web-apps, deployment-order parameter was added etc).
    So, for applications where shutdown sequence is important there must be a document which
    describes how server shutdown works.
    On the other hand, this may not be as important as deployment sequence, because running
    instance can crash at any time and it should not affect anything.
    Jen <[email protected]> wrote:
    Repost
    Hi,
    Most of my ejbs use connection from the connection pool. At the weblogic server shut
    down time (heavy load), I can see the jsps call the ejb, sometime jsp can't find
    the bean because it's removed from jndi. sometime jsp found the bean but when the
    bean try to talk to database, ejb can't use the connection because the datasource
    is removed from jndi. Also my shutdown class waits for the threads finish up, and
    the threads calls the ejb and do the db operation, and the conn is cut when the db
    operation is half way. So, the order of events when server shut down is important
    to me. I am wondering how other people deal with it. Thanks --
    Dimitri

  • Can a long running batch job causing deadlock bring server performance down

    Hi
    I have a customer having a long running batch job (approx 6 hrs), recently we experienced performance issue where the job now taking &gt;12 hrs. The database server is crawling. Looking at the alert.log showing some deadlock,
    The batch job are in fact many parallel child batch job that running at the same time, that would have explain the deadlock.
    Thus, i just wondering any possibility that due to deadlock, can cause the whole server to be crawling, even connect to the database using toad is also getting slow or doing ls -lrt..
    Thanks
    Rgds
    Ung

    Kok Aik wrote:
    According to documentation, complex deadlock can make the job appeared hang & affect throughput, but it didn't mentioned how it will make the whole server to slow down. My initial thought would be the rolling back and reconstruct of CR copy that would have use up the cpu.
    I think your ideas on rolling back, CR construction etc. are good guesses. If you have deadlocks, then you have multiple processes working in the same place in the database at the same time, so there may be other "near-deadlocks" that cause all sorts of interference problems.
    Obviously you could have processes queueing for the same resource for some time without getting into a deadlock.
    You can have a long running update hit a row which was changed by another user after the update started - which woudl cause the long-running update to rollback and start again (Tom Kyte refers to this as 'write consistency' if you want to search his website for a discussion on the topic).
    Once concurrent processes start sliding out of their correct sequences because of a few delays, it's possible for reports that used to run when nothing else was going on suddenly finding themselves running while updates are going on - and doing lots more reads (physical I/O) of the undo tablespace to take blocks a long way back into the past.
    And so on...
    Anyway, according to the customer, the problem seems to be related to the lgpr_size as the problem disappeared after they revert it back to its orignial default value,0. I couldn't figure out what the lgpr_size is - can you explain.
    Thanks
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "Science is more than a body of knowledge; it is a way of thinking" Carl Sagan

  • Recovering production database after a loss to Prod database server and SAN

    So I was asked this morning... can we recover our database if we lose both the database server and the SAN.
    A bit of information:
    Database: 10gR2
    Using ASM
    Backing up to ASM
    SAN is onsite
    My initial response was of course we backup at least twice a day, and then once a week move those backups to an offsite location.
    Then I started thinking about it some more. If we lose the SAN we have offsite backups of the entire SAN once a week so we could recover the SAN. If we were to lose the server we would lose the diskgroups where the backups are being stored.
    So my question is… and don’t laugh for me never thinking about it before please lol, but do I need to backup the ASM instance in order to be able to restore ASM to be able to get to my backups which are stored inside ASM diskgroups? If so do I need to do this old school by shutting it down and backing it up since there isn’t any archiving going on? If not does anyone recommend a certain way of going about this type of thing?
    Thanks in advance
    Luke

    Hi Luke,
    I think the answers to your questions are fluid, and can be stated as "it depends". If your SAN backup was created as a "snap", for example, a BCV on EMC systems, then likely you can get all your database in your ASM diskgroups. As long as all the disks in the diskgroups were snapped at the same time. Really, though, your best bet is always an RMAN backup which can be done even if your database is not in archive log mode. You can use rman to stop the database, restart it to mount mode and then back up the entire database, though I would suggest that if this is a production system that you do run in archive log mode.
    Cheers!
    Jay
    http://www.grumpy-dba.com

  • If the server was down

    i have made a post insert trigger to take a certain action after inserting a new row into the table,and let say that after inserting a new row into the table and before executing the trigger the server went down and the trigger did not execute.
    i want to ask if there is a way to make sure that the trigger will execute in any condition.

    if the system crashes then some rows will be inserted and the other will not so the data will be inconsistant. Transaction integrity needs to be built into the system. Oracle provides a pretty good basis for constructing transactional systems but it cannot beat bad design. I feel you need to read up on transaction management. There is a good chapter in the Concepts Guide. It is also worth reading about the ACID principles. Once you understand how to manage your transaction you will be able to build a properly functioning system.
    Good luck, APC

  • Re-connection to ORACLE db after the ORACLE server was down

    Hi all,
    I have a problem i've been trying 2 solve for several weeks now.
    I'm running a Java Class which connects to an ORACLE database located
    on the server 'server'.
    Everything is working fine.
    the problem is that if when the class is first run and the server is
    down (not started), I get an SQLException:
    "Exception d'E/S: The network adapter could not establish the
    connection", so the class retries after a certain period,
    say 5 minutes (the server is up and running at that time),
    i still get the same exception whereas it should now connect correctly.
    here's the code:
    public void run()
        bool retry = false;
        try
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Cnn = DriverManager.getConnection("jdbc:oracle:thin:@server:1521:orcl", "username", "password");
        catch(SQLException e)
             if (e.getLocalizedMessage().compareTo("Exception d'E/S: The Network Adapter could not establish the connection") == 0)
         {     retry = true;     }
         else
         {     retry = false;     }
        finally
         try
            if (retry)
              Thread.sleep(300000);
                   System.out.println("Trying connection again...");
                   run();
            else
              //End
              return;
         catch(java.lang.InterruptedException e)
            return;
    }any help or suggestion would be appreciated,
    thanx,
    greg

    Greg,
    why not try separating the connection part into a separate method, and add a few more System.out.println()s so you can see where you are going:
    public void run()
       System.out.println("started run()");
       // Only need to do this once...
       DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
       // Keep trying until we're connected...
       while (!connect())
          Thread.sleep(300000);
          System.out.println("Trying connection again...");
       System.out.println("finished run()");
    * Connects to oracle.
    * @return Has connection been made?
    private boolean connect()
       System.out.println("started connect()");
       try
          cnn = DriverManager.getConnection("jdbc:oracle:thin:@server:1521:orcl", "username", "password");
       catch(SQLException e)
          System.err.println(e.getLocalisedMessage());
       System.out.println("finished connect()");
       return (cnn != null);
    }I'm assuming here that "cnn" (I changed the capitalisation..) is a class attribute, since it was not defined within run() in the original code.
    You could probably change the last line of connect() to: return (cnn instanceof oracle.jdbc.driver.OracleDriver);This doesn't change the flow of the program (except only registering the oracle driver once) but it should help you debug.
    Ben New
    [email protected]
    Leftclick Software Development
    http://www.leftclick.com.au/

  • System crash during database extension

    Hello!
    Unfortunatly we experienced a system crash during database extension.  The new datafile (DISKD0013) was only partly (1,4GB of 9GB) created, when the server went down.
    These are the error messages we get when trying to start the database:
    2008-01-22 13:59:26  7246 ERR 11000 page0io_ Illegal file format
    2008-01-22 13:59:26  7246 ERR 11000 page0io_ blocksize wanted: 8192, blocksize found: 0
    2008-01-22 13:59:26  7214 ERR 11000 vattach  dev0_vattach returned FALSE
    2008-01-22 13:59:26  7214 ERR 20027 IOMan    Attach error on data volume 13: Could not open volume
    2008-01-22 13:59:26  7214 ERR     3 Admin    Database state: OFFLINE
    2008-01-22 13:59:26  7214 ERR     6 KernelCo  +   Internal errorcode, Errorcode 9050 "disk_not_accessible"
    2008-01-22 13:59:26  7214 ERR 20017 Admin     +   RestartFilesystem failed with 'I/O error'
    2008-01-22 13:59:28     0 ERR 12009 DBCRASH  Kernel exited due to signal 0(Killed after timeout with state SERVER_KILL)
    2008-01-22 13:59:28                          ___ Stopping GMT 2008-01-22 12:59:28           7.6.01   Build 012-123-145-275
    Is there a manual way to correct this problem by removing the "corrupted" DISKD0013?
    Regards,
    Fredrik

    Hi Fredrik,
    you can either:
    a) remove all necessary parameters from the paramfile using the relevant dbmcli commands (param_directdel)
    b) perform a parameterfile recovery using dbmcli (param_restore)
    You're okay as long as nothing was written on the new volume.
    When using a) you need to make sure you delete all necessary parameter entries belonging to the datavolume (size, type etc.).
    When you're restoring to an old parameterfile, you need to make sure the parameterfile's only difference is the datavolume extension as the last change, otherwise you'd possibly reset more than you'd like. To check the parameterhistory, you can for example take a look at the <DBSID>.pah file in the /sapdb/data/config directory.
    If you're unsure what to do, i.e. if it's a productive system and you're an SAP customer: open an OSS message.
    Regards,
    Roland

Maybe you are looking for

  • BW Data Mining

    Hello! I need information about the following BW Data Mining topics. Hope, someone can help me? -What 3rd Party Tools are available für Data Mining? (I just know "IBM Intelligent Miner") -Does someone have experiences with performance of the DM-algor

  • How to pass a Variable value into an ODI Scenario from ODI Package

    I have created an Interface that uses the variable #ENTITY_ID for retrieving entity data from the DWH; now I have generated a Scenario from the interface and placed the Scenario in an ODI Package; am not sure how to pass the #ENTITY_ID variable to th

  • Sending attatchment with PO

    Hello, I wanna send the attatchment e.g. Drawing & Quality Plan (pdf file) along with PO to Vendor directly from SAP from option External Send. Anybody pls help in how to attatch the drawing also along with PO

  • Large file

    I have a 158meg PDF file I would like to view on my iPad. It it too large to email. And will not fit in large file share programs. Ok any suggestions ?

  • Lock form but not fillable fields

    I'm sure this has been discussed and the answer is somewhere, I just can't find it. I created a form from a blank page. When opened in Reader the user is able to move around my text and fields. How do I lock the form from being altered and still allo