Skip site navigation (1) Skip section navigation (2)

JDBC DatabaseMetaData problem

From: BCH)姜亦敏 <jiangyimin(at)basechina(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: JDBC DatabaseMetaData problem
Date: 2012-04-06 08:05:54
Message-ID: BFD6CE0C5E7B45EAB6B29DCE6D47F096@jiangym (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hello,
I have the following problem working with DatabaseMetaData. There is a
database with table and the attribute of 'cont'  is  character. Database 
cluster was
initialized with appropriate ru_RU.KOI8-R locale. All the databases were
created with utf-8 encoding.

I use PostgreSQL-8.2compiled from source, JDBC driver from
 on Linux, J2SDK 1.4.2_12.

update scheduleconttbl set cont ='\xf0\x9f\x99\x8f'
where logindaytime = '20120406142138813';



      [28/03/2012 13:55:39:906 +0900] 2012-03-28 13:55:39,905 
[com.fujitsu.fasol.intrapartner.common.action.BaseAction]-[ERROR] システムエラーが発生しました:
      org.postgresql.util.PSQLException: Invalid character data was found. 
This is most likely caused by stored data containing characters that are 
invalid for the character set the database was created in.  The most common 
example of this is storing 8bit data in a SQL_ASCII database.
     at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:299)
     at org.postgresql.core.Encoding.decode(Encoding.java:186)
     at org.postgresql.core.Encoding.decode(Encoding.java:206)
     at 
org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:222)
     at 
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getObject(AbstractJdbc2ResultSet.java:133)
     at com.fujitsu.fasol.intrapartner.common.IntranetResultSet.init(Unknown 
Source)
     at 
com.fujitsu.fasol.intrapartner.common.IntranetResultSet.<init>(Unknown 
Source)
     at 
com.fujitsu.fasol.intrapartner.user.schedule.dao.YoteiDao.yoteiSelectP50SQL6(Unknown 
Source)
     at 
com.fujitsu.fasol.intrapartner.user.schedule.action.Yotei50InitAction.getResultBean(Unknown 
Source)
     at 
com.fujitsu.fasol.intrapartner.user.schedule.action.Yotei50InitAction.process(Unknown 
Source)
     at 
com.fujitsu.fasol.intrapartner.common.action.BaseAction.execute(Unknown 
Source)
     at 
com.fujitsu.fasol.intrapartner.common.IntranetRequestProcessor.processActionPerform(Unknown 
Source)
     at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
     at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
     at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:599)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:267)
     at 
com.fujitsu.fasol.intrapartner.common.SetCharacterEncodingFilter.doFilter(Unknown 
Source)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:389)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:267)
     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:418)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:292)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2539)
     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:255)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardHost.invoke(StandardHost.java:1002)
     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:180)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at 
org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:336)
     at 
org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:161)
     at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:648)
     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:447)
     at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:917)
     at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
     atjava.lang.Thread.run(Thread.java:534)



 I will appreciate any help with this.

Thank you.


Sincerely yours,

Jiang

Responses

pgsql-jdbc by date

Next:From: Muhammad AltafDate: 2012-04-06 11:14:01
Subject: Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java
Previous:From: Kevin GrittnerDate: 2012-04-05 17:57:40
Subject: Re: Locking

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group