Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZO8FS-000668-LR for pgsql-jdbc@arkaria.postgresql.org; Sat, 08 Aug 2015 17:49:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZO8FR-0002JP-NE for pgsql-jdbc@arkaria.postgresql.org; Sat, 08 Aug 2015 17:49:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZO8FQ-0002G0-RH for pgsql-jdbc@postgresql.org; Sat, 08 Aug 2015 17:49:32 +0000 Received: from gateway.pangburngroup.com ([12.230.133.165] helo=mail.liquidcore.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZO8FK-0006kk-1z for pgsql-jdbc@postgresql.org; Sat, 08 Aug 2015 17:49:30 +0000 Received: (from root@localhost) by mail.liquidcore.com (8.14.4/8.14.4) id t78HnK0W023699; Sat, 8 Aug 2015 12:49:20 -0500 Received: from [192.168.0.234] (ppasalalinux.nqadmin.com [192.168.0.234]) by mail.nqadmin.com with SMTP id uepcn693hgztsfbp23pp4dt6zi; Sat, 08 Aug 2015 12:49:20 -0500 (CDT) (envelope-from dbadmin@nqadmin.com) Message-ID: <55C64120.6020705@nqadmin.com> Date: Sat, 08 Aug 2015 12:49:20 -0500 From: Prasanth Reddy Reply-To: dbadmin@nqadmin.com, dbadmin@nqadmin.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org, Vladimir Sitnikov , dmp Subject: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 References: <55C4DF1F.2060808@nqadmin.com> <55C584A6.1040600@nqadmin.com> In-Reply-To: <55C584A6.1040600@nqadmin.com> Content-Type: multipart/alternative; boundary="------------010802040707010207000204" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------010802040707010207000204 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, Below is the information I got when log level is set to 2. I removed the server name in the second line below. Thanks, Prasanth 12:42:02.356 (1) PostgreSQL 9.4 JDBC4 (build 1201) 12:42:02.377 (1) Trying to establish a protocol version 3 connection to xxxx.xxxxx.com:5432 12:42:02.451 (1) Receive Buffer Size is 43690 12:42:02.451 (1) Send Buffer Size is 9660 12:42:02.452 (1) FE=> StartupPacket(user=postgres, database=db_server, client_encoding=UTF8, DateStyle=ISO, TimeZone=US/Central, extra_float_digits=2) 12:42:02.458 (1) <=BE AuthenticationReqPassword 12:42:02.458 (1) FE=> Password(password=) 12:42:02.492 (1) <=BE AuthenticationOk 12:42:02.505 (1) <=BE ParameterStatus(application_name = ) 12:42:02.505 (1) <=BE ParameterStatus(client_encoding = UTF8) 12:42:02.505 (1) <=BE ParameterStatus(DateStyle = ISO, MDY) 12:42:02.505 (1) <=BE ParameterStatus(integer_datetimes = on) 12:42:02.506 (1) <=BE ParameterStatus(IntervalStyle = postgres) 12:42:02.506 (1) <=BE ParameterStatus(is_superuser = on) 12:42:02.506 (1) <=BE ParameterStatus(server_encoding = SQL_ASCII) 12:42:02.506 (1) <=BE ParameterStatus(server_version = 9.4.4) 12:42:02.506 (1) <=BE ParameterStatus(session_authorization = postgres) 12:42:02.506 (1) <=BE ParameterStatus(standard_conforming_strings = on) 12:42:02.506 (1) <=BE ParameterStatus(TimeZone = US/Central) 12:42:02.506 (1) <=BE BackendKeyData(pid=11101,ckey=124372759) 12:42:02.506 (1) <=BE ReadyForQuery(I) 12:42:02.510 (1) simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@106e68e, maxRows=0, fetchSize=0, flags=23 12:42:02.510 (1) FE=> Parse(stmt=null,query="SET extra_float_digits = 3",oids={}) 12:42:02.525 (1) FE=> Bind(stmt=null,portal=null) 12:42:02.525 (1) FE=> Execute(portal=null,limit=1) 12:42:02.525 (1) FE=> Sync 12:42:02.575 (1) <=BE ParseComplete [null] 12:42:02.575 (1) <=BE BindComplete [null] 12:42:02.575 (1) <=BE CommandStatus(SET) 12:42:02.575 (1) <=BE ReadyForQuery(I) 12:42:02.576 (1) compatible = 90400 12:42:02.576 (1) loglevel = 2 12:42:02.576 (1) prepare threshold = 5 12:42:02.579 (1) types using binary send = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY 12:42:02.580 (1) types using binary receive = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,DATE,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY 12:42:02.580 (1) integer date/time = true getConnection returning org.postgresql.Driver 12:42:02.616 (1) simple execute, handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@1f38edc, maxRows=0, fetchSize=0, flags=17 12:42:02.617 (1) FE=> Parse(stmt=null,query="SELECT client_name, description, notes FROM client_data WHERE status_code = 0 ORDER BY client_name, description",oids={}) 12:42:02.617 (1) FE=> Bind(stmt=null,portal=null) 12:42:02.617 (1) FE=> Describe(portal=null) 12:42:02.617 (1) FE=> Execute(portal=null,limit=0) 12:42:02.617 (1) FE=> Sync 12:42:02.685 (1) <=BE ParseComplete [null] 12:42:02.685 (1) <=BE BindComplete [null] 12:42:02.686 (1) <=BE RowDescription(3) 12:42:02.686 (1) Field(,VARCHAR,65535,T) 12:42:02.686 (1) Field(,VARCHAR,65535,T) 12:42:02.686 (1) Field(,TEXT,65535,T) 12:42:02.686 (1) <=BE DataRow(len=76) 12:42:02.686 (1) <=BE DataRow(len=139) 12:42:02.686 (1) <=BE DataRow(len=47) 12:42:02.686 (1) <=BE DataRow(len=563) 12:42:02.686 (1) <=BE DataRow(len=707) 12:42:02.686 (1) <=BE DataRow(len=21) 12:42:02.687 (1) <=BE DataRow(len=141) 12:42:02.687 (1) <=BE DataRow(len=448) 12:42:02.687 (1) <=BE DataRow(len=107) 12:42:02.687 (1) <=BE DataRow(len=108) 12:42:02.687 (1) <=BE DataRow(len=15) 12:42:02.687 (1) <=BE DataRow(len=328) 12:42:02.687 (1) <=BE DataRow(len=443) 12:42:02.687 (1) <=BE DataRow(len=28) 12:42:02.687 (1) <=BE DataRow(len=31) 12:42:02.687 (1) <=BE DataRow(len=36) 12:42:02.687 (1) <=BE DataRow(len=983) 12:42:02.687 (1) <=BE DataRow(len=914) 12:42:02.687 (1) <=BE DataRow(len=127) 12:42:02.687 (1) <=BE DataRow(len=95) 12:42:02.687 (1) <=BE DataRow(len=34) 12:42:02.687 (1) <=BE DataRow(len=160) 12:42:02.687 (1) <=BE DataRow(len=90) 12:42:02.687 (1) <=BE DataRow(len=33) 12:42:02.687 (1) <=BE DataRow(len=18) 12:42:02.687 (1) <=BE DataRow(len=71) 12:42:02.687 (1) <=BE DataRow(len=68) 12:42:02.688 (1) <=BE DataRow(len=37) 12:42:02.688 (1) <=BE DataRow(len=47) 12:42:02.688 (1) <=BE DataRow(len=52) 12:42:02.688 (1) <=BE DataRow(len=1145) 12:42:02.688 (1) <=BE DataRow(len=159) 12:42:02.688 (1) <=BE DataRow(len=136) 12:42:02.688 (1) <=BE DataRow(len=49) 12:42:02.688 (1) <=BE DataRow(len=22) 12:42:02.688 (1) <=BE DataRow(len=37) 12:42:02.688 (1) <=BE DataRow(len=120) 12:42:02.688 (1) <=BE DataRow(len=1296) 12:42:02.688 (1) <=BE DataRow(len=132) 12:42:02.688 (1) <=BE DataRow(len=317) 12:42:02.688 (1) <=BE DataRow(len=64) 12:42:02.688 (1) <=BE DataRow(len=87) 12:42:02.688 (1) <=BE DataRow(len=44) 12:42:02.688 (1) <=BE DataRow(len=33) 12:42:02.688 (1) <=BE DataRow(len=49) 12:42:02.688 (1) <=BE DataRow(len=1028) 12:42:02.688 (1) <=BE DataRow(len=41) 12:42:02.688 (1) <=BE DataRow(len=181) 12:42:02.689 (1) <=BE DataRow(len=229) 12:42:02.689 (1) <=BE DataRow(len=26) 12:42:02.689 (1) <=BE DataRow(len=224) 12:42:02.689 (1) <=BE DataRow(len=31) 12:42:02.689 (1) <=BE DataRow(len=190) 12:42:02.689 (1) <=BE DataRow(len=148) 12:42:02.689 (1) <=BE DataRow(len=258) 12:42:02.689 (1) <=BE DataRow(len=202) 12:42:02.689 (1) <=BE DataRow(len=133) 12:42:02.689 (1) <=BE DataRow(len=331) 12:42:02.689 (1) <=BE DataRow(len=116) 12:42:02.689 (1) <=BE DataRow(len=811) 12:42:02.689 (1) <=BE DataRow(len=26) 12:42:02.689 (1) <=BE DataRow(len=262) 12:42:02.689 (1) <=BE DataRow(len=27) 12:42:02.689 (1) <=BE DataRow(len=59) 12:42:02.689 (1) <=BE DataRow(len=150) 12:42:02.689 (1) <=BE DataRow(len=45) 12:42:02.689 (1) <=BE DataRow(len=30) 12:42:02.689 (1) <=BE DataRow(len=643) 12:42:02.689 (1) <=BE DataRow(len=66) 12:42:02.689 (1) <=BE DataRow(len=433) 12:42:02.690 (1) <=BE DataRow(len=1093) 12:42:02.690 (1) <=BE DataRow(len=103) 12:42:02.690 (1) <=BE DataRow(len=193) 12:42:02.690 (1) <=BE DataRow(len=197) 12:42:02.690 (1) <=BE DataRow(len=465) 12:42:02.690 (1) <=BE DataRow(len=226) 12:42:02.690 (1) <=BE DataRow(len=44) 12:42:02.690 (1) <=BE DataRow(len=69) 12:42:02.690 (1) <=BE DataRow(len=46) 12:42:02.690 (1) <=BE DataRow(len=48) 12:42:02.691 (1) <=BE DataRow(len=55) 12:42:02.691 (1) <=BE DataRow(len=19) 12:42:02.691 (1) <=BE DataRow(len=55) 12:42:02.691 (1) <=BE DataRow(len=25) 12:42:02.691 (1) <=BE DataRow(len=31) 12:42:02.691 (1) <=BE DataRow(len=37) 12:42:02.691 (1) <=BE DataRow(len=29) 12:42:02.691 (1) <=BE DataRow(len=399) 12:42:02.692 (1) <=BE DataRow(len=36) 12:42:02.692 (1) <=BE DataRow(len=334) 12:42:02.692 (1) <=BE DataRow(len=36) 12:42:02.692 (1) <=BE DataRow(len=26) 12:42:02.692 (1) <=BE DataRow(len=116) 12:42:02.692 (1) <=BE DataRow(len=1136) 12:42:02.692 (1) <=BE DataRow(len=29) 12:42:02.692 (1) <=BE DataRow(len=103) 12:42:02.692 (1) <=BE DataRow(len=92) 12:42:02.692 (1) <=BE DataRow(len=25) 12:42:02.692 (1) <=BE DataRow(len=22) 12:42:02.692 (1) <=BE DataRow(len=30) 12:42:02.692 (1) <=BE DataRow(len=113) 12:42:02.692 (1) <=BE DataRow(len=162) 12:42:02.692 (1) <=BE DataRow(len=30) 12:42:02.693 (1) <=BE DataRow(len=454) 12:42:02.693 (1) <=BE DataRow(len=24) 12:42:02.693 (1) <=BE DataRow(len=27) 12:42:02.693 (1) <=BE DataRow(len=953) 12:42:02.693 (1) <=BE DataRow(len=30) 12:42:02.693 (1) <=BE DataRow(len=37) 12:42:02.693 (1) <=BE DataRow(len=52) 12:42:02.693 (1) <=BE DataRow(len=19) 12:42:02.693 (1) <=BE DataRow(len=320) 12:42:02.693 (1) <=BE DataRow(len=174) 12:42:02.693 (1) <=BE DataRow(len=46) 12:42:02.693 (1) <=BE DataRow(len=42) 12:42:02.693 (1) <=BE DataRow(len=56) 12:42:02.693 (1) <=BE DataRow(len=159) 12:42:02.693 (1) <=BE DataRow(len=195) 12:42:02.694 (1) <=BE DataRow(len=57) 12:42:02.694 (1) <=BE DataRow(len=120) 12:42:02.694 (1) <=BE DataRow(len=41) 12:42:02.694 (1) <=BE DataRow(len=437) 12:42:02.694 (1) <=BE DataRow(len=98) 12:42:02.694 (1) <=BE DataRow(len=452) 12:42:02.694 (1) <=BE DataRow(len=84) 12:42:02.694 (1) <=BE DataRow(len=168) 12:42:02.694 (1) <=BE DataRow(len=37) 12:42:02.694 (1) <=BE DataRow(len=24) 12:42:02.694 (1) <=BE DataRow(len=58) 12:42:02.694 (1) <=BE DataRow(len=132) 12:42:02.694 (1) <=BE DataRow(len=48) 12:42:02.694 (1) <=BE DataRow(len=55) 12:42:02.695 (1) <=BE DataRow(len=35) 12:42:02.695 (1) <=BE DataRow(len=26) 12:42:02.695 (1) <=BE DataRow(len=123) 12:42:02.695 (1) <=BE DataRow(len=22) 12:42:02.695 (1) <=BE DataRow(len=25) 12:42:02.695 (1) <=BE DataRow(len=28) 12:42:02.695 (1) <=BE DataRow(len=332) 12:42:02.697 (1) <=BE DataRow(len=25) 12:42:02.697 (1) <=BE DataRow(len=342) 12:42:02.697 (1) <=BE DataRow(len=70) 12:42:02.697 (1) <=BE DataRow(len=29) 12:42:02.697 (1) <=BE DataRow(len=112) 12:42:02.697 (1) <=BE DataRow(len=24) 12:42:02.697 (1) <=BE DataRow(len=151) 12:42:02.697 (1) <=BE DataRow(len=26) 12:42:02.697 (1) <=BE DataRow(len=955) 12:42:02.697 (1) <=BE DataRow(len=33) 12:42:02.697 (1) <=BE DataRow(len=71) 12:42:02.698 (1) <=BE DataRow(len=46) 12:42:02.698 (1) <=BE DataRow(len=400) 12:42:02.698 (1) <=BE DataRow(len=268) 12:42:02.698 (1) <=BE DataRow(len=26) 12:42:02.698 (1) <=BE DataRow(len=347) 12:42:02.698 (1) <=BE DataRow(len=23) 12:42:02.698 (1) <=BE DataRow(len=248) 12:42:02.698 (1) <=BE DataRow(len=39) 12:42:02.698 (1) <=BE DataRow(len=22) 12:42:02.698 (1) <=BE DataRow(len=146) 12:42:02.698 (1) <=BE DataRow(len=1169) 12:42:02.698 (1) <=BE DataRow(len=93) 12:42:02.698 (1) <=BE DataRow(len=434) 12:42:02.698 (1) <=BE DataRow(len=77) 12:42:02.699 (1) <=BE DataRow(len=701) 12:42:02.699 (1) <=BE DataRow(len=62) 12:42:02.699 (1) <=BE DataRow(len=28) 12:42:02.699 (1) <=BE DataRow(len=532) 12:42:02.699 (1) <=BE DataRow(len=76) 12:42:02.699 (1) <=BE DataRow(len=184) 12:42:02.699 (1) <=BE DataRow(len=31) 12:42:02.699 (1) <=BE DataRow(len=42) 12:42:02.699 (1) <=BE DataRow(len=297) 12:42:02.699 (1) <=BE DataRow(len=73) 12:42:02.699 (1) <=BE DataRow(len=129) 12:42:02.699 (1) <=BE DataRow(len=28) 12:42:02.699 (1) <=BE DataRow(len=87) 12:42:02.699 (1) <=BE DataRow(len=117) 12:42:02.699 (1) <=BE DataRow(len=105) 12:42:02.700 (1) <=BE DataRow(len=111) 12:42:02.702 (1) <=BE DataRow(len=31) 12:42:02.702 (1) <=BE DataRow(len=52) 12:42:02.702 (1) <=BE DataRow(len=26) 12:42:02.703 (1) <=BE ErrorMessage(ERROR: invalid byte sequence for encoding "UTF8": 0x92) org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x92 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:286) at com.nqadmin.jGAS.Test.getClientData(Test.java:44) at com.nqadmin.jGAS.Test.main(Test.java:26) SQLException: SQLState(22021) 12:42:02.707 (1) <=BE ReadyForQuery(I) On 08/07/2015 11:25 PM, Prasanth Reddy wrote: > From log file: > ERROR: invalid byte sequence for encoding "UTF8": 0x92 > STATEMENT: SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description > > Code that causes it: > String sql = "SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description"; > ResultSet rs = connection.createStatement().executeQuery(sql); > * > *How do I set the connection property? > * > ------------------------------------------------------------- > Can you share the query and parameters that reproduce the failure? > For instance, can you please set loglevel=2 connection property and > provide "FE=> Bind", "FE=> Describe", etc stdout messages that precede > "invalid byte sequence" error? > > Vladimir > > * > On 08/07/2015 11:38 AM, Prasanth Reddy wrote: >> Hi, >> >> I have recently migrated to 9.4.4 from 9.1. I did a dump and restore to migrate the database. When I try to connect using JDBC I am getting the following error, the database encoding is SQL_ASCII. >> Same error with postgresql-9.4-1201.jdbc4.jar & postgresql-9.1-902.jdbc4.jar. >> >> org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x92 >> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) >> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) >> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) >> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) >> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) >> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:305) >> at com.sun.rowset.JdbcRowSetImpl.execute(JdbcRowSetImpl.java:567) >> >> Command used to create the database >> /usr/local/pgsql/bin/createdb --encoding=SQL_ASCII --template=template0 db_server >> >> Thanks, >> Prasanth > --------------010802040707010207000204 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hi,

