[Geoserver-users] Error loading jdbc driver

Andrea,

   Until now, no, so I did that. I do get a different error in the logs (so a step closer):

2014-06-13 15:20:52,501 ERROR [geotools.jdbc] - There's code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it
2014-06-13 15:20:52,502 ERROR [geotools.jdbc] - There's code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it
2014-06-13 15:20:52,502 ERROR [geotools.jdbc] - There's code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it

  thanks, Earl

---- Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Jun 12, 2014 at 11:41 PM, <ebarker111@anonymised.com> wrote:

> I'm starting to catch on with trying to configure PostGIS Database (JNDI)
> (from March, just getting back to it). I've installed Tomcat 8.0, deployed
> the GeoServer 2.5.1 War using the Apache Tomcat Manager web page.
>
> I've added to context.xml in C:\Program Files\Apache Software
> Foundation\Tomcat 8.0\conf
>
> <Resource name="jdbc/postgres" auth="Container"
> type="javax.sql.DataSource"
> url="jdbc:postgresql://127.0.0.1:5432/WxCasterData"
> driverClassName="org.postgresql.driver"
> username="geoserver" password="geosever"
> maxActive="20" maxIdle="3" maxWait="10000"
> poolPreparedStatements="true"
> maxOpenPreparedStatements="100" />
>
> in C:\Program Files\Apache Software Foundation\Tomcat
> 8.0\webapps\geoserver\WEB-INF I added to web.xml:
>
> <resource-ref>
> <description>Postgis Datasource</description>
> <res-ref-name>jdbc/postgres</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
>
> Attached screen capture are the entries in the actual adding the
> Postgis JNDI store interface. I get
> Caused by: java.sql.SQLException: Cannot load JDBC driver class
> 'org.postgresql.driver'
> at
> org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:2000)
> at
> org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1896)
> at
> org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
> at
> org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1764)
> ... 116 more
> Caused by: java.lang.ClassNotFoundException: org.postgresql.driver
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1333)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1180)
> at
> org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:1991)
> ... 119 more
> any ideas?
>

Did you add the postgres jdbc driver in the tomcat lib folder, and removed
it from GeoServer own WEB-INF/lib?

Ciao
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Fri, Jun 13, 2014 at 5:25 PM, <ebarker111@anonymised.com> wrote:

Andrea,

   Until now, no, so I did that. I do get a different error in the logs
(so a step closer):

2014-06-13 15:20:52,501 ERROR [geotools.jdbc] - There's code using JDBC
based datastore and not disposing them. This may lead to temporary loss of
database connections. Please make sure all data access code calls
DataStore.dispose() before freeing all references to it
2014-06-13 15:20:52,502 ERROR [geotools.jdbc] - There's code using JDBC
based datastore and not disposing them. This may lead to temporary loss of
database connections. Please make sure all data access code calls
DataStore.dispose() before freeing all references to it
2014-06-13 15:20:52,502 ERROR [geotools.jdbc] - There's code using JDBC
based datastore and not disposing them. This may lead to temporary loss of
database connections. Please make sure all data access code calls
DataStore.dispose() before freeing all references to it

Eh, not sure about these. Aren't you getting any other error or stack trace
before? These are normally by-products of some
other issue

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------