File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC problem please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC problem please help" Watch "JDBC problem please help" New topic
Author

JDBC problem please help

Tanwa Tansakul
Greenhorn

Joined: Oct 16, 2009
Posts: 1
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.SoapMessageDispatcher] - 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.NestedSQLException:
--- 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.NestedSQLException:
--- 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.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.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.

http://xn--72c0baa2eyce3a4p.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC problem please help