Below is the information I got when log level is set to 2. I removed the server name in the second line below.

Thanks,
Prasanth

12:42:02.356 (1) PostgreSQL 9.4 JDBC4 (build 1201)
12:42:02.377 (1) Trying to establish a protocol version 3 connection to xxxx.xxxxx.com:5432
12:42:02.451 (1) Receive Buffer Size is 43690
12:42:02.451 (1) Send Buffer Size is 9660
12:42:02.452 (1)  FE=> StartupPacket(user=postgres, database=db_server, client_encoding=UTF8, DateStyle=ISO, TimeZone=US/Central, extra_float_digits=2)
12:42:02.458 (1)  <=BE AuthenticationReqPassword
12:42:02.458 (1)  FE=> Password(password=<not shown>)
12:42:02.492 (1)  <=BE AuthenticationOk
12:42:02.505 (1)  <=BE ParameterStatus(application_name = )
12:42:02.505 (1)  <=BE ParameterStatus(client_encoding = UTF8)
12:42:02.505 (1)  <=BE ParameterStatus(DateStyle = ISO, MDY)
12:42:02.505 (1)  <=BE ParameterStatus(integer_datetimes = on)
12:42:02.506 (1)  <=BE ParameterStatus(IntervalStyle = postgres)
12:42:02.506 (1)  <=BE ParameterStatus(is_superuser = on)
12:42:02.506 (1)  <=BE ParameterStatus(server_encoding = SQL_ASCII)
12:42:02.506 (1)  <=BE ParameterStatus(server_version = 9.4.4)
12:42:02.506 (1)  <=BE ParameterStatus(session_authorization = postgres)
12:42:02.506 (1)  <=BE ParameterStatus(standard_conforming_strings = on)
12:42:02.506 (1)  <=BE ParameterStatus(TimeZone = US/Central)
12:42:02.506 (1)  <=BE BackendKeyData(pid=11101,ckey=124372759)
12:42:02.506 (1)  <=BE ReadyForQuery(I)
12:42:02.510 (1) simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@106e68e, maxRows=0, fetchSize=0, flags=23
12:42:02.510 (1)  FE=> Parse(stmt=null,query="SET extra_float_digits = 3",oids={})
12:42:02.525 (1)  FE=> Bind(stmt=null,portal=null)
12:42:02.525 (1)  FE=> Execute(portal=null,limit=1)
12:42:02.525 (1)  FE=> Sync
12:42:02.575 (1)  <=BE ParseComplete [null]
12:42:02.575 (1)  <=BE BindComplete [null]
12:42:02.575 (1)  <=BE CommandStatus(SET)
12:42:02.575 (1)  <=BE ReadyForQuery(I)
12:42:02.576 (1)     compatible = 90400
12:42:02.576 (1)     loglevel = 2
12:42:02.576 (1)     prepare threshold = 5
12:42:02.579 (1)     types using binary send = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
12:42:02.580 (1)     types using binary receive = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,DATE,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
12:42:02.580 (1)     integer date/time = true
getConnection returning org.postgresql.Driver
12:42:02.616 (1) simple execute, handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@1f38edc, maxRows=0, fetchSize=0, flags=17
12:42:02.617 (1)  FE=> Parse(stmt=null,query="SELECT client_name, description, notes FROM client_data WHERE status_code = 0 ORDER BY client_name, description",oids={})
12:42:02.617 (1)  FE=> Bind(stmt=null,portal=null)
12:42:02.617 (1)  FE=> Describe(portal=null)
12:42:02.617 (1)  FE=> Execute(portal=null,limit=0)
12:42:02.617 (1)  FE=> Sync
12:42:02.685 (1)  <=BE ParseComplete [null]
12:42:02.685 (1)  <=BE BindComplete [null]
12:42:02.686 (1)  <=BE RowDescription(3)
12:42:02.686 (1)         Field(,VARCHAR,65535,T)
12:42:02.686 (1)         Field(,VARCHAR,65535,T)
12:42:02.686 (1)         Field(,TEXT,65535,T)
12:42:02.686 (1)  <=BE DataRow(len=76)
12:42:02.686 (1)  <=BE DataRow(len=139)
12:42:02.686 (1)  <=BE DataRow(len=47)
12:42:02.686 (1)  <=BE DataRow(len=563)
12:42:02.686 (1)  <=BE DataRow(len=707)
12:42:02.686 (1)  <=BE DataRow(len=21)
12:42:02.687 (1)  <=BE DataRow(len=141)
12:42:02.687 (1)  <=BE DataRow(len=448)
12:42:02.687 (1)  <=BE DataRow(len=107)
12:42:02.687 (1)  <=BE DataRow(len=108)
12:42:02.687 (1)  <=BE DataRow(len=15)
12:42:02.687 (1)  <=BE DataRow(len=328)
12:42:02.687 (1)  <=BE DataRow(len=443)
12:42:02.687 (1)  <=BE DataRow(len=28)
12:42:02.687 (1)  <=BE DataRow(len=31)
12:42:02.687 (1)  <=BE DataRow(len=36)
12:42:02.687 (1)  <=BE DataRow(len=983)
12:42:02.687 (1)  <=BE DataRow(len=914)
12:42:02.687 (1)  <=BE DataRow(len=127)
12:42:02.687 (1)  <=BE DataRow(len=95)
12:42:02.687 (1)  <=BE DataRow(len=34)
12:42:02.687 (1)  <=BE DataRow(len=160)
12:42:02.687 (1)  <=BE DataRow(len=90)
12:42:02.687 (1)  <=BE DataRow(len=33)
12:42:02.687 (1)  <=BE DataRow(len=18)
12:42:02.687 (1)  <=BE DataRow(len=71)
12:42:02.687 (1)  <=BE DataRow(len=68)
12:42:02.688 (1)  <=BE DataRow(len=37)
12:42:02.688 (1)  <=BE DataRow(len=47)
12:42:02.688 (1)  <=BE DataRow(len=52)
12:42:02.688 (1)  <=BE DataRow(len=1145)
12:42:02.688 (1)  <=BE DataRow(len=159)
12:42:02.688 (1)  <=BE DataRow(len=136)
12:42:02.688 (1)  <=BE DataRow(len=49)
12:42:02.688 (1)  <=BE DataRow(len=22)
12:42:02.688 (1)  <=BE DataRow(len=37)
12:42:02.688 (1)  <=BE DataRow(len=120)
12:42:02.688 (1)  <=BE DataRow(len=1296)
12:42:02.688 (1)  <=BE DataRow(len=132)
12:42:02.688 (1)  <=BE DataRow(len=317)
12:42:02.688 (1)  <=BE DataRow(len=64)
12:42:02.688 (1)  <=BE DataRow(len=87)
12:42:02.688 (1)  <=BE DataRow(len=44)
12:42:02.688 (1)  <=BE DataRow(len=33)
12:42:02.688 (1)  <=BE DataRow(len=49)
12:42:02.688 (1)  <=BE DataRow(len=1028)
12:42:02.688 (1)  <=BE DataRow(len=41)
12:42:02.688 (1)  <=BE DataRow(len=181)
12:42:02.689 (1)  <=BE DataRow(len=229)
12:42:02.689 (1)  <=BE DataRow(len=26)
12:42:02.689 (1)  <=BE DataRow(len=224)
12:42:02.689 (1)  <=BE DataRow(len=31)
12:42:02.689 (1)  <=BE DataRow(len=190)
12:42:02.689 (1)  <=BE DataRow(len=148)
12:42:02.689 (1)  <=BE DataRow(len=258)
12:42:02.689 (1)  <=BE DataRow(len=202)
12:42:02.689 (1)  <=BE DataRow(len=133)
12:42:02.689 (1)  <=BE DataRow(len=331)
12:42:02.689 (1)  <=BE DataRow(len=116)
12:42:02.689 (1)  <=BE DataRow(len=811)
12:42:02.689 (1)  <=BE DataRow(len=26)
12:42:02.689 (1)  <=BE DataRow(len=262)
12:42:02.689 (1)  <=BE DataRow(len=27)
12:42:02.689 (1)  <=BE DataRow(len=59)
12:42:02.689 (1)  <=BE DataRow(len=150)
12:42:02.689 (1)  <=BE DataRow(len=45)
12:42:02.689 (1)  <=BE DataRow(len=30)
12:42:02.689 (1)  <=BE DataRow(len=643)
12:42:02.689 (1)  <=BE DataRow(len=66)
12:42:02.689 (1)  <=BE DataRow(len=433)
12:42:02.690 (1)  <=BE DataRow(len=1093)
12:42:02.690 (1)  <=BE DataRow(len=103)
12:42:02.690 (1)  <=BE DataRow(len=193)
12:42:02.690 (1)  <=BE DataRow(len=197)
12:42:02.690 (1)  <=BE DataRow(len=465)
12:42:02.690 (1)  <=BE DataRow(len=226)
12:42:02.690 (1)  <=BE DataRow(len=44)
12:42:02.690 (1)  <=BE DataRow(len=69)
12:42:02.690 (1)  <=BE DataRow(len=46)
12:42:02.690 (1)  <=BE DataRow(len=48)
12:42:02.691 (1)  <=BE DataRow(len=55)
12:42:02.691 (1)  <=BE DataRow(len=19)
12:42:02.691 (1)  <=BE DataRow(len=55)
12:42:02.691 (1)  <=BE DataRow(len=25)
12:42:02.691 (1)  <=BE DataRow(len=31)
12:42:02.691 (1)  <=BE DataRow(len=37)
12:42:02.691 (1)  <=BE DataRow(len=29)
12:42:02.691 (1)  <=BE DataRow(len=399)
12:42:02.692 (1)  <=BE DataRow(len=36)
12:42:02.692 (1)  <=BE DataRow(len=334)
12:42:02.692 (1)  <=BE DataRow(len=36)
12:42:02.692 (1)  <=BE DataRow(len=26)
12:42:02.692 (1)  <=BE DataRow(len=116)
12:42:02.692 (1)  <=BE DataRow(len=1136)
12:42:02.692 (1)  <=BE DataRow(len=29)
12:42:02.692 (1)  <=BE DataRow(len=103)
12:42:02.692 (1)  <=BE DataRow(len=92)
12:42:02.692 (1)  <=BE DataRow(len=25)
12:42:02.692 (1)  <=BE DataRow(len=22)
12:42:02.692 (1)  <=BE DataRow(len=30)
12:42:02.692 (1)  <=BE DataRow(len=113)
12:42:02.692 (1)  <=BE DataRow(len=162)
12:42:02.692 (1)  <=BE DataRow(len=30)
12:42:02.693 (1)  <=BE DataRow(len=454)
12:42:02.693 (1)  <=BE DataRow(len=24)
12:42:02.693 (1)  <=BE DataRow(len=27)
12:42:02.693 (1)  <=BE DataRow(len=953)
12:42:02.693 (1)  <=BE DataRow(len=30)
12:42:02.693 (1)  <=BE DataRow(len=37)
12:42:02.693 (1)  <=BE DataRow(len=52)
12:42:02.693 (1)  <=BE DataRow(len=19)
12:42:02.693 (1)  <=BE DataRow(len=320)
12:42:02.693 (1)  <=BE DataRow(len=174)
12:42:02.693 (1)  <=BE DataRow(len=46)
12:42:02.693 (1)  <=BE DataRow(len=42)
12:42:02.693 (1)  <=BE DataRow(len=56)
12:42:02.693 (1)  <=BE DataRow(len=159)
12:42:02.693 (1)  <=BE DataRow(len=195)
12:42:02.694 (1)  <=BE DataRow(len=57)
12:42:02.694 (1)  <=BE DataRow(len=120)
12:42:02.694 (1)  <=BE DataRow(len=41)
12:42:02.694 (1)  <=BE DataRow(len=437)
12:42:02.694 (1)  <=BE DataRow(len=98)
12:42:02.694 (1)  <=BE DataRow(len=452)
12:42:02.694 (1)  <=BE DataRow(len=84)
12:42:02.694 (1)  <=BE DataRow(len=168)
12:42:02.694 (1)  <=BE DataRow(len=37)
12:42:02.694 (1)  <=BE DataRow(len=24)
12:42:02.694 (1)  <=BE DataRow(len=58)
12:42:02.694 (1)  <=BE DataRow(len=132)
12:42:02.694 (1)  <=BE DataRow(len=48)
12:42:02.694 (1)  <=BE DataRow(len=55)
12:42:02.695 (1)  <=BE DataRow(len=35)
12:42:02.695 (1)  <=BE DataRow(len=26)
12:42:02.695 (1)  <=BE DataRow(len=123)
12:42:02.695 (1)  <=BE DataRow(len=22)
12:42:02.695 (1)  <=BE DataRow(len=25)
12:42:02.695 (1)  <=BE DataRow(len=28)
12:42:02.695 (1)  <=BE DataRow(len=332)
12:42:02.697 (1)  <=BE DataRow(len=25)
12:42:02.697 (1)  <=BE DataRow(len=342)
12:42:02.697 (1)  <=BE DataRow(len=70)
12:42:02.697 (1)  <=BE DataRow(len=29)
12:42:02.697 (1)  <=BE DataRow(len=112)
12:42:02.697 (1)  <=BE DataRow(len=24)
12:42:02.697 (1)  <=BE DataRow(len=151)
12:42:02.697 (1)  <=BE DataRow(len=26)
12:42:02.697 (1)  <=BE DataRow(len=955)
12:42:02.697 (1)  <=BE DataRow(len=33)
12:42:02.697 (1)  <=BE DataRow(len=71)
12:42:02.698 (1)  <=BE DataRow(len=46)
12:42:02.698 (1)  <=BE DataRow(len=400)
12:42:02.698 (1)  <=BE DataRow(len=268)
12:42:02.698 (1)  <=BE DataRow(len=26)
12:42:02.698 (1)  <=BE DataRow(len=347)
12:42:02.698 (1)  <=BE DataRow(len=23)
12:42:02.698 (1)  <=BE DataRow(len=248)
12:42:02.698 (1)  <=BE DataRow(len=39)
12:42:02.698 (1)  <=BE DataRow(len=22)
12:42:02.698 (1)  <=BE DataRow(len=146)
12:42:02.698 (1)  <=BE DataRow(len=1169)
12:42:02.698 (1)  <=BE DataRow(len=93)
12:42:02.698 (1)  <=BE DataRow(len=434)
12:42:02.698 (1)  <=BE DataRow(len=77)
12:42:02.699 (1)  <=BE DataRow(len=701)
12:42:02.699 (1)  <=BE DataRow(len=62)
12:42:02.699 (1)  <=BE DataRow(len=28)
12:42:02.699 (1)  <=BE DataRow(len=532)
12:42:02.699 (1)  <=BE DataRow(len=76)
12:42:02.699 (1)  <=BE DataRow(len=184)
12:42:02.699 (1)  <=BE DataRow(len=31)
12:42:02.699 (1)  <=BE DataRow(len=42)
12:42:02.699 (1)  <=BE DataRow(len=297)
12:42:02.699 (1)  <=BE DataRow(len=73)
12:42:02.699 (1)  <=BE DataRow(len=129)
12:42:02.699 (1)  <=BE DataRow(len=28)
12:42:02.699 (1)  <=BE DataRow(len=87)
12:42:02.699 (1)  <=BE DataRow(len=117)
12:42:02.699 (1)  <=BE DataRow(len=105)
12:42:02.700 (1)  <=BE DataRow(len=111)
12:42:02.702 (1)  <=BE DataRow(len=31)
12:42:02.702 (1)  <=BE DataRow(len=52)
12:42:02.702 (1)  <=BE DataRow(len=26)
12:42:02.703 (1)  <=BE ErrorMessage(ERROR: invalid byte sequence for encoding "UTF8": 0x92)
org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x92
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:286)
    at com.nqadmin.jGAS.Test.getClientData(Test.java:44)
    at com.nqadmin.jGAS.Test.main(Test.java:26)
