Problem connecting to DB after DB restart

Hi,
I am using Oracle9.1 and WLS 8.1 sp6. My application runs fine and is able to connect to database and everything looks great.
Problem starts when for xyz reason database is stopped/down, say for maintenance. My application gets exception as expected. But even after restarting the Database, my application keeps getting the exception "SQLException: Closed Connection", which does not make sense.
Can anyone please help?
I am using WLS Connection Pool. I access the database through JDBC and get the connection using a DataSource that I have configured on the server. The driver is oracle.jdbc.OracleDriver.
This is how I get the connection.
code:
     protected Connection getConnection() throws CatalogDAOSysException {          if (dataSrc == null) {               try {                    ServiceLocatorImpl sl = ServiceLocatorImpl.getInstance();                    //System.out.println(JNDINames.CATALOG_DATASOURCE);                    dataSrc = (DataSource) sl.getDataSource(JNDINames.CATALOG_DATASOURCE);               } catch (Exception slx) {                    slx.printStackTrace();                    throw new CatalogDAOSysException("NamingException while looking up DB context : "                         + slx.getMessage());               }               try {                    Connection c = dataSrc.getConnection();                    if (c == null) {                         throw new CatalogDAOSysException("getConnection: Unable to get connection from the DataSource");                    }                    return c;               } catch (SQLException se) {                    this.logger.error(new Date() + " SQLException. ErrorCode : "                               + se.getErrorCode() + "  SQL State" + se.getSQLState() , se);                    throw new CatalogDAOSysException(                              "getConnection: SQLException while getting connection from the DataSource",                              "error.connection", se);               }          }     }
I am not sure what other details might be needed. Please let me know if you need to know anything else.
Thanks,
Sushma

Sushma Sharma wrote:
Hi,
I am using Oracle9.1 and WLS 8.1 sp6. My application runs fine and is able to connect to database and everything looks great.
Problem starts when for xyz reason database is stopped/down, say for maintenance. My application gets exception as expected. But even after restarting the Database, my application keeps getting the exception "SQLException: Closed Connection", which does not make sense.
Can anyone please help?
I am using WLS Connection Pool. I access the database through JDBC and get the connection using a DataSource that I have configured on the server. The driver is oracle.jdbc.OracleDriver.
This is how I get the connection.
code:
     protected Connection getConnection() throws CatalogDAOSysException {          if (dataSrc == null) {               try {                    ServiceLocatorImpl sl = ServiceLocatorImpl.getInstance();                    //System.out.println(JNDINames.CATALOG_DATASOURCE);                    dataSrc = (DataSource) sl.getDataSource(JNDINames.CATALOG_DATASOURCE);               } catch (Exception slx) {                    slx.printStackTrace();                    throw new CatalogDAOSysException("NamingException while looking up DB context : "                         + slx.getMessage());               }               try {                    Connection c = dataSrc.getConnection();                    if (c == null) {                         throw new CatalogDAOSysException("getConnection: Unable to get connection from the DataSource");                    }                    return c;               } catch (SQLException se) {                    this.logger.error(new Date() + " SQLException. ErrorCode : "                               + se.getErrorCode() + "  SQL State" + se.getSQLState() , se);                    throw new CatalogDAOSysException(                              "getConnection: SQLException while getting connection from the DataSource",                              "error.connection", se);               }          }     }
I am not sure what other details might be needed. Please let me know if you need to know anything else.
Thanks,
SushmaThe pool should be configured to test-on-reserve, and the test table should be 'DUAL'.
Joe

Similar Messages

  • Problems connecting to Monitor after waking up MacBook from sleep

    Hi,
    I am experiencing a lot of problems connecting my macbook pro to external monitor once I put it to sleep. I have tried every options like setting up PRAM and all, but it just wont work. Sometimes the restart works and sometimes it wont. I am using a Samsung monitor. I have no idea what to do, as I keep on clicking Detect displays and it just wont do anything. Can anybody please help me as to how I can wake up my macbook from sleep and get it connected to the monitor. I have a mac keyboard and bluetooth mouse, but neither would wake the mac. I have change my bluetooth settings so that the mouse should be able to wake it up..

    William Rivas wrote:
    William Rivas wrote:
    William Rivas wrote:
    Linc Davis wrote:
    Test after taking each of the following steps that you haven't already tried. Back up all data before making any changes.
    1. Make sure the network is on the preferred list by following these instructions. It's important to read the article carefully, as it's the starting point for any further efforts to solve the problem. If you skip any of the steps, the problem may not be solved. Make sure the box marked
    Remember networks this computer has joined
    is checked.
    2. Follow the instructions in this support article under the heading "Symptom: The network connection drops unexpectedly."
    3. Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.
    4. From the Location menu at the top of the Network preference pane, select Edit Locations. A sheet will drop down. Click the plus-sign button to create a new location. Give it any name you want. In the new location, set up the Wi-Fi service with the same settings you used before. Click Apply and test.
    5. Launch the Keychain Access application. Search for and delete all AirPort network password items that refer to the network. Make a note of the password first.
    6. Repair permissions on the startup volume.
    7. Turn off Bluetooth and test.
    8. Reset the System Management Controller.
    9. Reset the PRAM.
    10. Reinstall OS X.
    Updating to 10.9.2 did the trick. So I thought. Does anyone have a solution?
    Thanks!

  • Problems connecting to internet after installing Leopard

    I have been having problems connecting to the internet after installing Leopard. I have a G5 at my office and use safari and AOL, using a cable modem and router. Everything worked perfect until I installed Leopard. About 3 days after installing Leopard on my G5 I started having problems connecting to the internet. When opening "network" in preferences it tells me I am connected, but I cannot connect. So I have to restart my computer every time in order to connect. Then to top it off, often in the middle of the day I am able to get and send e-mail with AOL, but my Safari does not connect. And even more bizare, if I am connected and sign off my AOL, I lose Safari as well. Brought the G5 into the Mac store and after trying some stuff they told me "it should work now" but ....same problems. So last Monday, I installed Leopard on my Macbookpro which I use at home wirelessly, everything worked well until yesterday when the same issue with my G5 is happening with the macbookpro. No connection, it tells me I am connected, signal is strong, but nothing.....so restart and keep going. What is going on? Anyone else having same problem? Any solutions
    Roberto

    Roberto,
    Is the install of Leopard on the G5 and MacBook Pro an upgrade install or a clean install?
    Try some simple maintenance to see if this resolves it:
    1. Run Repair Disk Permissions (Disk Utility)
    2. Go to Network Utility and go to Ping enter in www.cnn.com and see if the packets are received/sent. This is just to see if you can get to the outside so to speak
    3. See if your cable modem manfacturer has a leopard upgrade. Sometimes hardware companies need to upgrade their firmware when new Operating systems come out

  • Can't connect to EM after server restart

    Hope somebody can help me with this problem.
    I have a 10g RAC installation and after a restart of one of the DB_servers i wasn't able to reach the EM console. I'm running on Linux OS.
    This is what i have done:
    - emctl start dbconsole (its started without problems)
    I have checked the portlist.ini file to ensure that im using correct port. It says:
    E.M http port : 1158 - E.M agent port :3938
    I use Mozilla with url: http://servername:1158/em/console/ with no luck.
    It doesnt understand the url and it routed to googel search.
    This actually worked before my restart.
    Could someone give me some hints please.
    Rob

    This is what i found in the emoms.trc
    Is this saying you somethin ?
    java.sql.SQLException: ORA-01089: immediate shutdown in progress - no operations are permitted
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:214)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:953)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1260)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3290)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3334)
    at oracle.sysman.util.jdbc.ConnectionWrapper._applySessionParams(ConnectionWrapper.java:2971)
    at oracle.sysman.util.jdbc.ConnectionWrapper.<init>(ConnectionWrapper.java:181)
    at oracle.sysman.emSDK.svc.conn.FGAConnection.<init>(FGAConnection.java:115)
    at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:192)
    at oracle.sysman.emSDK.svc.conn.ConnectionService.getSystemConnection(ConnectionService.java:683)
    at oracle.sysman.emdrep.notification.NotificationMgr.getConnection(NotificationMgr.java:252)
    at oracle.sysman.emdrep.notification.NotificationMgr.resetConnection(NotificationMgr.java:298)
    at oracle.sysman.emdrep.notification.NotificationMgr.run(NotificationMgr.java:1190)
    2006-09-11 15:28:52,360 [NotificationMgrThread] ERROR jdbc.ConnectionWrapper _applySessionParams.2980 - SQLException message: ORA-01089: immediate shutdown in progress - no operations are permitted
    Rob

  • Problem connecting to carrier after upgrading to 5.01

    After upgrading my iPhone 4 to iOS 5.01 I have problems connecting to my carrier.  It may take several hours before the connection is made.  I normally never turn off my phone except when traveling on airplanes and that is exactly when the problem occurs.  After landing I turn on my phone, type in my pin code, and then receive immediately receive "No service".  I try toggling Airplane mode and see a search attempt which ends in "No service".  I try resetting the network and rebooting - does not help.  Low and behold an hour maybe two, maybe three  hours later the carrier connection is made.  Stays connected without any problem until the next time I take a plane.
    Any ideas,  I have not try contacting my carrier because I do not think they are the problem

    IMHO you must be wrong.
    Or how do explain the following facts:
    1.The same application on the same PC can connect to the database when it's started under JRE 1.4.2.
    2.The same application on other PCs in the same network have no problem to connect to the database under JRE 1.5.0_01.

  • I am having problems connecting to 3g after updating to ios 6.1 (iphone 5, 32gb, black)

    i am having problems connecting to 3g since i updated my iphone to ios 6.1, the update 6.1.2 didnt solve the problem, i am having problems connecting to 3g, my phone only shows the symbol E

    I'm having problems too. It eventually connects to 3G but it takes a long time. Try keeping the "Enable 3G" on (if you have the switch) and see if it changes to 3G at some point.

  • Problem connecting to internet after NEW 27" iMac makes up from sleep

    Ok, I have a brand new 27” iMac and when it connects to the internet after waking up from sleep mode doesn't have any download speed.. See image
    This only happen when it wakes up and the only way to fix it is to restart the computer. I have tried turning on and off the airport as well as messing around with other settings and nothing seams to fix it.
    I am using an Apple Airport Extreme with a Comcasts 20mb connection.
    This is the only computer in the house that has this problem (3 other MacBook Pros) And while the iMac is registering no download speed, the other computer are cranking out at over 20mbps.
    The fix for now has been turning off the power saving setting to allow sleep. so no sleep=internet.
    Any one having this problem? I don’t really want to lug it back to the apple store but I will if I have to.

    after waking up from sleep mode doesn't have any download speed..
    Intel-based iMac, Intel-based Mac mini: How to reset the System Management Controller
    Change your router channel.  Sometimes this all you will have to do.
    I don’t really want to lug it back to the apple store but I will if I have to.
    You don't have to.  Call Apple tech support.  They can give you instructions over the phone if the issue is just software.  You will have to bring it in if tech support suspects you have a hardware issue as they need to run diagnostic testing.

  • Having problems connecting to WiFi after Sleep Mode - Lion with most recent updates.

    I'm new to Apple and have the new MBP - what a great machine!
    So, I updated to Lion and have done all the updates for my OS. As of recent (after an update last week), I am having trouble connecting to the internet after I close my computer (Sleep) or Sleep mode due to inactivity. The only way to connect after said mode is to completely Restart the computer and then my problem is fixed. I've tried searching, but can't find anything. Any suggestions are welcome.
    Thank you

    William Rivas wrote:
    William Rivas wrote:
    William Rivas wrote:
    Linc Davis wrote:
    Test after taking each of the following steps that you haven't already tried. Back up all data before making any changes.
    1. Make sure the network is on the preferred list by following these instructions. It's important to read the article carefully, as it's the starting point for any further efforts to solve the problem. If you skip any of the steps, the problem may not be solved. Make sure the box marked
    Remember networks this computer has joined
    is checked.
    2. Follow the instructions in this support article under the heading "Symptom: The network connection drops unexpectedly."
    3. Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.
    4. From the Location menu at the top of the Network preference pane, select Edit Locations. A sheet will drop down. Click the plus-sign button to create a new location. Give it any name you want. In the new location, set up the Wi-Fi service with the same settings you used before. Click Apply and test.
    5. Launch the Keychain Access application. Search for and delete all AirPort network password items that refer to the network. Make a note of the password first.
    6. Repair permissions on the startup volume.
    7. Turn off Bluetooth and test.
    8. Reset the System Management Controller.
    9. Reset the PRAM.
    10. Reinstall OS X.
    Updating to 10.9.2 did the trick. So I thought. Does anyone have a solution?
    Thanks!

  • Have to manually connect to network after each restart?

    When I turned my PB on it would always automatically connect to my home wireless network (after I'd entered the password etc. of course). But now I have to manually select the network everytime I turn it on - I've played with a few settings to no avail and this problem does not occur with other networks that I've joined (at my folks for example). It's not a biggie but I'm scratching my head and it's just a little frustrating. Any ideas? Cheers

    Hi,
    When I put the computer to sleep... it comes back on with the network I had on before. When I shut it down and restart it, I have to select the one I want... as it can see my neighbors network and on occasion one farther away. If there is only the one, and it's yours with the known password, there is one choice. My daughter brings her laptop over to use my Hi-Speed, and the first time I put in the password... now it goes to it all by itself when she is here, if the neighbors is not on, it's automatic. Otherwise, she too has to select which network she wants to join.
    Fewer options are better, otherwise too many choices and you have to tell the Mac what you want today.
    Enjoy

  • Connect to itunes after each restart?

    Every time I restart my phone i have to connect to itunes, once this is done the phone works fine.
    The sim card i am trying to use isnt the one that came with the phone, but it is with the same phone company.
    The original sim doesnt have this problem.
    This might have something to do with the phone shop ünbricking""
    the phone with the original sim card????
    How can i fix this problem?

    The other sim will work fine after I connect to itunes, i can make / recieve calls etc.

  • External Display Problem - SMC Reset Required After EVERY Restart

    I have a mid-2010 macbook pro that I often use in Clamshell mode with an external display (an ASUS VS239H-P 23-Inch Full-HD LED IPS monitor). I connect to my monitor with an Amazon brand HDMi cable via a Monoprice Mini Display Port to HDMI adapter. I'm running OS X 10.8.4.
    Here's the problem... whenever I go "mobile" and disconnect my macbook pro from the external display, my macbook seems to work fine at first, but if I ever need to restart my macbook, it thinks it is still in clamshell mode upon reboot.  The built in display stays dark, and if I close the lid, the power indicator lights up and stays lit up; if I open the lid, the light disappears. It doesn't even matter if the power cord is plugged in or not, the computer thinks it is in clamshell mode.  This occurs ANY time I restart my computer, whether I'm booting into bootcamp or OS X.  If I do an SMC reset, I can successfully restart my computer.  But if I ever need restart my computer again, and I haven't reconnected to my external display, the problem happens all over again.  The only other way to fix the problem is if I plug my external display back in, then unplug it, which seems to remind my macbook that the display has been disconected.  Unfortunatley I can't do this if I'm out for business and my display is not near me.
    What gives? What can I tweak to fix this? I'd rather not have to wipe the HD and do a fresh install of the OS.

    It might be the CMOS battery has failed. That battery supplies power to holds all the firmware data, the system management controller data. So on a restart it is losing all that stored data for the SMC. You need to take the system to apple and have it fixed.

  • Wrt320n - problems connecting to internet after few hours of uptime - firmware version 1.0.02

    Hi,
    I've just bought wrt320n and I've experienced some problems with internet connection from the first day.
    After some time (may be hours or one time was 15 minutes) of using the internet ( in general when playing games online like "Anno 170" and "Heroes of Newearth" ) the router hangs.
    Not only the internet connection is down but the router stops responding on all ethernet ports, the admin interface can be accessed with wireless devices.
    The PPPOE connection to the Internet can only be restored after unplugging the power cord of the router. Software reset from the http admin interface, or hardware reset from the router back button has no effect.
    I suspect it is some problem with something controlling the ethernet ports since all are blocked and the internet comes through one of those ports.
    I have to mention that one PC is using Gigabit Ethernet.
    I hope some solution appears to this problem because I don't want to and don't have the time to go to return it.
    Thank you in advance for any advices ,
    Silviu

    Have you tried to reset your Router and Re-Configure all the settings on it back again. If not then Press and hold the reset button for 60 seconds...Release the reset button...Unplug the power cable from your router, wait for 60 seconds and re-connect the power cable...Now re-configure your router...
    Open an Internet Explorer browser page on a computer hard wired to the router...In the address bar type - 192.168.1.1...Leave the Username blank & in Password use admin in lower case...
    On the set-up tab change the MTU Size to 1365 and click Save Settings...
    Once you configure all the settings on your Router, now check if you are facing the same connection problem. 

  • Problem Connecting to Internet after recent Software Updates from Apple

    I have an old iMac 15" flat panel, running OS X 10.3.9, just ran the Software Update an hour ago. Now my computer won't connect to my wireless network via the Airport. I tried to open the Internet Connect apps from Apple and it won't even load, it has this swirling beachball has been on for 15 minutes and it says "Loading Internet Connect..."
    Anybody experience something like this! Could this be another Apple blunder with their software update?
    I tried, restart, remove the plist of Internet Connect, all those did not help!
    Please help. Thanks

    Try resetting Airport as per this article;
    Resetting AirPort Express
    By the way, if your problem has not been solved then leave it as unanswered until such time it is, as you will get more responses.
    regards roam

  • WRT350N problem connecting to wireless after firware upgrade to 1.04.4

    I have a WRT350N which has been in service for some time without any real trouble. I connect to it with a variety of laptops off and on and a ps3. Recently, my wife's laptop began disconnecting randomly and frequently. I repaired her windows after the usual tricks didn't help. After the repair, her problem was gone for a few weeks, then returned. It is a Dell Lattitude 110L and I suspect the wireless device in it is giving up. But I thought I would see if there were any firmware upgrades for my router, in case there was help for the situation that way. I was running 1.03.8 and 1.04.4 was available. So I downloaded and installed the upgrade.
    My wired network continued to function just fine. But now none of my laptops or the ps3 could connect to the wireless. They saw the SSID being broadcast. They did key exchange. They requested a dhcp address, and then the connectionstopped being answered by the WRT350N. I tried many things. No joy. Decided to contact Cisco support via live chat. They had me change a number of settings for thresholds and channels and such with no effect. While doing this, I happened to notice that wireless QoS was disabled and the help says that by default it should be enabled. I have never changed this setting myself. In desperation, I put all the setting which Cisco had me mess with back to their defaults (where they were before Shaharyiar tried to help me) and I tried setting wireless QoS to enabled. Bingo. All my laptops and the ps3 now connect again. I suggested to the agent that they log this as a bug in the upgrade or the firmware. I got the impression that might not be followed up on, so I am posting my story here in the hopes it may prove helpful to others.
    dennis

    If you have other devices on your network that support Wireless QoS, select Enabled. Otherwise, keep the default, Disabled.
    Thanks for the information. Your post will definitely help other users.

  • Has anyone had problems connecting to wifi after updating to iOS 7.1?

    After updating to 7.1, I can't access my wifi at home.  I don't think there's anything wrong with the wifi because I can still use the wifi on my iPad which I haven't updated to 7.1. 

    Problems with DNS numbers was my other theory. If that is the case, a Physical address like:
    http://17.149.160.49
    will immediately load, while:
    http://apple.com
    will just sit there until it times out.
    Non-responsive DNS server or invalid DNS configuration can cause long delay before webpages load

Maybe you are looking for

  • CO-PA Error during billing

    Hi sap gurus during our SD consultant making a billing it blocked and when trying to release them we got this message In Profitability Analysis (CO-PA), the system tried to   valuate a line item by reading a product cost estimate with   the costing v

  • Payment due date was changed without notice

    I received a text message on 7/9/15 advising me my bill would be due on 7/23/15 rather than 8/1/15.  A text message is really not an appropriate form of notification first of all. If I'm 2 days late you charge me a late fee, yet my billing cycle can

  • JScrollPane dynamic size

    I have JscrollPane on that I am placing some JGraph symbols.When I drag that symbol towards right and down side of scrollpane,horizontal or/and vertical scroll bar appears.But when I drag symbol towards left and up side of scrollpane,scrollbar doesn'

  • How do I sync all of my iTunes music library to my ipad?

    I have a mixture of downloaded & imported songs in iTunes  on my laptop. All sync perfectly with my iPhone but when I tried to sync with my new ipad, it only seems to carry over downloaded songs rather than the whole music library. I have all devices

  • Error errors errors they just keep coming!!! aaahhhhh

    I think the HP home network diagnostic utility my help me too, BUT when i go to open it i get a "runtime error hphndu.exe" and it wants to terminate .  Can you tell me the steps to fix this problem please for windows xp ALSO i get the same kinda mess