dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27503
Re: Postgresql error at startup (2.14 stable)
Hi Jason,
yes you are right and we should have informed better about this. Postgres
jdbc drivers now comes in two versions. jdbc4 is intended for jvm 1.6,
while jdbc41 is intended for jvm 1.7 and 1.8.
http://jdbc.postgresql.org/download.html
So if you are still using jvm 1.6 you can
- download the jdbc93-1100 jar from the above link and replace the
postgresql-9.3-1100-jdbc41.jar driver jar inside the DHIS WAR file
(WEB-INF/lib), or
- if you build yourself you can apply this patch to the root pom.xml
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>9.3-1100-jdbc41</version>
+ <version>9.3-1100-jdbc4</version>
</dependency>
- or upgrade to jvm 1.7 which is recommended anyway (I know there might be
reasons not to do it).
Lars
On Mon, Jan 13, 2014 at 8:17 AM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:
> Grabbed a copy of the latest 2.14 stable from the downloads.
>
> Running Postgresql 9.3 on Linux and got this error. This would seem to
> imply looking here<http://stackoverflow.com/questions/16019586/unsupported-major-minor-version-51-0-unable-to-load-class-org-postgresql-driver> we
> need JDK 7 now?
>
> Regards,
> Jason
>
>
>
> Jan 13, 2014 2:12:06 AM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /home/dhis/tomcat/webapps/dhis.war
> * INFO 2014-01-13 02:12:15,252 System property dhis2.home not set
> (DefaultLocationManager.java [pool-2-thread-1])
> * INFO 2014-01-13 02:12:15,256 Environment variable DHIS2_HOME points to
> /home/dhis/dhis_home (DefaultLocationManager.java [pool-2-thread-1])
> * INFO 2014-01-13 02:12:17,527 Hibernate configuration loaded, using
> dialect: org.hibernate.dialect.PostgreSQLDialect
> (DefaultHibernateConfigurationProvider.java [pool-2-thread-1])
> Exception in thread
> "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1"
> java.lang.UnsupportedClassVersionError: org/postgresql/Driver : Unsupported
> major.minor version 51.0 (unable to load class org.postgresql.Driver)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2840)
> at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1668)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:190)
> at
> com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)
> at
> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)
> at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
> at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
> at
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
> at
> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
> at
> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
> at
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
> at
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
> Exception in thread
> "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2"
> java.lang.UnsupportedClassVersionError: org/postgresql/Driver : Unsupported
> major.minor version 51.0 (unable to load class org.postgresql.Driver)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2840)
> at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1668)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:190)
> at
> com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)
> at
> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)
> at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
> at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
> at
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
> at
> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
> at
> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
> at
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
> at
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
> Exception in thread
> "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0"
> java.lang.UnsupportedClassVersionError: org/postgresql/Driver : Unsupported
> major.minor version 51.0 (unable to load class org.postgresql.Driver)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2840)
> at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1668)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:190)
> at
> com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)
> at
> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)
> at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
> at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
> at
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
> at
> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
> at
> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
> at
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
> at
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References