SQLException: SQLState(22021)
12:42:02.707 (1)  <=BE ReadyForQuery(I)



On 08/07/2015 11:25 PM, Prasanth Reddy wrote:
From log file:
    ERROR:  invalid byte sequence for encoding "UTF8": 0x92
    STATEMENT:  SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description

Code that causes it:
        String sql = "SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description";
        ResultSet rs = connection.createStatement().executeQuery(sql);

How do I set the connection property?

-------------------------------------------------------------
Can you share the query and parameters that reproduce the failure?
For instance, can you please set loglevel=2 connection property and
provide "FE=> Bind", "FE=> Describe", etc stdout messages that precede
"invalid byte sequence" error?

Vladimir
   

On 08/07/2015 11:38 AM, Prasanth Reddy wrote:
Hi,

I have recently migrated to 9.4.4 from 9.1. I did a dump and restore to migrate the database. When I try to connect using JDBC I am getting the following error, the database encoding is SQL_ASCII.
Same error with postgresql-9.4-1201.jdbc4.jar & postgresql-9.1-902.jdbc4.jar.

org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x92
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:305)
    at com.sun.rowset.JdbcRowSetImpl.execute(JdbcRowSetImpl.java:567)

Command used to create the database
/usr/local/pgsql/bin/createdb --encoding=SQL_ASCII --template=template0 db_server

Thanks,
Prasanth


--------------010802040707010207000204--