pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: loading jdbc Driver in servlet
Date: Sun, 16 Dec 2018 10:20:35 -0700
Message-ID: <3B618955-9F54-41AC-967A-A7A77A7C8085@gmail.com> (raw)
In-Reply-To: <CADK3HHLOkkO0sid73E_peieeJyeXNMmA8wXyf_PH04pkJENa1w@mail.gmail.com>
References: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com>
	<CADK3HH+OHFy5HgrfhW1fBebkkGODpt8v+bGPm4pC3WYxJUq8Yg@mail.gmail.com>
	<516D35C9-36C4-4F25-A18A-ADDF55D0BD0A@gmail.com>
	<4A34E53B-49DC-4E7D-9802-645EDAF8443E@gmail.com>
	<CADK3HHLOkkO0sid73E_peieeJyeXNMmA8wXyf_PH04pkJENa1w@mail.gmail.com>

Tomcat version 9. Embedded in my main()

> On Dec 16, 2018, at 9:30 AM, Dave Cramer <pg@fastcrypt.com> wrote:
> 
> My guess is it has something to do with your servlet classpath loader. Which servlet engine are you using ?
> Dave Cramer
> 
> davec@postgresintl.com
> www.postgresintl.com
> 
> 
>> On Fri, 14 Dec 2018 at 16:04, Rob Sargent <robjsargent@gmail.com> wrote:
>> 
>> 
>>>> On Dec 14, 2018, at 2:02 PM, Rob Sargent <robjsargent@gmail.com> wrote:
>>>> 
>>>> 
>>>> 
>>>> 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.
>>>> 
>>>> 
>>>> Dave Cramer
>>>> 
>>>> davec@postgresintl.com
>>>> www.postgresintl.com
>>>> 
>>>> 
>>>>> On Fri, 14 Dec 2018 at 13:29, Rob Sargent <robjsargent@gmail.com> wrote:
>>>>> 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, “No suitable driver found...”.  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).
>>> 
>>> 
>> I’m using javax.servlet-api-3.1.0.jar
>>> 
>>> 
>> 

view thread (12+ messages)  latest in thread

Message-ID: <3B618955-9F54-41AC-967A-A7A77A7C8085@gmail.com>
Permalink:  ../3B618955-9F54-41AC-967A-A7A77A7C8085@gmail.com/
Also on:    postgresql.org/message-id/3B618955-9F54-41AC-967A-A7A77A7C8085@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com, pg@fastcrypt.com
  Subject: Re: loading jdbc Driver in servlet
  In-Reply-To: <3B618955-9F54-41AC-967A-A7A77A7C8085@gmail.com>
  References: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com> <CADK3HH+OHFy5HgrfhW1fBebkkGODpt8v+bGPm4pC3WYxJUq8Yg@mail.gmail.com> <516D35C9-36C4-4F25-A18A-ADDF55D0BD0A@gmail.com> <4A34E53B-49DC-4E7D-9802-645EDAF8443E@gmail.com> <CADK3HHLOkkO0sid73E_peieeJyeXNMmA8wXyf_PH04pkJENa1w@mail.gmail.com> <3B618955-9F54-41AC-967A-A7A77A7C8085@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox