[Geoserver-devel] [JIRA] (GEOS-9786) diskquota: impossible to configure JNDI on vanilla installation of geoserver

Luca Pasquali created an issue

GeoServer / BugGEOS-9786

diskquota: impossible to configure JNDI on vanilla installation of geoserver

Issue Type:

BugBug

Affects Versions:

2.17.3

Assignee:

Unassigned

Attachments:

Screenshot from 2020-10-23 22-55-08.png, image-2020-11-05-10-49-35-304.png

Components:

Configuration

Created:

05/Nov/20 10:59 AM

Environment:

Tested on Centos 6,7 SLES 15 SP1, Ubuntu Focal 20.04
latest release of these major versions Apache Tomcat 9.x, 8.5.x, 8.0.x

Priority:

MediumMedium

Reporter:

Luca Pasquali

In brief:
ATM for diskquota database backend you can only have JNDI working if you previously configure such postgres connection with the default jdbc connection pooling in geoserver.

Demonstration

As in this image when I try to configure diskquota on a brand new clean install of geoserver 2.17.3 with and empty datadir, all looks like to work when hitting save but actually it does not.

I get this misleading error in the logs:

23 Oct 20:59:30 ERROR [geoserver.gwc] - Failed to load geowebcache-diskquota-jdbc.xml
org.geowebcache.config.ConfigurationException: No JDBC driver provided

If I re-open the diskquota a strange, uncomplete connection pool menu (no jndi!) opens up:

I tested to change the correct database password with a wrong one in the jndi config of context.xml and I get the expected error if I try to save, demonstrating the jdbc error above is not trustable as jdbc does his job and connects with a wrong password; I used always the jdbc driver in the geoserver war (no jdbc driver was present anywhere but the said one while reproducing, as the one inside the war should suffice):

If I configure the database for diskquota as native geoserver’s connection pooling, everthing is ok.
Oddly, this latter phrase was also the fix: configuring JNDI again at this pont made it work.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100149-sha1:4f621fb)

Atlassian logo