PostgreSQL – Postgres and C3P0 invalid time zone error during connection

The following error occurred when trying to connect a standalone Java application to Postgres:

org.postgresql.util.PSQLException: FATAL: parameter “TimeZone” Invalid value: “America / New_York”
at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java 572)

At com.mchange.v2.c3p0.DriveManagerDataSource.getConnection(DriveManagerDataSource.getConnection(DriveManagerDataSource) .java:164)

(Sorry, due to my settings, I have to enter it manually).

I am using Postgres 9.3.3 and PostGIS 2.1.1 extensions , Postgres 9.3-1100 jdbc driver and 0.2.6.3 c3p0 library.

I can get it on both Linux and Windows systems. When I change TZ to GMT on the Linux system, the connection is normal, But this is not a good solution.

Do you know what I can do to solve this problem?

Thank you,

Ken

Pavel Horal has Correct answer. Postgres installation messed up, only root users can access the /usr/local/pgsql_933/share/timezone/America directory. Once I did a chmod and the files in it, my problem disappeared.

The following error occurred when trying to connect a standalone Java application to Postgres:

org.postgresql.util.PSQLException: FATAL: The value of the parameter “TimeZone” is invalid: “America / New_York”
at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java 572)

In com.mchange.v2.c3p0.DriveManagerDataSource.getConnection(DriveManagerDataSource.java: 164)

(Sorry, due to my settings, I have to enter it manually).

I am using Postgres 9.3.3 and PostGIS 2.1.1 extensions, Postgres 9.3 -1100 jdbc driver and 0.2.6.3 c3p0 library.

I can get it on both Linux and Windows systems. When I change TZ to GMT on the Linux system, the connection is normal, but this is not A good solution.

Do you know what I can do to solve this problem?

Thank you,

Ken

Pavel Horal has the correct answer. Postgres installation messed up, only root Users can access the /usr/local/pgsql_933/share/timezone/America directory. Once I did a chmod and the files in it, my problem disappeared.

Leave a Comment

Your email address will not be published.