Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E831A18F66 for ; Fri, 7 Aug 2015 14:44:15 +0000 (UTC) Received: (qmail 59432 invoked by uid 500); 7 Aug 2015 14:44:15 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 59406 invoked by uid 500); 7 Aug 2015 14:44:15 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 59395 invoked by uid 99); 7 Aug 2015 14:44:15 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2015 14:44:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 01285C027C for ; Fri, 7 Aug 2015 14:44:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.97 X-Spam-Level: X-Spam-Status: No, score=0.97 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ckiqx5Pl8-4O for ; Fri, 7 Aug 2015 14:44:14 +0000 (UTC) Received: from elasmtp-scoter.atl.sa.earthlink.net (elasmtp-scoter.atl.sa.earthlink.net [209.86.89.67]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 2D9EF42B18 for ; Fri, 7 Aug 2015 14:44:14 +0000 (UTC) Received: from [68.10.153.81] (helo=[192.168.1.5]) by elasmtp-scoter.atl.sa.earthlink.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1ZNisM-0004n3-IV for user@cayenne.apache.org; Fri, 07 Aug 2015 10:44:02 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: DataSourceInfo From: Joe Baldwin In-Reply-To: Date: Fri, 7 Aug 2015 10:44:01 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <6082DAFB-90CB-4CC4-9510-ED9B638B0C88@earthlink.net> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.2102) X-ELNK-Trace: ddf0204093c7bf071aa676d7e74259b7b3291a7d08dfec791754cea1367acbc313398321260b7779350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 68.10.153.81 I am using DHCP (and have been for years). This only started happening = when I had my webhost upgrade to Tomcat 8 (and I converted to Cayenne = 4). The connection mismanagement DOES NOT happen on my development = server. This is why I am starting with verifying the JDBC version via Cayenne. = However, (as I said) DataSiourceInfo returns nulls. > On Aug 7, 2015, at 10:30 AM, John Huss wrote: >=20 > I think this is a "feature" of MySQL. It closes idle connections > eventually. You can add a validationQuery to keep the connection = active. >=20 > On Fri, Aug 7, 2015 at 2:40 AM Joe Baldwin = wrote: >=20 >> Problem: I am having problems with MySQL connections being disabled >> improperly on the production server (the development server does not = show >> the same error). This happens only after an idle period (and only on = the >> production server). >>=20 >> java.io.EOFException: Can not read response from server. Expected to = read >> 4 bytes, read 0 bytes before connection was unexpectedly lost. >> com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3143) >>=20 >> My theory is that there is some problem with the JDBC connector(s). = So I >> am trying to track down two separate issues >> 1. my development MySQL DBMS version is 5.6 while the = production >> version is 5.5 (this may be the problem) >> 2. my webhost gives me only incremental access to tomcat, so I = am >> attempting to verify the JDBC connector (I installed per their = directions - >> webhost imposed). >>=20 >> It is #2 that is what I want to start with, but it is difficult to >> verify. I used to be able to accomplish #2 with Cayenne = DataSourceInfo. >> However, >>=20 >> getJdbcDriver() now returns null >> getUserName() now returns null >> and >> getMaxConnections() now returns the wrong number >>=20 >> This used to work a few versions back - so this is confusing. So, I >> cannot tell at this point whether the DataSourceInfo is incorrect, or >> whether the dbcp.properties file (I am using DHCP) is not being read >> correctly, or some other problem. >>=20 >> So, I believe my first step is to get DataSourceInfo working again so = that >> I can verify the correct JDBC driver is being used (there are two - = as I >> said). >>=20 >> Question: >> 1. is DataSourceInfo still a reliable way to get JDBC info? >> 2. if so, could you please show me a few lines of example code = (because my >> code is failing) ? >>=20 >> Thanks >> Joe >>=20 >>=20 >>=20 >>=20