Re: jdbc problem - Mailing list pgsql-jdbc

From Pawel Cesar Sanjuan Szklarz
Subject Re: jdbc problem
Date
Msg-id 12a2110c0709030548y13e58c38pfa3f2f8ed30f46f0@mail.gmail.com
Whole thread Raw
In response to Re: jdbc problem  ("Pawel Cesar Sanjuan Szklarz" <paweld2@gmail.com>)
List pgsql-jdbc
Hi.

I migrate to postgres 7.4.17 and it is working. No idea that is the problem.

Thanks for all.

Pawel Szklarz.

2007/8/27, Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com>:
> Hi.
>
> Thanks for the reply. I turn on loglevel 2 and this is the log:
>
> 12:32:35,191 INFO  [STDOUT] 12:32:35.191 (1) PostgreSQL 8.2 JDBC3 with
> SSL (build 506)
> 12:32:35,199 INFO  [STDOUT] 12:32:35.198 (1) Trying to establish a
> protocol version 3 connection to 192.168.1.13:5432
> 12:32:35,211 INFO  [STDOUT] 12:32:35.211 (1)  FE=>
> StartupPacket(user=postgres, database=gwind, client_encoding=UNICODE,
> DateStyle=ISO)
> 12:32:35,213 INFO  [STDOUT] 12:32:35.213 (1)  <=BE AuthenticationOk
> 12:32:35,543 INFO  [STDOUT] 12:32:35.543 (1)  <=BE
> ParameterStatus(client_encoding = UNICODE)
> 12:32:35,543 INFO  [STDOUT] 12:32:35.543 (1)  <=BE
> ParameterStatus(DateStyle = ISO, MDY)
> 12:32:35,543 INFO  [STDOUT] 12:32:35.543 (1)  <=BE
> ParameterStatus(is_superuser = on)
> 12:32:35,543 INFO  [STDOUT] 12:32:35.543 (1)  <=BE
> ParameterStatus(server_version = 7.4.11)
> 12:32:35,553 INFO  [STDOUT] 12:32:35.544 (1)  <=BE
> ParameterStatus(session_authorization = postgres)
> 12:32:35,555 INFO  [STDOUT] 12:32:35.555 (1)  <=BE
> BackendKeyData(pid=23825,ckey=1248523452)
> 12:32:35,556 INFO  [STDOUT] 12:32:35.556 (1)  <=BE ReadyForQuery(I)
> 12:32:35,556 INFO  [STDOUT] 12:32:35.556 (1)     compatible = 8.2
> 12:32:35,556 INFO  [STDOUT] 12:32:35.556 (1)     loglevel = 2
> 12:32:35,556 INFO  [STDOUT] 12:32:35.556 (1)     prepare threshold = 5
> 12:32:35,601 INFO  [STDOUT] 12:32:35.601 (1)  FE=> Terminate
> 12:32:35,639 INFO  [STDOUT] 12:32:35.639 (2) PostgreSQL 8.2 JDBC3 with
> SSL (build 506)
> 12:32:35,639 INFO  [STDOUT] 12:32:35.639 (2) Trying to establish a
> protocol version 3 connection to 192.168.1.13:5432
> 12:32:35,640 INFO  [STDOUT] 12:32:35.640 (2)  FE=>
> StartupPacket(user=postgres, database=gwind, client_encoding=UNICODE,
> DateStyle=ISO)
> 12:32:35,644 INFO  [STDOUT] 12:32:35.644 (2)  <=BE AuthenticationOk
> 12:32:35,644 INFO  [STDOUT] 12:32:35.644 (2)  <=BE
> ParameterStatus(client_encoding = UNICODE)
> 12:32:35,644 INFO  [STDOUT] 12:32:35.644 (2)  <=BE
> ParameterStatus(DateStyle = ISO, MDY)
> 12:32:35,644 INFO  [STDOUT] 12:32:35.644 (2)  <=BE
> ParameterStatus(is_superuser = on)
> 12:32:35,644 INFO  [STDOUT] 12:32:35.644 (2)  <=BE
> ParameterStatus(server_version = 7.4.11)
> 12:32:35,645 INFO  [STDOUT] 12:32:35.645 (2)  <=BE
> ParameterStatus(session_authorization = postgres)
> 12:32:35,645 INFO  [STDOUT] 12:32:35.645 (2)  <=BE
> BackendKeyData(pid=23826,ckey=737417993)
> 12:32:35,645 INFO  [STDOUT] 12:32:35.645 (2)  <=BE ReadyForQuery(I)
> 12:32:35,645 INFO  [STDOUT] 12:32:35.645 (2)     compatible = 8.2
> 12:32:35,645 INFO  [STDOUT] 12:32:35.645 (2)     loglevel = 2
> 12:32:35,645 INFO  [STDOUT] 12:32:35.645 (2)     prepare threshold = 5
> 12:32:35,848 INFO  [STDOUT] 12:32:35.848 (2) simple execute,
> handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@13cf887,
> maxRows=0, fetchSize=0, flags=1
> 12:32:35,850 INFO  [STDOUT] 12:32:35.850 (2)  FE=>
> Parse(stmt=S_1,query="BEGIN",oids={})
> 12:32:35,850 INFO  [STDOUT] 12:32:35.850 (2)  FE=> Bind(stmt=S_1,portal=null)
> 12:32:35,850 INFO  [STDOUT] 12:32:35.850 (2)  FE=> Execute(portal=null,limit=0)
> 12:32:35,851 INFO  [STDOUT] 12:32:35.851 (2)  FE=>
> Parse(stmt=null,query="              create temp table sms_temp ( like
> sms excluding defaults ) on commit drop",oids={})
> 12:32:35,851 INFO  [STDOUT] 12:32:35.851 (2)  FE=> Bind(stmt=null,portal=null)
> 12:32:35,851 INFO  [STDOUT] 12:32:35.851 (2)  FE=> Describe(portal=null)
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=> Execute(portal=null,limit=0)
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=>
> Parse(stmt=null,query="              insert into sms_temp select *
>       from sms S              where
> S.sms_status_id = 1                     and S.not_before_time <= now()
>                  and ( S.processing_time is null or (S.processing_time
> < (now() - INTERVAL '1 hour')) )                       ",oids={})
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=> Bind(stmt=null,portal=null)
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=> Describe(portal=null)
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=> Execute(portal=null,limit=0)
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=>
> Parse(stmt=null,query="              create index sms_temp_idx on
> sms_temp( sms_id )",oids={})
> 12:32:35,852 INFO  [STDOUT] 12:32:35.852 (2)  FE=> Bind(stmt=null,portal=null)
> 12:32:35,853 INFO  [STDOUT] 12:32:35.852 (2)  FE=> Describe(portal=null)
> 12:32:35,853 INFO  [STDOUT] 12:32:35.853 (2)  FE=> Execute(portal=null,limit=0)
> 12:32:35,853 INFO  [STDOUT] 12:32:35.853 (2)  FE=> Sync
> 12:32:35,854 INFO  [STDOUT] 12:32:35.854 (2)  <=BE ParseComplete [S_1]
> 12:32:35,854 INFO  [STDOUT] 12:32:35.854 (2)  <=BE BindComplete [null]
> 12:32:35,854 INFO  [STDOUT] 12:32:35.854 (2)  <=BE CommandStatus(BEGIN)
> 12:32:35,873 INFO  [STDOUT] 12:32:35.873 (2)  <=BE ErrorMessage(ERROR:
> syntax error at end of input
>   Pozycja: 10)
> 12:32:35,874 INFO  [STDOUT] org.postgresql.util.PSQLException: ERROR:
> syntax error at end of input
>   Pozycja: 10
> 12:32:35,901 INFO  [STDOUT]     at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
> 12:32:35,901 INFO  [STDOUT]     at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
> 12:32:35,901 INFO  [STDOUT]     at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
> 12:32:35,901 INFO  [STDOUT]     at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
> 12:32:35,901 INFO  [STDOUT]     at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
> 12:32:35,901 INFO  [STDOUT]     at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:344)
> 12:32:35,901 INFO  [STDOUT]     at
> org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
> 12:32:35,901 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:78)
> 12:32:35,901 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200)
> 12:32:35,902 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
> 12:32:35,902 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:504)
> 12:32:35,902 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:90)
> 12:32:35,902 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate$10.doInSqlMapClient(SqlMapClientTemplate.java:383)
> 12:32:35,902 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:193)
> 12:32:35,902 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:381)
> 12:32:35,902 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:375)
> 12:32:35,902 INFO  [STDOUT]     at
> pl.com.cc.gwindws.dao.ibatis.IbatisSmsDao.makeTempPendingSmsList(IbatisSmsDao.java:19)
> 12:32:35,902 INFO  [STDOUT]     at
> pl.com.cc.gwindws.service.impl.SmsServiceImpl.claimSmsBatch(SmsServiceImpl.java:109)
> 12:32:35,902 INFO  [STDOUT]     at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 12:32:35,902 INFO  [STDOUT]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 12:32:35,903 INFO  [STDOUT]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 12:32:35,903 INFO  [STDOUT]     at
> java.lang.reflect.Method.invoke(Method.java:585)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
> 12:32:35,903 INFO  [STDOUT]     at $Proxy62.claimSmsBatch(Unknown Source)
> 12:32:35,903 INFO  [STDOUT]     at
> pl.com.cc.gwindws.job.SendSmsJob.executeInternal(SendSmsJob.java:33)
> 12:32:35,903 INFO  [STDOUT]     at
> org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
> 12:32:35,904 INFO  [STDOUT]     at
> org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> 12:32:35,904 INFO  [STDOUT]     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 12:32:35,904 INFO  [STDOUT]     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 12:32:35,904 INFO  [STDOUT]     at java.lang.Thread.run(Thread.java:595)
> 12:32:35,904 INFO  [STDOUT] SQLException: SQLState(42601)
> 12:32:35,904 INFO  [STDOUT] 12:32:35.904 (2)  <=BE ReadyForQuery(E)
> 12:32:35,905 INFO  [STDOUT] SQLException: SQLState(42601) vendor code(0)
> 12:32:35,905 INFO  [STDOUT]
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in pl/com/cc/gwindws/dao/ibatis/map/Sms.xml.
> --- The error occurred while applying a parameter map.
> --- Check the makeTempPendingSmsList-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: org.postgresql.util.PSQLException: ERROR: syntax error at
> end of input
>   Pozycja: 10
> 12:32:35,905 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
> 12:32:35,905 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:504)
> 12:32:35,906 INFO  [STDOUT]     at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:90)
> 12:32:35,947 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate$10.doInSqlMapClient(SqlMapClientTemplate.java:383)
> 12:32:35,947 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:193)
> 12:32:35,947 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:381)
> 12:32:35,947 INFO  [STDOUT]     at
> org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:375)
> 12:32:35,948 INFO  [STDOUT]     at
> pl.com.cc.gwindws.dao.ibatis.IbatisSmsDao.makeTempPendingSmsList(IbatisSmsDao.java:19)
> 12:32:35,948 INFO  [STDOUT]     at
> pl.com.cc.gwindws.service.impl.SmsServiceImpl.claimSmsBatch(SmsServiceImpl.java:109)
> 12:32:35,948 INFO  [STDOUT]     at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 12:32:35,948 INFO  [STDOUT]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 12:32:35,948 INFO  [STDOUT]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 12:32:35,948 INFO  [STDOUT]     at
> java.lang.reflect.Method.invoke(Method.java:585)
> 12:32:35,948 INFO  [STDOUT]     at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
> 12:32:35,948 INFO  [STDOUT]     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
> 12:32:35,948 INFO  [STDOUT]     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
> 12:32:35,948 INFO  [STDOUT]     at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
> 12:32:35,948 INFO  [STDOUT]     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
> 12:32:35,949 INFO  [STDOUT]     at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
> 12:32:35,949 INFO  [STDOUT]     at $Proxy62.claimSmsBatch(Unknown Source)
> 12:32:35,949 INFO  [STDOUT]     at
> pl.com.cc.gwindws.job.SendSmsJob.executeInternal(SendSmsJob.java:33)
> 12:32:35,949 INFO  [STDOUT]     at
> org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
> 12:32:35,949 INFO  [STDOUT]     at
> org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> 12:32:35,949 INFO  [STDOUT]     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 12:32:35,949 INFO  [STDOUT]     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 12:32:35,949 INFO  [STDOUT]     at java.lang.Thread.run(Thread.java:595)
>
> 2007/8/27, Kris Jurka <books@ejurka.com>:
> >
> >
> > On Wed, 22 Aug 2007, PaweÅ~B Cesar Sanjuan Szklarz wrote:
> >
> > > I use ibatis and jdbc do connect to postgres. When I use a 8.2 database,
> > > then all works ok, but for 7.4 databases I get this error:
> > >
> > > Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at end
> > > of input
> > >
> > > I really try to :
> > > ----- Change the JDBC jar file for postgres 7.4 and 8.2
> > > ----- use additional options on the url connection
> > >
> > > My database is in LATIN2.
> > >
> > >
> >
> > It's not really clear what's going on here.  Please use the 8.2 driver and
> > add "?loglevel=2" to your JDBC url to produce additional logging
> > information on the JDBC side and send that here.
> >
> > Kris Jurka
> >
>

pgsql-jdbc by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: Data Migration
Next
From: Chris Baty
Date:
Subject: password hat4me2