Problem with connection to PostgreSQL 8 database

I'm a little new to PostgreSQL 8 and Resin. I get this exception after having not used the app for some time (8 hours it takes from what I've read):
com.mysql.jdbc.CommunicationsException: 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.execSQL(Connection.java:2917) at
com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
at Brokers.ClientBroker.getClientString(ClientBroker.java:16)
at SignIn.doPost(SignIn.java:43) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:165) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:103) at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346) at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:534) ** END NESTED EXCEPTION ** Last packet sent to the server was 1 ms ago.
After I make any kind of upload to my web host (it reloads I believe) then I can make a connection just fine. I open the connection in the init() of my login servlet and keep the connection open for the rest of session. Does anyone know anything more about this particular issue? The problem occurs on the web host so making any changes to the server.xml will mostlikely not be possible.
Thanks in advance.

Exception seems to be related to MySQL and not Postgres.
You can set "autoreconnect=true" property for MySQL to avoid this problem

Similar Messages

  • Urgent: Problems with connecting to a database

    I have problems with getting a connection to both Oracle and Access.
    For Access I added the .jar files in my classpath.
    For Oracle I don't know which files I should add to the classpath.
    Here's the code:
    To connect with Access:
    public class AccessDatabase extends JFrame {
         private Connection conn;
         private Statement stmt;
         public AccessDatabase() throws SQLException,IOException{          
         DriverManager.registerDriver(new easysoft.sql.jobDriver());
         System.out.println("Connecting...");
    conn= DriverManager.getConnection ("jdbc:odbc:easysoft:db1");
         System.out.println("Connected");          
              stmt=conn.createStatement();
         ResultSet r=stmt.executeQuery("select name,adress from Tabel1");
         while(r.next()){
              String a=r.getString("name");
              String b=r.getString("adress");
              System.out.println(a+""+b);
    and for Oracle:
    public class AccessDatabase extends JFrame {
    private Connection conn;
    private Statement stmt;
    public AccessDatabase() throws SQLException,IOException{          
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    System.out.println("Connecting...");
    conn= DriverManager.getConnection ("jdbc:odbc:easysoft:db1");
    System.out.println("Connected");          
    stmt=conn.createStatement();
    ResultSet r=stmt.executeQuery("select name,adress from Tabel1");
    while(r.next()){
              String a=r.getString("name");
              String b=r.getString("adress");
              System.out.println(a+""+b);
         }}}     

    For getting connection from oracle you need to do 2 things.
    1-- As said earlier put classes12.zip in classpath
    2. For getting connection use as below ---
    instead of --conn= DriverManager.getConnection ("jdbc:odbc:easysoft:db1");
    Use thin driver ---
    conn = DriverManager.getConnection (jdbc:oracle:thin:@servername:portno , UserName,Password);
    replace servername UserName,Password in code you will get the connection.
    Thanks
    Rakesh

  • Problem with connection in Mysql database in struts application

    Helllo
    i've just started learning struts for my new project where i'm having problem in accessing mysql database
    the datasource being defined in struts-config.xml is as follows:
    <data-sources >
        <data-source type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
          <set-property property="driverClassName" value="com.mysql.jdbc.Driver" />
          <set-property property="user" value="root" />
          <set-property property="password" value="" />
          <set-property property="minCount" value="" />
          <set-property property="maxCount" value="" />
          <set-property property="description" value="A" />
          <set-property property="url" value="jdbc:mysql:///dnbotind_nbotdb" />
          <set-property property="readOnly" value="false" />
          <set-property property="autoCommit" value="true" />
          <set-property property="loginTimeout" value="" />
        </data-source>
      </data-sources>as i run the application
    it gives the errors HTTP status 404-Servlet action is not available
    Thx in advance

    student-java wrote:
    it gives the errors HTTP status 404-Servlet action is not availableThis is unrelated to the datasource configuration.
    HTTP 404 is a "Page not found" error. The request URL is simply wrong. Either there's a typo in the URL, or there is a typo in the servlet mapping, or the servlet is not there where you think.

  • Problem with connection to multiple Databases

    i'm trying to write a sql query that returns data from tables that reside in
    different databases on different servers, STYX and MICA to be exact.
    I log into STYX and write the following simple SQL statement (what is
    returned is really irrelevant, i'm just trying to figure out the process
    right now)
    select a.reason_code, b.reason
    from [email protected] a,
    hedgessw.reason_code b
    where a.reason_code = b.reason_code
    hedgessw.reason_code is on STYX
    the other table is on MICA
    i get the following error code
    ORA-02019: connection description for remote database not found
    this seems to imply that i need to create a "connection description" for the
    remote database before i can establish the link.
    is this the case?
    if so, how do i create this?
    any help you can offer would be greatly appreciated!
    thanks in advance
    null

    What error messages are you getting?
    What happens when you try to display the page?
    General comments
    - JSPs shouldn't be connecting to databases. That should be done in the data access layer, not the view layer. Put the code in beans/java code.
    - Why reinvent the wheel? There are a couple of excellent taglibs out there that already do DB connections. Check out the JSTL sql tags.

  • Problem with online split backup, database oracle

    Hello,
    we use for backup our SAP system online split backup, our database is almost 3TB big. Backup is functional but sometimes (4x-5x per month) backup fail with error bellow. If i understant this problem correctly brbackup lost connection to oracle after split disk system and cant stop backup mode in database and backup failed. How can i solve this problem? Exist some parameter for brbackup for reconnect to db when brbackup lost connection? Thanks for your help!
    BR0051I BRBACKUP 7.00 (25)
    BR0262I Enter database user name[/password]:
    BR0055I Start of database backup: bebnhrzd.anf 2009-09-22 14.52.25
    BR0484I BRBACKUP log file: /oracle/BP1/sapbackup/bebnhrzd.anf
    BR0351I Restoring /oracle/BP1/sapbackup/cntrlBP1.dbf
    BR0355I from /oracle/BP1/sapbackup/cntrlBP1.dbf ...
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.10
    BR0319I Control file copy created: /oracle/BP1/sapbackup/cntrlBP1.dbf 21676032
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.13
    BR0315I 'Alter database begin backup' successful
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.14
    BR0295I Splitting mirror disks...
    BR0280I BRBACKUP time stamp: 2009-09-22 16.07.43
    BR0296I Split of mirror disks successful
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301E SQL error -3135 at location BrBackAlter-3, SQL statement:
    '/* BRBACKUP */ ALTER DATABASE END BACKUP'
    ORA-03135: connection lost contact
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0318E 'Alter database end backup' failed
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301E SQL error -3114 at location BrBackAlter-3, SQL statement:
    '/* BRBACKUP */ ALTER DATABASE END BACKUP'
    ORA-03114: not connected to ORACLE
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0318E 'Alter database end backup' failed
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301W SQL error -3114 at location BrbDbLogClose-1, SQL statement:
    'UPDATE SAP_SDBAH SET RC = '0005', ENDE = '20090922161744', OBJ = ' ', LINE = '#  224     0     0     81358       7817759352        0                0  ALL          online_split    util_file        -
    7.00 (25)' WHERE BEG = '20090922145225' AND FUNCT = 'anf' AND SYSID = 'BP1''
    ORA-03114: not connected to ORACLE
    BR0326W Update of database log header failed
    BR0056I End of database backup: bebnhrzd.anf 2009-09-22 16.17.44
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0054I BRBACKUP terminated with errors
    Backup utility finished with returncode 5
    Backup FAILED

    Hello,
    in note 534729 is nothing about ORA-03135: connection lost contact only error ORA-03114 which refer to the note 335199 and in this note in nothing about ORA-03114 I want to say two things: this two oracle errors (ORA-03135 and ORA-03114) are not in alertSID.log on db server or in syslog on backup server. This error are only reported from brbackup which is running on backup server which is "client side". We don't have problem with connection from work processes on all instances to db server, we have only problem with brbackup which lost connection after split disk system. How i say this problem occurs only sometimes.  I was tested network connection from backup server to db server via niping a this is result:
    (root@hytti) #./niping -c -H kiuru -B 30000
    Sat Sep 26 14:10:58 2009
    connect to server o.k.
    send and receive 10 messages (len 30000)
    times -
    avg      7305 usecs
    max     46234 usecs
    min      2168 usecs
    bw    8020.50 kb/sec
    excluding max and min:
    av2      3081 usecs
    bw2  19013.91 kb/sec
    do you have any idea?? Thanks!

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Power Query Update breaks connection to PostgreSQL database

    After the update to Power Query 2.11.3625.144, we can't connect our PostgreSQL database anymore. 
    Error message is: 
    DataSource.NotFound: PostgreSQL: Unable to find a database provider with invariant name 'Npgsql'.
    This error may have been the result of provider-specific client software being required but missing on this computer.  To download client software for this provider, visit the following site and choose at minimum 'Npgsql version 2.0.12': http://go.microsoft.com/fwlink/?LinkID=282716
    Readding the Npgsql driver doesn't solve the issue. Has the version requirement changed with the Power Query update? Or is PostgreSQL connectivity completely broken?

    Hmm, 
    If I add the line, I get the following error message in Power Query: 
    'Npgsql' returned the error: 'Unrecognized element. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 169)'.
    This error may have been the result of provider-specific client software being required but missing on this computer.  To download client software for this provider, visit the following site and choose at minimum 'Npgsql version 2.0.12': http://go.microsoft.com/fwlink/?LinkID=282716
    The code in the machine config looks like this: 
      <system.data>
            <DbProviderFactories />
            <add description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.12.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" name="Npgsql Data Provider" invariant="Npgsql" support="FF"/>
        </system.data>
    The node seems to be empty by default. Can it be that the surrounding stuff has to be differently written in that case?

  • Problem with connection with db netbeans

    hello all!
    i created a db in
    jdbc:derby://localhost:1527/simple [demo on DEMO] ---->Demo
    my user name demo and the pass demo
    in the info of the db i get this:
    display name:
    jdbc:derby://localhost:1527/simple [demo on DEMO]
    the problem lines is
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    and
    Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/simple", "APP", "demo");
    i tried to change the APP to demo but the same.
    the errors are:
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/simple
    the img of the work is here:http://yfrog.com/0cimpatg
    thanks for all!

    user12163960 wrote:
    thanks the first line ok! THE LINE IS WORKING NOW:
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    now i have problem with:
    Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/simple", "APP", "demo");
    the error:
    java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/simple
    You should really read the Derby manual.
    When you use a url with jdbc:derby://localhost: then you must start a Derby server first.
    If you want to use the embedded engine, the URL is: jdbc:derby:/path/to/database
    More details are here: http://db.apache.org/derby/docs/10.6/devguide/cdevdvlp34964.html

  • Problem with connecting and syncing   (quicktime.qts)

    Hi,
    I have a problem with connecting and syncing my Iphone to itunes.
    iphone alone on PC -> uploading files (fotos) is possible
    itunes starts normaly, if iphone is not conected.
    if i connect iphone after starting itunes, or if i start itunes after connecting iphone i get an itunes-error with message:
    AppName: itunes.exe AppVer: 9.0.2.25 ModName: quicktime.qts
    ModVer: 7.65.17.80 Offset: 00909a47
    i test different things...
    - used another USB-port
    - used another PC
    - used macbook of my wife instead PC
    - deinstalled and new installed of itunes (older and newer versions) folow tutorials of apple
    - use another USB-Cable...
    I'm resigned, Please help me..
    Tom

    AppName: itunes.exe AppVer: 9.0.2.25 ModName: quicktime.qts
    In this context, that can sometimes indicate trouble with a content file on the phone (or Touch).
    Do you have any podcasts stored on the iPhone at the moment? If so, if you delete them from the phone, can you connect to iTunes without the error?

  • HT204053 I have a problem. I bought Pages and Numbers for my iMac and so far everything was OK.  Suddenly i have a problem with connection to iCloud. Dokuments created on iMac in Pages or Numbers are not transfered to iCloud. Not uploaded in iCloud.

    I have a problem.
    I bought Pages and Numbers for my iMac and so far everything was OK.
    Suddenly i have a problem with connection to iCloud.
    Dokuments created on iMac in Pages or Numbers are not transfered to iCloud. Not uploaded to iCloud. There is a sign  (small shape of iCloud), that they are waiting to be uploaded to iCloud.
    I think the iCloud is OK.
    i can see and manage documents in iCloud. i can create them on iPad and  see them and delete them in iCloud.
    But not on iMac.
    i dont know what has happened and I am not abble to find the solution. It was OK till some days ago….

    I have a similar problem! Everything stopped working after upgrading to Mac OS 10.8.4 through the App Store. Help!

  • Problem with connecting to free wifi after upgrading to Windows 8.1 from Windows 8

    Hi
    I had problems with connecting to free Wifi after upgrading my PC(Notebook) to Windows 8.1 from Windows 8. As I travel a lot within europe, I am used to being able to connect to Free Wifi(those that dont need a key or password to enter) but soon after downloading
    Windows 8.1 I almost never was able to do this. I'd always get «LIMITED» even though the signal was strong.This was so fustrating,so much so that I reset my PC to clear it of Windows 8.1 and am now back to Windows 8.This is a shame because I was really liking
    using Windows 8.1 and if not for this problem(which is a big one) I'd still be using it. If I download Windows 8.1 again from the Windows store what is the probability that I'll have the same problems?
    Thanks Portozzygirl

    More often than not when a device isn't working it is because the driver has become corrupted. Re-installing a fresh copy should help
    http://windows.microsoft.com/en-us/windows7/Update-a-driver-for-hardware-that-isnt-working-properly?SignedIn=1
    http://captaindbg.com/how-to-update-drivers-on-windows-7/   (works on win 8 too)
    Wanikiya and Dyami--Team Zigzag

  • After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.

    After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.

    1. Download the iOS 5.0.1: http://www.tobias-hartmann.net/2011/11/download-ios-5-0-1-veroffentlicht-direkte -downloadlinks/
    2. open itunes,Click in iTunes while holding down the Shift key (on Windows) or Alt key (Mac) to restore and firmware

  • How do I get connected to a server on my network via an IP address?  When I try to open in a URL and login as a registered user with proper login it errors out saying there was a problem with connecting to the server?

    I am new to Mac...How do I get connected to a server on my network via a hyper link IP address path?  When I try to open in a URL and login as a registered user with proper login it errors out saying there was a problem with connecting to the server?

    Some of the following is going to use some technical terms — this area is inherently somewhat technical. 
    If you don't understand some part of the following reply, please ask.
    Is this your own OS X Server system on your own network, or is this some other server within some larger organization? 
    You're posting this in the OS X Server forum, which is a software package that allows OS X systems to provide web-based and many other services; to become servers.
    If it's your OS X Server on your network, then the network and DNS configurations are suspect, or the server is somehow malfunctioning or misconfigured.   This is unfortunately fairly common, as some folks do try to avoid setting up DNS services.
    If it's a larger organization and somebody else is managing the server and the network, then you'll probably need to contact the IT folks for assistance; to learn the network setup and DNS requirements, and if there's a problem with the server itself.
    The basic web URL "hyper link IP address path" — without using DNS — usually looks something the following, where you'll need to replace 10.20.30.40 with the IP address of your server:
    http://10.20.30.40
    UptimeJeff has posted a URL that specifies the AFP file system; an OS X file share.  That's used if you're connecting to an Apple storage service somewhere on your network.  You might alternatively need to specify smb://10.20.30.40 or such, if it's a Windows file server.  (There can be additional requirements for connecting to Windows Server systems, too.)
    If there's local IT staff available here, please contact them for assistance.  If these are your own local systems and your own local OS X Server system, then some information on the server will be needed.  (If you're on a NAT'd network, you'll also need to get DNS services configured and working on your local OS X Server system and your network — you'll not be able to skip this step and reference ISP DNS servers here — or things can and usually will get weird.)

  • Problem with connecting to DB2 from ADFBC

    I have a problem with connection to DB2 data using ADF BC components. Everything looks fine till I run the page(JSF) to see the data of a db2 table. I created a read only view object. This view is registered in the AM and from AM the view is returning the rows without any problem. But when I am running the page which has the view as a table these errors are thrown. Please help me to fix this.
    JBO-30003: The application pool (od.mft.views.MFTServiceLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
    at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:336)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
    at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:545)
    ## Detail 0 ##
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
    at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:220
    ## Detail 0 ##
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    Thanks
    Gangs

    Steve, the tester works good as expected and its retreiving the rows. As I said earlier the problem is with the JSF page when I ran the page on Embeded Oc4j of Jdev the page showing the above. The exception does not show on the console.
    Please let me know if you need any more details.
    thanks
    Gangs

  • Problem with connecting ipad 2 with crestron cp2e...help plss its urgent... I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while t

    problem with connecting ipad 2 with crestron cp2e...help plss its urgent...
    I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while the device was in auto -lock(sleep)press connect to reconnect) when i pressed again its connected with cp2e. i am using netgear wireless access point . i also has been changed access point as well as updated ipad firmware bt problem is as it is .. pls help.

    Hi have you solved the issue ?
    Cause I have the same problem.
    Tnx

Maybe you are looking for

  • Hyperlink URL for an iweb page for press release

    I am writing a press release in Word and I want to create a hyperlink in Word directly to the third page on my iweb site which is http://web.mac.com/decouvrir/mamaloosemusic/Welcome.html. But that adress is for the welcome page. But I want to get dir

  • How to upload photos from iPad mini to Win PC

    I would like to know the most simple way of uploading the photos stored in my iPad mini to my Windows XP PC. They do not have to be synced. Tx.

  • What are Preapproved Payments?

    Greetings, I got an alert on my PlayBook saying that version 1.02 of OrigamiBrowser is now available. I tried to download it, but I got an error message saying that my payment method was no longer valid. Since Origami is a free browser, I had no trou

  • SOLMAN & IDES ERP 6 installation on same host

    Hi all,    I have to install solman 7 & IDES erp6 on the same host. first iam going to install solman as need for solmankey. my issue is that do i need to instal java jdk, oracle, patch and all which are same for both or only export . how do i go abt

  • X86 cisco vpn client

    Is there a Cisco vpn client for Solaris x86 ? I cannot find one on their website. How are Sun employees connecting to the Sun vpn if running Solarix 10 x86 on a desltop ? TIA Brian