Thread: jdbc problem
View Single Post

   
  #1 (permalink)  
Old 04-16-2008, 12:52 AM
=?UTF-8?Q?Pawe=C5=82?= Cesar Sanjuan Szklarz
 
Posts: n/a
Default jdbc problem

Hi.

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:

15:42:46,936 INFO [STDOUT] 2007-08-22 15:42:46,932 B5A22F41 WARN
[org.springframework.ws.soap.server.SoapMessageDisp atcher] - Endpoint
invocation resulted in exception - responding with SOAP Fault
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation;
bad SQL grammar []; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
--- The error occurred in pl/com/cc/gwindws/dao/ibatis/map/PTP.xml.
--- The error occurred while applying a parameter map.
--- Check the checkLoanId-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: org.postgresql.util.PSQLException: ERROR: syntax error at end
of input
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at end
of input
Caused by:
com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
--- The error occurred in pl/com/cc/gwindws/dao/ibatis/map/PTP.xml.
--- The error occurred while applying a parameter map.
--- Check the checkLoanId-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: org.postgresql.util.PSQLException: ERROR: syntax error at end
of input
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at end
of input
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.executeQueryWithCallback(GeneralStatemen t.java:185)
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.executeQueryForObject(GeneralStatement.j ava:104)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelega te.queryForObject(SqlMapExecutorDelegate.java:565)



When i check the servers logs i see this:
LOG: connection received: host=192.168.1.16 port=52557
LOG: connection authorized: user=postgres database=gwind
LOG: connection received: host=192.168.1.16 port=43021
LOG: connection authorized: user=postgres database=gwind
LOG: statement: BEGIN
LOG: statement: create
ERROR: syntax error at end of input at character 10
LOG: statement: ROLLBACK
LOG: statement: create
ERROR: syntax error at end of input at character 10
LOG: statement: create
ERROR: syntax error at end of input at character 10
LOG: statement: create
......
this ERROR repeats every 3 seconds.



When i send a request to the servlet, i get this on the log:
LOG: statement: SET SESSI
ERROR: syntax error at end of input at character 10


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.


Thanks.

Pawel Cesar Sanjuan Szklarz.



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote