Getting Error:closing a connection for you. Please help

Hello All,
I'm using jboss3.2.6. I used ejb2.1 (session bean and entity bean[BMP]). I did few data base transations in cmp and few in simple data source connection.
I'm getting below errors occasionally
'No managed connection exception
java.lang.OutOfMemoryError: Java heap space
[CachedConnectionManager] Closing a connection for you. Plea
se close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@11ed0d
5
I've given below my dao connection code here,
package com.drtrack.util;
import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
public class DAOUtil {
private static DataSource _ds;
public Connection con;
public DAOUtil() throws SQLException {
try {
if (_ds == null)
assemble();
if(_ds != null && con == null) {
con = _ds.getConnection();
}catch(SQLException ex) {
ex.printStackTrace();
private void assemble() {
Context ic = null;
try {
ic = new InitialContext();
DrTrackUtil drutil = new DrTrackUtil();
_ds = (DataSource) ic.lookup("java:/" + drutil.getText("SOURCE_DIR"));
drutil = null;
}catch (Exception e) {
e.printStackTrace();
}finally {
try {
ic.close();
}catch(NamingException ne) {}
public void closeConnection() throws SQLException {
if(con != null)
con.close();
con = null;
}below is the code with get connection and doing transaction in it.
public static AccountMasterValueBean getAccountMasterByAcctId(String acctId) {
AccountMasterValueBean bean = null;
DAOUtil dao = null;
CallableStatement cst = null;
ResultSet rs = null;
try {
dao = new DAOUtil();
cst = dao.con.prepareCall(DrTrackConstants.MSSQL_USP_ACCOUNTMASTER_BY_ACCTID);
cst.setObject(1, acctId);
rs = cst.executeQuery();
if(rs != null && rs.next()) {
bean = new AccountMasterValueBean(
Integer.valueOf(rs.getString("accountkeyid")),
rs.getString("latitude"),
rs.getString("longitude"));
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
if(rs != null){
try {
rs.close();
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
rs = null;
if(cst != null) {
try{
cst.close();
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
cst = null;
if(dao != null) {
try {
dao.closeConnection();
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
dao = null;
return bean;
}I closed connections, resultsets and statements properly.
Why I'm getting these errors.? Where I'm doing wrong. ? Please help me. I have to fix them ASAP.
Thanks.

Hello All,
I'm using jboss3.2.6. I used ejb2.1 (session bean and entity bean[BMP]). I did few data base transations in cmp and few in simple data source connection.
I'm getting below errors occasionally
'No managed connection exception
java.lang.OutOfMemoryError: Java heap space
[CachedConnectionManager] Closing a connection for you. Plea
se close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@11ed0d
5
I've given below my dao connection code here,
package com.drtrack.util;
import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
public class DAOUtil {
private static DataSource _ds;
public Connection con;
public DAOUtil() throws SQLException {
try {
if (_ds == null)
assemble();
if(_ds != null && con == null) {
con = _ds.getConnection();
}catch(SQLException ex) {
ex.printStackTrace();
private void assemble() {
Context ic = null;
try {
ic = new InitialContext();
DrTrackUtil drutil = new DrTrackUtil();
_ds = (DataSource) ic.lookup("java:/" + drutil.getText("SOURCE_DIR"));
drutil = null;
}catch (Exception e) {
e.printStackTrace();
}finally {
try {
ic.close();
}catch(NamingException ne) {}
public void closeConnection() throws SQLException {
if(con != null)
con.close();
con = null;
}below is the code with get connection and doing transaction in it.
public static AccountMasterValueBean getAccountMasterByAcctId(String acctId) {
AccountMasterValueBean bean = null;
DAOUtil dao = null;
CallableStatement cst = null;
ResultSet rs = null;
try {
dao = new DAOUtil();
cst = dao.con.prepareCall(DrTrackConstants.MSSQL_USP_ACCOUNTMASTER_BY_ACCTID);
cst.setObject(1, acctId);
rs = cst.executeQuery();
if(rs != null && rs.next()) {
bean = new AccountMasterValueBean(
Integer.valueOf(rs.getString("accountkeyid")),
rs.getString("latitude"),
rs.getString("longitude"));
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
if(rs != null){
try {
rs.close();
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
rs = null;
if(cst != null) {
try{
cst.close();
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
cst = null;
if(dao != null) {
try {
dao.closeConnection();
}catch(SQLException se) {
logger.info("SQL Error: " + se);
finally {
dao = null;
return bean;
}I closed connections, resultsets and statements properly.
Why I'm getting these errors.? Where I'm doing wrong. ? Please help me. I have to fix them ASAP.
Thanks.

Similar Messages

  • I have a debit card but would like to download apps from the store. how do I do that? I can't possibly get a credit card just for this. please help.

    Hi,
    I have an iTouch. I'd like to download some free apps. but I have a debit card but would like to download apps from the store. how do I do that? I can't possibly get a credit card just for this. please help.

    I really do not think it is the iPad or your network connection. Other users have reported this very same issue. Try this and see if it works for you - it may not work - but it's easy to try - harmless - and it has worked in the past for others.
    Try signing out of your account and restart your iPad.
    Go to Settings>Store>Apple ID and tap the ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. Go back to Settings>Store> Apple ID and sign in again.

  • I have iPhone 3gs. I was trying to update the software using itunes but it is showing Error "-3259" saying  connection timeout. Please help.

    I have just bought iPhone 3gs in Sept.11. I was trying to update the software using itunes but it is showing Error "-3259" saying  connection timeout. Please help.

    Did you already check your securit software settings? iTunes has to contact Apple during the update process.
    See this article: iTunes for Windows: Troubleshooting security software issues

  • I cannot start my cs4 program I get error message 148:3  can someone please help

    I cannot start my cs4 program I get error message 148:3  can someone please help

    Which operating system are you using?
    If it's windows:
    Error "Licensing has stopped working" | Windows

  • Apple TV won't load up. the light flashes and the logo appears on the TV then it just goes off and starts again. I've tried restoring via USB on 5 different computers and I keep getting error message 9? Can anyone please help?

    I have a black Apple TV that has recently stopped working. It loads the Apple Logo on screen then goes off and starts again. It's as if it is stuck in a loop. I've tried a re-boot and this has failed. I have tried a restore using a USB cable on 5 different computers, including a Mac Book Pro and it downloads the update file but when it tries to restore I get the error code 9 showing on screen. I just can't get it to do anything.
    Can anyone please help?

    Thanks for that information!
    I'm sure I will be calling AppleCare, but the problem is, they charge for the phone calls don't they? Because I don't have money to be spending to be on the phone with a support service.
    In other things, it seemed like the only time my MacBook was working was when I had Snow Leopard without the 10.6.8 update download that was supposed to be done to prepare for OS X Lion.
    When I look at the information of my HD it says that I have 10.6.8 but that was the install that it claimed to have failed and caused me to restart resulting in all of the repeated problems.
    Also, because my computer is currently down, and I've lost all files how would that effect the use of my iPhone? Because if it doesn't get fixed by the time OS 5 is released, how would I be able to upgrade?!

  • I recently updated to latest iTunes and now my pc freezes.  I have a Tosiba 32bit running Windows Vista. Itunes will no longer connect to the store and I get error 42408 when opening ITunes. Please help!!

    When I open iTunes I get the error message 42408.
    I have googled and tried various solutions including
    - uninstalling, downloading and reinstalling. I have done that about 5 times.
    - sending the desktop icon to the rubbish bin and recreating a shortcut.
    - de-authorising the audible account. My computer goes thru the de- authorisation process and says that the account is deauthorised then when I go to re-authorise under Advanced all that is showing is to de-authorise the account. Weird.
    - contacted a tech guy locally and he has no clue. He's thinking it's probably a conflicting software problem. Obviously.
    I have to uninstall the iTunes program just so I can use the internet as the new version slows/freezes everything and makes doing anything on my computer ridiculous.
    Everything on my computer runs fine when Itunes is uninstalled. Great. not.
    I would appreciate some further guidance as unfortunately iTunes seems to have complete control over my life. LOL! Basically if iTunes fails the rest follows... It's a dominoe effect...

    Update:
    I contacted Apple Support and they agreed to waive the $40.00 tech support charge this one time which was very nice condsidering their update caused major problems with my computer. I realise I don't have to accept the updates but when they are released world wide to the public I do expect them to work relatively smoothly.
    To cut a long story short after following the tech support advice and uninstalling and reinstalling itunes 10.5 for the seventh time and more than a week of going in circles and days spent away from my business trying to fix the problem - I gave up.  Because, as a non computer geek,  (no offense - I think cg's are amazing)  what I need is a functioning computer and phone to run my business that can be both relied on - all the time. That is what I paid for and expected when I bought Apples' very smart iPhone - I did not expect to be plagued by an update to a program that causes chaos for over 7 days. (And to be frank I've had problems with iTunes for the whole time I have been using it. From importing cd's to purchasing problems. gah!)
    I may be one tiny person in a very large universe but I believe a certain standard can and should be expected when handing over hard earned cash to a company with a good reputation.
    I'm very disappointed with Apple.
    Unfortunatley they have lost a customer...
    This is how I fixed the problem:
    Yesterday I bought a new smartphone - the Samsung Galaxy phone uses the Android Market and the Kies program. The phone is as good as if not better than the iPhone. The Kies program runs very smoothly on my computer. Downloading Apps is a breeze. My new phone is about the same size as the iPhone and a tad lighter.
    Problem solved!
    As a side note - I will now save about $250.00 per year on my new prepaid phone plan with Boost compared to staying with my previous post-paid plan. I also get unlimited standard national calls in Australia plus unlimited texting too! Not bad for $40.00 a month.
    While this solution worked for me it may not suit everybody.

  • Cant get my iPad to connect to iTunes, please help

    I connected my iPad2 to the computer (MacMini version 10.5.8) , opened iTunes and got the message that for an unknown reason my iPad does not connect.
    Anyone know how to fix this please?

    I finally got a number for IT services. When I phoned up they didnt have a clue why it wasnt working, they're honestly useless! I was monkeying about with it last night using my lapto at the same time to find server addresses etc.
    Then it looked like it was going to work, when I went into safari it redirected me to the login page like it does on my laptop. But then decided it didnt want to work saying "the page cant be displayed because there is no secure connection to the server".
    I searched this on the support community and I went with the advice to delete all cookies, set them to accept from visited, and restart my iPad.
    Now when I restart my iPad it trys to connect to the wireless network it comes up with a page saying "Login" at the top of the browser, so im assuming that is the login redirect page. However it displays nothing on the page!
    Going with you guys advice I assumed that the page must use java. But when I looked at the source of the page on my laptop it didnt have anything java in it, just javascript, which Im lead to believe is totally different.
    Sorry for being a pain but IT services here are shocking.

  • TS1368 i am getting error -3212 can connect to itunes store help

    help i cannot connect to itunes store. error -3212

    if it comes up with itunes cannot connect to itunes store, blah blah error (-3212) then its because one of your computer programs has failed, to find the faild program you should look at the bottom right corner of your screen and if any of the little icons have a yellow exclamation mark on or next to it then that is the ones thats failed.
    you need to make a note of which one it is and then go to control panel on the start menu, once loaded look for the link called 'programs' and click on uninstall a program, find the faulty program and just click on it and it will start uninstalling, restart your computer and try loading itunes again and it'll work

  • I cant get my wireless ps3 connection to work ------ Please help

    I just got a linksys wrt160n v2 and ive been trying to connect it with my ps3 but when i do the connection test it says that their is a dns error and ive typed in a million different things and nothing seems to work. i've done that whole thing where you go to run then type in cmd and then type ipconfig/all and ive taken all that info and set it in put nothing seems to work. and it also says that my UPnP is not available. I really need someones help. i have a windows xp and my internet provider is comcast. any help would be greatly appreciated!!!

    bighead2192 wrote:
    I just got a linksys wrt160n v2 and ive been trying to connect it with my ps3 but when i do the connection test it says that their is a dns error and ive typed in a million different things and nothing seems to work. i've done that whole thing where you go to run then type in cmd and then type ipconfig/all and ive taken all that info and set it in put nothing seems to work. and it also says that my UPnP is not available. I really need someones help. i have a windows xp and my internet provider is comcast. any help would be greatly appreciated!!!
    Hi bighead2192,
    Call your Router's Manufacturer's Phone Support and have them walk you through setting up your Router.
    However, you should have the Router's Manual in PDF format or Paper that you can read and find out how to do it.
    I have a D-Link Router, not a Linksys Router.
    thecreator - Running Network Magic version -5.5..9195.0-Pure0 on Windows XP Home Edition SP 3
    Running Network Magic version -5.5.9195.0-Pure0 on Wireless Computer with McAfee Personal Firewall Build 11.5.131 Wireless Computer has D-Link DWA-552 connecting to D-Link DIR-655 A3 Router.

  • Installed Win7, now I want to get rid of it. Can you please help?

    I am currently dual booting WinXP and Win7 (which is installed to d:  )  I do not wish to format d: due to the 1 key recovery option being located on that drive.
    As you may know, Vista/Win7 does not use boot.ini, it uses BCEDIT.exe (which is obviously not an XP function)
    So, my question is, how do I remove the boot option and revert back to using boot.ini?
    Can I smply run the restore 1 key function?  Will it save akl my current programs and settings?
    Thanks in advance.
    btw, this is on a Lenovo S10 netbook.

    Your OKR is not on D drive but on hidden partition on HDD.
    You may format D without a worry.
    And please do not post three different threads - better to start one with three questions.
    //help will save the world

  • Some Error in Nokia Map for E90 please help.

    Hello friends,
    I need some urgent help.
    I have Nokia Map already in E90.
    Its old version i think.
    Ok when ever i go to Nokia Maps > Options > Settings > Network
    The Nokia Maps closes automatically.
    I have tried to install the new version Nokia Map Version 2
    And when i keep on install, It says that Checking Certificate Online, Check settings. What to do about it ?
    Please someone help
    Thanks

    Hello friends,
    I need some urgent help.
    I have Nokia Map already in E90.
    Its old version i think.
    Ok when ever i go to Nokia Maps > Options > Settings > Network
    The Nokia Maps closes automatically.
    I have tried to install the new version Nokia Map Version 2
    And when i keep on install, It says that Checking Certificate Online, Check settings. What to do about it ?
    Please someone help
    Thanks

  • Unable to charge my Ipad 4 with my Laptop (HP 7010tx) USB . I am Getting error message as "Not Charging" . Please give a solution for this ...???

    Unable to charge my Ipad 4 with my Laptop (HP 7010tx) USB . I am Getting error message as "Not Charging" . Please give a solution for this ...???

    The quickest way (and really the only way) to charge your iPad is with the included 10W or 12W (5W on Mini) USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (2.5W, most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    Best Practices for iPad Battery Charging
    http://www.ilounge.com/index.php/articles/comments/best-practices-for-ipad-batte ry-charging/
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    How to Save and Prolong the battery life of your new ipad
    https://discussions.apple.com/thread/4480944?tstart=0
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    To Extend a Device’s Battery Life, Get to Know It Better
    http://tinyurl.com/b67c7xz
    iPad Battery Replacement
    http://www.apple.com/batteries/replacements.html
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

  • I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?

    I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?

    I am sorry Erickkasner but there is no longer direct support provided for Creative Suite 5.5 installation issues.
    You are welcome to post any specific errors you are able to discover within your installation log to this discussion.  Since you are using Windows then Exit Code 15 could mean one of the following:
    Installer database is corrupted
    Update pending to your operating system
    Improper permissions set for the Media.db
    The installation log file should provide additional insight into the exact error you are experiencing.  Please make sure to use the find command to look for the words 'ERROR' and 'FATAL' to locate the relevant error messages.

  • TS1702 Hi, I getting a "playback error message" on youtube App. I tried to reinstall the app and to reset and restore the device and all these things didn't help.can you please help me

    Hi, I getting a "playback error message" on youtube App. I tried to reinstall the app and to reset and restore the device and all these things didn't help.can you please help me

    That's a peculiar one to get in the context of a QuickTime uninstall.
    Which particular version of QuickTime for Windows are you currently running? (7.7.5, 7.7.4, something earlier?)

  • While trying to update Adobe Reader XI 10.0.06 to 10.0.07 on my laptop running W7 Home Premium x 64, I get error message 2203. The same occurs if I try to uninstall before manually install the new version. Can you please help?

    Hello,
    While trying to update Adobe Reader XI 10.0.06 to 10.0.07 on my laptop running W7 Home Premium x 64, I get error message 2203. The same occurs if I try to uninstall before manually install the new version. Can you please help?
    PS.- Thank you very much for your Support in trying to solve a problem created by yourselves.
    Message was edited by: Juan Verano

    Is there anything else beside the number 2203?
    Try removing the current Reader using http://labs.adobe.com/downloads/acrobatcleaner.html, then install 11.0.07 from http://get.adobe.com/reader/enterprise/

Maybe you are looking for

  • Can anyone save my PS and AI?

    Adobe CC updated my programs this morning and I haven't been able to open Photoshop or Illustrator since. They were working fine and now after the update... nothing. They just crash immediately upon opening. Running OS X Yosemite 10.10.2 Was on the p

  • Hyperlink to file in JSP not working

    I have a JSP page where I am providing a hyperlink to a file on the C: drive as follows Try this Nothing happens when I click this hyperlink. When I scroll over the hyperlink I see the correct path "file:///C:/ReqImport/data.txt" in the status bar an

  • Can New Java 7 File API Path Objs Be Used For Windows Virtual Folders

    Hello, I'm trying to duplicate a JFileChooser's drop-down list containing root directories of the file system. For Windows machines, its combobox lists the roots in a nice tree-like layout. For example: + Desktop   + Computer     + Local Disk (C:)   

  • Disable loading of site from location bar

    I've been using Beta 4 for a while, and it seems in the last two builds the location bar auto complete seemed to change a bit. I love how FF will work and pull my recent pages in the location bar as I type parts of the page name. However, it is extre

  • I was given a iphone4 can i use it with my prepay plan

    my son an daughter r on Verizon plan they want to give me her iphone 4 since she just upgraded.i am on prepay can I use it