Database connection loosed over night

Hi,
I am testing a J2EE application on Sun Java System Application Server Platform Edition 8.2 (build b06-fcs).
The application uses JNDI, which uses a connection pool to access a MySQL database. The deployment of the applications .ear file works fine, and the connection of the bean works correctly the rest of the day. But on the next day when I try to use the bean from the client application, I get a Local Transport Exception:
System Exception
javax.resource.spi.LocalTransactionException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
     at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905)
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351)
     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862)
     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
     at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
     at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:4913)
...The ping of the connection pool is still working, at it seems that nothing has changed since yesterday.
Does anybody have any ideas what causes this "overnight" problem?
Thanks in advance,
Istvan

Appserver pools DB connections and your connection expires over night. You should try setting "Connection Validation" checkbox and validate it against some existing table in your DB, see:
http://docs.sun.com/app/docs/doc/819-4712/6n6rit5is?a=view
If this doesn't help you might want to try changing your application to reconnect upon failure. Last thing to try would be plugging in different mysql JDBC driver.

Similar Messages

  • Database Connection loosing password

    Hi there,
    have HFR documents with a connection to Essbase 9.3
    Problem is the database connection seems to loose the password everytime I log off.
    After relogin the connection fails and I have to reenter the password.
    When I reenter the password for the connection it works perfect and is retrieving the data from essbase into the report.
    Also tried the approch to rebuild the connection but did not help.
    In essbase the authentification type is external in an AD.
    The essbase application is NOT registered in Shared Service.
    Is this the reason? From where is the Userid/password gets passed through?
    Thanks,
    Bernd

    Bahar,
    indeed this is annoying ;-( I checked with a later build and the bug is fixed meanwhile.
    Thanks for posting this
    Frank

  • How do the application servers connect the new database after failing over from primary DB to standby DB

    How do the application servers connect the new database after failing over from primary DB to standby DB?
    We have setup a DR environment with a standalone Primary server and a standalone Physical Standby server on RHEL Linux 6.4. Now our application team would like to know:
    When the primary DB server is crashed, the standy DB server will takeover the role of primary DB through the DataGuard fast failover. As the applications are connected by the primary DB IP before,currently the physical DB is used as a different IP or listener. If this is happened, they need to stop their application servers and re-configure their connection so the they coonect the new DB server, they cannot tolerate these workaround. 
    Whether does oracle have the better solution for this so that the application can automatically know the role's transition and change to the new IP without re-confige any connection and shutdown their application?
    Oracle support provides us the answer as following:
    ==================================================================
    Applications connected to a primary database can transparently failover to the new primary database upon an Oracle Data Guard role transition. Integration with Fast Application Notification (FAN) provides fast failover for integrated clients.
    After a failover, the broker publishes Fast Application Notification (FAN) events. These FAN events can be used in the following ways:
    Applications can use FAN without programmatic changes if they use one of these Oracle integrated database clients: Oracle Database JDBC, Oracle Database Oracle Call Interface (OCI), and Oracle Data Provider for .NET ( ODP.NET). These clients can be configured for Fast Connection Failover (FCF) to automatically connect to a new primary database after a failover.
    JAVA applications can use FAN programmatically by using the JDBC FAN application programming interface to subscribe to FAN events and to execute event handling actions upon the receipt of an event.
    FAN server-side callouts can be configured on the database tier.
    FAN events are published using Oracle Notification Services (ONS) and Oracle Streams Advanced Queuing (AQ).
    =======================================================================================
    Who has the experience and the related documentation or other solutions? we don't have the concept of about FAN.
    Thank very much in advance.

    Hi mesbeg,
    Thanks alot.
    For example, there is an application JBOSS server connecting the DB, we just added another datasource and put the standby IP into the configuration file except adding a service on DB side like this following:
            <subsystem xmlns="urn:jboss:domain:datasources:1.0">
            <datasources>
                    <datasource jta="false" jndi-name="java:/jdbc/idserverDatasource" pool-name="IDServerDataSource" enabled="true" use-java-context="true">
                        <connection-url>jdbc:oracle:thin:@<primay DB IP>:1521:testdb</connection-url>
                        <connection-url>jdbc:oracle:thin:@<standby DB IP>:1521:testdb</connection-url>
                        <driver>oracle</driver>
                        <pool>
                            <min-pool-size>2</min-pool-size>
                            <max-pool-size>10</max-pool-size>
                            <prefill>true</prefill>
                        </pool>
                        <security>
                            <user-name>TEST_USER</user-name>
                            <password>Password1</password>
                        </security>
                        <validation>
                            <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
                            <validate-on-match>false</validate-on-match>
                            <background-validation>false</background-validation>
                            <use-fast-fail>false</use-fast-fail>
                            <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
                            <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
                        </validation>
                    </datasource>
                    <drivers>
                        <driver name="oracle" module="com.oracle.jdbc">
                            <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
                        </driver>
                    </drivers>
                </datasources>
            </subsystem>
    If the failover is occurred, the JBOSS will automatically be pointed to the standby DB. Additional actions are not needed.

  • HT1339 My iPod classic shows that memory full in "other" category however there is nothing on it. I have left it connected all day and over night trying to restore it but the progress bar  never goes away.

    My iPod classic shows that memory full in other category however there is nothing on it. I have left it connected all day and over night trying to restore it but the progress bar  never goes away. Is it shot or are there other options to restore to factory settings?

    Hi pbworth,
    When troubleshooting issues with iPod classic, it may be helpful to place the iPod into Disk Mode. For information on how to do so:
    Putting iPod into Disk Mode
    http://support.apple.com/kb/HT1363
    Thanks,
    Matt M.

  • Persist Database connection over user's session

    On portal 3.0.9 with JPDK v1 I have a web provider that has a jsp portlet. The portlet has multiple pages which are navigated useing a parameter specified with the pageParameterName tag in the provider.xml. Each page needs to be able to access the database and to allow a rollback for all a users actions until a certain page is visited I need a way for all the access to be done through one database connection.
    Putting the dbOpen tag in the event:session_OnStart tag of my globals.jsa file doesn't work (I'm not sure the event:session_OnStart is even executed) and trying to create the connection once with the scope="session" creates an error. Any help would be appreciated.

    Generally speaking, persisting a connection over a users session is a BAD idea. If you really need to do it you simply be able to add the Connection object to the session. However, I would strongly recommend that you review your model because it will not scale.

  • Itunes freezes up when my iphone or ipad is connected and charging for an extended time like charging over night.

    Itunes freezes up when ipad or iphone is connected via USB for an extended time like charging over night or even several hours. I am running all current software with all updates on a Macbook Pro. When I hit Eject I get the spinning beachball and have to hit command-option-escape to get out of it or the beachball will stay present forever. Any suggestions?

    Looks like new firmware upgrade solved this issue.

  • I have just updated my ipad to ios 8 a error occured and its now telling me to reset my ipad if i do this im going to loose over 2000 pics of family it wont even connect to itunes though my laptop  also wont turn off or on help pleaseee!

    I have just up dated my ipad 2 to the new ios8, a error occoured at 93%  its now telling me to reset my ipad but if i do this im going to loose over 2000 pics its telling me to connect my ipad to my laptop but still nothing is working its not turning on or off please some one help

    Purplehiddledog wrote:
    I do backup with iCloud.  I can't wait until the new iMac is available so that I can once again have my files in more than 1 location without needing to rely solely on the cloud. 
    I also rely on iTunes and my MacBook and Time Machine as well as backing up to iCloud. I know many users know have gone totally PC free, but I chose to use iCloud merely as my third backup.
    I assume that the restore would result in my ability to open Pages and Numbers and fix the problem with deleting apps, but this would also mean that if my Numbers documents still exist solely within the app and are just not on iCloud for some reason that they would be gone forever.  Is that right?
    In a word, yes. In a little more detail.... When you restore from an iCloud backup, you must erase the device and start all over again. There is no other way to access the backup in iCloud without erasing the device. Consequently, you are starting all over again. Therefore, it would also be my assumption that Pages and Numbers will work again and that the deleting apps issues would be fixed as well.
    If the documents are not in the backup, and you do not have a backup elsewhere, the documents could be gone forever.

  • HT201412 when ipad is connected to power over night and battery is still at 5%?

    Why did i charge my ipad over night and yet the battery strentgh remained only 5% when i opened it on my laptop?

    Could be the charger, cable or iPad. Plug the USB cable into your computer. It may say "Not Charging", however, it is charging slowly and will verify that the cable is good.
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    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
    iPhone: Hardware troubleshooting (Power/Battery section also applies to iPad)
    http://support.apple.com/kb/TS2802
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    iOS 7 Battery Life Draining Too Fast? It’s Easy to Fix
    http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/
    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
    iPad: Charging the battery
    http://support.apple.com/kb/HT4060
    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

  • Connecting with database using setproperty over SOAP connection

    The following method connects to a MySQL database.
    public void setDBDriverName(String in)
         dbDriverName = in;
    public void setDBConnection(String in)
         dbConnection = in;
    public void connectToMySQLDatabase() throws SQLException
         if(dbCon == null)
                 try
                    Class.forName(dbDriverName);     // SQL driver
                    dbCon = DriverManager.getConnection(dbConnection);           // JDBC url
                    s = dbCon.createStatement();
                       catch (Exception e)
                    System.out.println("Could not connect to database using " + dbConnection + " at " + dbDriverName + " : " + e.getMessage());
         else
                System.out.println("Could not connect to databse : Already connected");
    }The method is part of a webservice, in which I use setproperties to set the database connection because the webservice must work with different types of databases like Oracle and MySQL.
    <jsp:useBean id="ContactHistorieClassid" scope="request" class="proxy.soap.ContactHistorieClassProxy" />
         <jsp:setProperty name="ContactHistorieClassid" property="DBConnection" value="org.gjt.mm.mysql.Driver" />
         <jsp:setProperty name="ContactHistorieClassid" property="DBDriverName" value="jdbc:mysql://localhost/contacthistorie" />
         <jsp:setProperty name="ContactHistorieClassid" property="clientID" value="1" />
    <%
         ContactHistorieClassid.connectToMySQLDatabase();
    %>What am I doing wrong here?

    Forgot what happens, sorry. After trying to use the ContactHistorieClassid.connectToMySQLDatabase() method, my server console tells me that it cannot connect to the database, even though it returns the values as they were set in the setproperty.
    When I manually enter the values like this...
    Class.forName("org.gjt.mm.mysql.Driver");     // SQL driver                
    dbCon = DriverManager.getConnection("jdbc:mysql://localhost/contacthistorie"); .. it works properly. So the setproperties are executed as the should be.

  • Keeping Database-Connection over several JSPs

    Hi all,
    when creating a database-connection (Oracle 8.x) with JDBC 2, Tomcat Engine, I encountered the problem, that the connection has been lost after forwarding to another JSP.
    What I read from some other forums, there seem to be 2 major ways of how to keep the connection:
    - session vars
    - connection pool
    I feel for our project session will be a approbiate solution, so can you tell me more about it (technical implementation)???
    Thanks & Rgds.,
    Rainer

    you have to declare a bean variable with session scope, like this:
    jsp:useBean     id="object-name"
         scope="session"
         type="type-of-object"     
         class="fully-qualified-classname"
         beanName="fully-qualified-beanName"
    />
    for more infos see (for example) http://www.stardeveloper.com/articles/display.html?article=2001072001&page=1

  • Database logging dies when station pc is left on over night

    Hi,
    I have a test sequence that logs to a MYSQL database using the TestStand "Database Options" logger.
    When the OI (Full Features Labview OI) is left open with the test sequence loaded overnight - the logger fails to record data to the database on the first and consecutive UUTS tested in the morning - a system reboot fixed the issue.
    Any debug advice on this issue?
    Thanks & Regards,
    Shane.

    Hi,
    Test are not running overnight only the sequence is left loaded.
    I am not closing the connection to the database - I let TestStand take care of all the database connection/logging..
    Is there a setting I need to set in TestStand to force it to open the connection if necessary or something I need to change in the config of the MYSL database/server?
    Thanks,
    Shane.

  • Workspace Database Connection Manager error 8001

    In workspace, when I use the database connection manager to add a new connection I get the following error:
    *8001: The Database Connection could not be found: 6c1c06bf_129b3ad1455_-7ee9*
    Since this is a reinstallation over a previous installation, there are no reports to run to test if they will run.
    Any ideas?

    Hi,
    Yes i was able to solve it. Actually what happened was i remember registering Reporting and Analysis using the same database reusing the same old repository. And after that this issue came up.
    So i took the back up of repository database and also luckily still on testing environment and had not much to loose. So i reconfigured the relational database dropping all the databases. It resolved the issue.
    But why it happened and the real cause is not know even Oracle support was unable to answer this.
    Peace

  • Why do I get a class conflict between the Prepare SQL.vi and the Get Column Name.vi with the SQL Toolkit compatibility vis from the Database Connectivity Toolkit?

    I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi. 
    The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references. 
    How do I resolve this conflict?
    Thank You.
    Dan

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • THE DATABASE CONNECTION IS LOST :;; WIERD  ORA-01012 NOT LOGGED ON ERROR

    ERROR: ORA-01012 NOT LOGGED ON ERROR
    I AM USING A JAVA SWING INTERFACE (JDK 1.1.8), WHICH USES JNI TO CALL C PROGRAMS WHICH IN TURN CONNECTS TO THE DATABASE, ORACLE 8.1.6.
    A DATABASE CONNECTION IS ESTABLISED IN THE MAIN CLASS BY CALLING A FUNCTION FROM THE CONSTRUCTOR.
    FOR ALL OTHER FUNCTION CALLS WHICH ARE MADE FROM WITHIN THIS CONSTRUCTOR, THE CONNECTION STAYS.
    BUT AFTER THE CONTRUCTOR CALL IS COMPLETE, DATABASE CONNECTION IS STRANGELY LOST. THUS ALL OTHER FUNCTION CALLS FAIL BECAUSE OF CONNECTION ISSUES GIVING ORA-01012. THOUGH IF I CHECK UP IN THE DATABASE, THE CONNECTION DOES FIND AN ENTRY.
    SO IT APPEARS THAT SOMEHOW THE JAVA INTERFACE LOOSES TRACK OF CONNECTION. BUT STRANGELY ALL THE FUNCTIONS WORK IF CALLED FROM THE CONSTRUCTOR......... BUT THATS NOT THE IDEA.
    PLEASE HELP, THIS PROBLEM IS BUGGING ME FOR WEEKS NOW.
    THANKS
    AMIT

    apologise for the caps lock.
    i am working on a previous system with java swing front end which alread uses jni, and connects to database using pro *c.
    My problem is that the connection is lost as soon as the constructor of the main class is run, giving an
    ORA-1012 NOT LOGGED ON ERROR.
    But if i place the same calls in the contructor all the database call work.
    It somehow appears that the java interface looses the connection context. Though the session does find entry in the oracle dynamic tables as long as i dont close the front end main window, thereby meaning that its the jave interface which looses the context.
    part of the code of the main class eiquser.
    //constructor
    public EiqUser() {
         super();
         initMRI();
    private void initMRI() {
         try {
              /* initialize geoManager environment */
              int rccc = new EiqCfuncs().eiqInitEnv();
    //eiqinitenv is a c function which connects to database using pro *C
              EiqCfuncs cfuncs = new EiqCfuncs();
              //EiqCfuncs has the prototypes of c functions used bye the java interface
              this.ivjFileMenu.setText(cfuncs.eiqGetText(resNum.getTEXT_FILE_MENU())); // sets the menu name
    and so on.........
    public void eiqUser_WindowClosed(java.awt.event.WindowEvent windowEvent) {
         new EiqCfuncs().eiqTermEnv(); // gives ora-1012 error
    //eiqtermenv is supposed to disconnect from data base, but returns an ora-1012 not logged on erro
         return;
    //eiqtermenv closes the connection with the data base. But fails in this case. if i place the same call ( eiqtermenv) in the initMRI function or the contructor it succeeds.
    Plus if i dont use the java interace and use a c stub for executing the same sequence of functions, then i dont face any problems.
    the proc calls exectuted ultimately by...
    :::eiqinitenv
    exec sql connect using :sqlid identified by sqlpw; // succeeds giving sqlerr.sqlcode=0;
    ::::eiqterm env
    exec sql commit work; //fails giving 0ra-1012 error
    exec sql rollback work;
    Why is the java interface loosing track of the connection once done with the constructor of the main class?? The session still finds an entry in the oracle dynamic tables.
    Please help
    Thx
    Amit

  • "Error establishing a database connection" after scale database

    Hello, i have a wordpress website hosted at my azure account (www.timothy-k.com). I was trying to scale my sql database and i have changed it from standard to basic. Then, I cant connect to my site, because i have this error.
    I scale the database again from basic to standard but the issue persists.
    In the website dashboard I can see an another mysql db as a linked resource.I check the credentials for wp-config and they are ok.
    Can you help me?

    Hi DigitalJo,
    Are you moving between the service tiers using the Azure Management Portal? Can we have the error which you get?
    Connections to the database may be temporarily dropped when a performance level change or upgrade/downgrade completes, and a few seconds may elapse before connections can be re-established. SQL Database applications should be coded to be resilient to dropped
    connections as this can occur anytime in SQL Database when a computer fails in the data center and the SQL Database service fails over the database.
    Reference :
    https://msdn.microsoft.com/en-us/library/azure/dn369872.aspx
    Regards,
    Mekh.

Maybe you are looking for

  • Allocation of Price Difference

    Dear Experts, I am working for a cement industry. One of our Semi Finished material is Clinker which we will be using against production of cement and we sell clinker also. The price control for Clinker is maintained as standard in system (150). Ther

  • USMT Migration Questions (Should I use two Config files?)

    I am currently running System Center Config Manager at my workplace. We have integrated MDT and are running a UDI on all of our PXE deployments. I have a ton of MDT Task Sequences that use the UDI and I have started looking into USMT. Currently we ar

  • Are mobile internet USB devices still not working on Snow Leopard?

    Are mobile internet USB devices still not working on Snow Leopard? I actually had to go back to my previous operating system to get this to work. I would however prefer to use Snow Leopard...if Apple & HUAWEI have finally got their act together!

  • NAC OOB

    dear all, I have this outline in my lab: I use L3 OOB VG, quarantine VLAn 100(172.16.100.0/24), Access VLAN 10(172.16.10.0/24). The untrusted interface IP 172.16.100.1 The trusted interface IP 172.16.10.3 Router's interface for Access VLAN 172.16.10.

  • IPhone 4s lock button not working

    The lock/power button on my iPhone 4s randomly stopped working today. I can still click it, but the screen does not lock or do anything in response to me clicking the button. I believe that it is still under warrenty, how do i go about fixing this pr