Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXub8-0000ml-HM for pgsql-general@arkaria.postgresql.org; Fri, 14 Dec 2018 21:02:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXub7-0005KA-4Q for pgsql-general@arkaria.postgresql.org; Fri, 14 Dec 2018 21:02:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXub6-0005K3-Md for pgsql-general@lists.postgresql.org; Fri, 14 Dec 2018 21:02:12 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXub3-00053r-Eo for pgsql-general@postgresql.org; Fri, 14 Dec 2018 21:02:11 +0000 Received: by mail-pl1-x633.google.com with SMTP id gn14so3255787plb.10 for ; Fri, 14 Dec 2018 13:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=zLKkzUj/4QENEKsqkYl5OLq7RSQraHK2BXxZZTk3eaw=; b=EKoQN+LF3IdMQC4npbonPiJlphzZFgm30EjpU/9UiNzYuW+ii6WT3jud+yUD9AG0JM D5gPzPDQJkUbqSTChim2PrQzgh/zmCwLoU4rMqrrjiHBhk/vZMIlUozsDKpA/17s67ZC +lVQnwwYpRtyoNGQjsZPNE2PomvQIDY7etJHTQZ51NcgiaXoZ/jjaodLfdg0S5W7jAv4 bXvAfKcWE49TJevMNpBLd+FdUsa0BGyMvES1YvZFoAQUpMeTI9oUoRIY9ZmkDSdiE1j4 SWAO0uO5XOGwsaiNrDkzrGPt7a31HpaAy41wIUAtH5pafk+K1v7p+85GPwkBz+xBJKR8 +UvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=zLKkzUj/4QENEKsqkYl5OLq7RSQraHK2BXxZZTk3eaw=; b=Xe7JOslpPqUbFUo+BCVxZAHKYTE0SqAceGf1RhJHjIz8mXLE+a1QV9S1m7z4kZZ7R0 WueOPBasXPbYKxu0go/8g2YzWTdCGM6wlK5s/v8/YsFzx/szhPBJjDDj6yEa+B3P1L4y 99w9GbZ+qPFeWcnts3gQ5q7gbH7NHZkqRXxRERUXON+AuBDgUctuaa+BrztA81hfbfDe 667vER4Fc/DxsBK9hktFdRo6RG5qdaF5+ABJcuZCEljoPgPMAgb+xAg0Js964jpDGzec lF3XCQOnE0RNkb8LJyggcLZ573o3DsNjCaVWifHlTg3ttM2w8HoFssf93qfppGWxoDYY ZcaQ== X-Gm-Message-State: AA+aEWbtKalPoiuWG7pW8Y9T0vBLVVIDD1YzeLra5Dtq4c2b194fBu2P fXhA0zeU2eRZTMfdfCU8EBM= X-Google-Smtp-Source: AFSGD/VK9gSzKAfxWDaI9KbLq37Zbij1iI6s/ga3tOdsetehzHpRT2mG0ftrgx/8UavtlULWNLQrwQ== X-Received: by 2002:a17:902:708b:: with SMTP id z11mr4251669plk.203.1544821326814; Fri, 14 Dec 2018 13:02:06 -0800 (PST) Received: from kitselas.uconnect.utah.edu ([155.98.131.6]) by smtp.gmail.com with ESMTPSA id v14sm8863678pgf.3.2018.12.14.13.02.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 13:02:06 -0800 (PST) From: Rob Sargent Message-Id: <516D35C9-36C4-4F25-A18A-ADDF55D0BD0A@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_CCA0CB37-5EB3-48D6-96E9-D98D5E822371" Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: loading jdbc Driver in servlet Date: Fri, 14 Dec 2018 14:02:04 -0700 In-Reply-To: Cc: "pgsql-general@postgresql.org" To: Dave Cramer References: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com> X-Mailer: Apple Mail (2.3445.101.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_CCA0CB37-5EB3-48D6-96E9-D98D5E822371 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 14, 2018, at 1:30 PM, Dave Cramer wrote: >=20 > Strange, I wouldn't think so, but then I haven't used a raw servlet = for so long I have no idea. >=20 >=20 > Dave Cramer >=20 > davec@postgresintl.com > www.postgresintl.com >=20 > On Fri, 14 Dec 2018 at 13:29, Rob Sargent > wrote: > Using java 1.8, postgresql-42.1.4.jar, embedded tomcat 9 >=20 > It appears to me that I need to make the call = "Class.forName("org.postgresql.Driver)" when the entry is in a servlet. = Is this expected, within a servlet, or is this just post hoc ergo = propter hoc at it finest and I changed something else (wittingly or = not). Same code outside of servlet does not need the forced loading of = the class and the manual claims it's not need after java 1.6 >=20 I too am suspicious. But the vagaries of javax are daunting. But if I comment it out, as just now, =E2=80=9CNo suitable driver = found...=E2=80=9D. I was days playing with configuration and such think = that this very specific error message was telling me my CLASSPATH was = wrong. I wonder if I have an old javax installation (which I put in place just = recently). --Apple-Mail=_CCA0CB37-5EB3-48D6-96E9-D98D5E822371 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Dec 14, 2018, at 1:30 PM, Dave Cramer <pg@fastcrypt.com> = wrote:

Strange, I wouldn't think so, but then I haven't = used a raw servlet for so long I have no idea.


On Fri, 14 Dec 2018 at 13:29, Rob Sargent <robjsargent@gmail.com> wrote:
=20 =20 =20

Using = java 1.8, postgresql-42.1.4.jar, embedded tomcat 9

It appears to me that I need = to make the call "Class.forName("org.postgresql.Driver)" when the entry is in a servlet.  Is this expected, within a servlet, or is this = just post hoc ergo propter hoc at it finest and I changed something else (wittingly or not).  Same code outside of servlet does = not need the forced loading of the class and the manual claims it's not need after java 1.6

I too am suspicious.  But the vagaries of = javax are daunting.
But if I comment it out, as just now, = =E2=80=9CNo suitable driver found...=E2=80=9D.  I was days playing = with configuration and such think that this very specific error message = was telling me my CLASSPATH was wrong.

I wonder if I have an old javax = installation (which I put in place just recently).




= --Apple-Mail=_CCA0CB37-5EB3-48D6-96E9-D98D5E822371--