postgresql - The server's DateStyle parameter was changed to ISO. The JDBC driver requires DateStyle to begin with ISO for correct operation - Database Administrators Stack Exchange
i use postgresql 9.6.6 on centos linux 7.4 , after upgrading postgresql-jdbc package -
# sudo yum update failed set locale, defaulting c loaded plugins: fastestmirror loading mirror speeds cached hostfile * base: mirror.fra10.de.leaseweb.net * epel: mirror.wiuwiu.de * extras: centosmirror.netcup.net * updates: mirror.wiuwiu.de resolving dependencies --> running transaction check ---> package java-1.8.0-openjdk.x86_64 1:1.8.0.151-5.b12.el7_4 updated ---> package java-1.8.0-openjdk.x86_64 1:1.8.0.161-0.b14.el7_4 update ---> package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.151-5.b12.el7_4 updated ---> package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.el7_4 update ---> package postgresql-jdbc.noarch 0:42.1.4-1.rhel7 updated ---> package postgresql-jdbc.noarch 0:42.2.0-1.rhel7 update ---> package postgresql-jdbc-javadoc.noarch 0:42.1.4-1.rhel7 updated ---> package postgresql-jdbc-javadoc.noarch 0:42.2.0-1.rhel7 update --> finished dependency resolution dependencies resolved ============================================================================================================================================================== package arch version repository size ============================================================================================================================================================== updating: java-1.8.0-openjdk x86_64 1:1.8.0.161-0.b14.el7_4 updates 243 k java-1.8.0-openjdk-headless x86_64 1:1.8.0.161-0.b14.el7_4 updates 32 m postgresql-jdbc noarch 42.2.0-1.rhel7 pgdg96 566 k postgresql-jdbc-javadoc noarch 42.2.0-1.rhel7 pgdg96 456 k transaction summary ============================================================================================================================================================== upgrade 4 packages total size: 33 m total download size: 32 m ok [y/d/n]: y downloading packages: delta rpms disabled because /usr/bin/applydeltarpm not installed. (1/2): java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64.rpm | 243 kb 00:00:00 (2/2): java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64.rpm | 32 mb 00:00:00 -------------------------------------------------------------------------------------------------------------------------------------------------------------- total 45 mb/s | 32 mb 00:00:00 running transaction check running transaction test transaction test succeeded running transaction updating : 1:java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64 1/8 warning: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security/java.security created /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security/java.security.rpmnew restored /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security/java.security.rpmnew /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security/java.security updating : 1:java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64 2/8 updating : postgresql-jdbc-42.2.0-1.rhel7.noarch 3/8 updating : postgresql-jdbc-javadoc-42.2.0-1.rhel7.noarch 4/8 cleanup : postgresql-jdbc-42.1.4-1.rhel7.noarch 5/8 cleanup : 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64 6/8 cleanup : postgresql-jdbc-javadoc-42.1.4-1.rhel7.noarch 7/8 cleanup : 1:java-1.8.0-openjdk-headless-1.8.0.151-5.b12.el7_4.x86_64 8/8 verifying : 1:java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64 1/8 verifying : postgresql-jdbc-42.2.0-1.rhel7.noarch 2/8 verifying : 1:java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64 3/8 verifying : postgresql-jdbc-javadoc-42.2.0-1.rhel7.noarch 4/8 verifying : 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64 5/8 verifying : postgresql-jdbc-javadoc-42.1.4-1.rhel7.noarch 6/8 verifying : postgresql-jdbc-42.1.4-1.rhel7.noarch 7/8 verifying : 1:java-1.8.0-openjdk-headless-1.8.0.151-5.b12.el7_4.x86_64 8/8 updated: java-1.8.0-openjdk.x86_64 1:1.8.0.161-0.b14.el7_4 java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.el7_4 postgresql-jdbc.noarch 0:42.2.0-1.rhel7 postgresql-jdbc-javadoc.noarch 0:42.2.0-1.rhel7 complete!
i getting exception in working java code (running war in jetty 9.4.7) right @ connection -
string sql_merge_users = "select words_merge_users(?::jsonb, ?::inet, ?::text, ?::text, ?::text)"; // next line in mylistener.java throws exception try (connection db = drivermanager.getconnection(database_url, database_user, database_pass); preparedstatement st = db.preparestatement(sql_merge_users)) { st.setstring(1, users); st.setstring(2, ip); st.setstring(3, fcm); st.setstring(4, apns); st.setstring(5, adm); resultset rs = st.executequery();
here exception copied jetty log (i use pgbouncer @ port 6432) -
warning: sqlexception occurred while connecting 127.0.0.1:6432 org.postgresql.util.psqlexception: server's datestyle parameter changed iso. jdbc driver requires datestyle begin iso correct operation. @ org.postgresql.core.v3.queryexecutorimpl.receiveparameterstatus(queryexecutorimpl.java:2603) @ org.postgresql.core.v3.queryexecutorimpl.readstartupmessages(queryexecutorimpl.java:2569) @ org.postgresql.core.v3.queryexecutorimpl.<init>(queryexecutorimpl.java:131) @ org.postgresql.core.v3.connectionfactoryimpl.openconnectionimpl(connectionfactoryimpl.java:212) @ org.postgresql.core.connectionfactory.openconnection(connectionfactory.java:49) @ org.postgresql.jdbc.pgconnection.<init>(pgconnection.java:195) @ org.postgresql.driver.makeconnection(driver.java:452) @ org.postgresql.driver.connect(driver.java:254) @ java.sql.drivermanager.getconnection(drivermanager.java:664) @ java.sql.drivermanager.getconnection(drivermanager.java:247) @ de.slova.websockets.mylistener.mergeusers(mylistener.java:152) @ de.slova.websockets.mylistener.handlelogin(mylistener.java:208) @ de.slova.websockets.mylistener.onwebsockettext(mylistener.java:83) @ org.eclipse.jetty.websocket.common.events.jettylistenereventdriver.ontextmessage(jettylistenereventdriver.java:189) @ org.eclipse.jetty.websocket.common.message.simpletextmessage.messagecomplete(simpletextmessage.java:69) @ org.eclipse.jetty.websocket.common.events.abstracteventdriver.appendmessage(abstracteventdriver.java:66) @ org.eclipse.jetty.websocket.common.events.jettylistenereventdriver.ontextframe(jettylistenereventdriver.java:158) @ org.eclipse.jetty.websocket.common.events.abstracteventdriver.incomingframe(abstracteventdriver.java:162) @ org.eclipse.jetty.websocket.common.websocketsession.incomingframe(websocketsession.java:375) @ org.eclipse.jetty.websocket.common.extensions.abstractextension.nextincomingframe(abstractextension.java:182) @ org.eclipse.jetty.websocket.common.extensions.compress.permessagedeflateextension.nextincomingframe(permessagedeflateextension.java:105) @ org.eclipse.jetty.websocket.common.extensions.compress.compressextension.forwardincoming(compressextension.java:142) @ org.eclipse.jetty.websocket.common.extensions.compress.permessagedeflateextension.incomingframe(permessagedeflateextension.java:85) @ org.eclipse.jetty.websocket.common.extensions.extensionstack.incomingframe(extensionstack.java:220) @ org.eclipse.jetty.websocket.common.parser.notifyframe(parser.java:220) @ org.eclipse.jetty.websocket.common.parser.parse(parser.java:256) @ org.eclipse.jetty.websocket.common.io.abstractwebsocketconnection.readparse(abstractwebsocketconnection.java:679) @ org.eclipse.jetty.websocket.common.io.abstractwebsocketconnection.onfillable(abstractwebsocketconnection.java:511) @ org.eclipse.jetty.io.abstractconnection$readcallback.succeeded(abstractconnection.java:279) @ org.eclipse.jetty.io.fillinterest.fillable(fillinterest.java:110) @ org.eclipse.jetty.io.channelendpoint$2.run(channelendpoint.java:124) @ org.eclipse.jetty.util.thread.invocable.invokepreferred(invocable.java:128) @ org.eclipse.jetty.util.thread.invocable$invocableexecutor.invoke(invocable.java:222) @ org.eclipse.jetty.util.thread.strategy.eatwhatyoukill.doproduce(eatwhatyoukill.java:294) @ org.eclipse.jetty.util.thread.strategy.eatwhatyoukill.run(eatwhatyoukill.java:199) @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:673) @ org.eclipse.jetty.util.thread.queuedthreadpool$2.run(queuedthreadpool.java:591) @ java.lang.thread.run(thread.java:745)
i have searched datestyle , there not information found in regard error.
from error text not sure change - should modify java program or should change setting on linux server?
udpate:
i have submitted bug issue #1080
Comments
Post a Comment