pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC problem
12+ messages / 9 participants
[nested] [flat]

* JDBC problem
@ 2002-06-15 10:20  Parul Agarwal <parul@netcore.co.in>
  0 siblings, 1 reply; 12+ messages in thread

From: Parul Agarwal @ 2002-06-15 10:20 UTC (permalink / raw)
  To: pgsql-jdbc


I tried installing postgresql 7.2.1 on redhat 7.2.

while installing, I gave the following option: ./configure --with-perl
--enable-multibyte --with-java.

Also before doing this, I had installed Ant and j2sdk1.4.0_01
successfully. 

But while installing postgresql gave some java related errors. Then I
tried installing postgresql with any configure options and I found that
the installation was successful in the first attempt.

Can you pls help me out with this JDBC issue. I wnat to install
Postgresql with java support.

Regards,
Parul




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [JDBC] JDBC problem
@ 2002-06-18 12:11  Nookala Satish Kumar <javasatish@yahoo.com>
  parent: Parul Agarwal <parul@netcore.co.in>
  0 siblings, 0 replies; 12+ messages in thread

From: Nookala Satish Kumar @ 2002-06-18 12:11 UTC (permalink / raw)
  To: Parul Agarwal <parul@netcore.co.in>; +Cc: pginter <pgsql-interfaces@postgresql.org>; pgsql-jdbc

Hi Parul,

I checked the on my system with the same configuration
(i.e., RedHat Linux 7.2, Ant, and J2SE 1.4) and I
did'nt got any errors.

Just check your path settings and see that you include
the "bin" directories of JDK and ANT. This should
solve the problem.

Regards,
Satish.

--- Parul Agarwal <parul@netcore.co.in> wrote:
> 
> I tried installing postgresql 7.2.1 on redhat 7.2.
> 
> while installing, I gave the following option:
> ./configure --with-perl
> --enable-multibyte --with-java.
> 
> Also before doing this, I had installed Ant and
> j2sdk1.4.0_01
> successfully. 
> 
> But while installing postgresql gave some java
> related errors. Then I
> tried installing postgresql with any configure
> options and I found that
> the installation was successful in the first
> attempt.
> 
> Can you pls help me out with this JDBC issue. I wnat
> to install
> Postgresql with java support.
> 
> Regards,
> Parul
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* jdbc problem
@ 2003-04-24 02:20  milimeter@163.com <milimeter@163.com>
  0 siblings, 1 reply; 12+ messages in thread

From: milimeter@163.com @ 2003-04-24 02:20 UTC (permalink / raw)
  To: pgsql-jdbc

Hi, all

    I have a table: CREATE TABLE person (age char(4))
    After executing "select age from person" with jdbc, I extract the value 
with: 
    getInt("age")
    Now is the problem, the same code can succeed on oracle, but on 
postgresql, because of not triming space automaticlly, it cause an error.

    So, I hope the newest jdbc driver for postgresql can automaticlly trim 
space just like oracle. The same problem also exists when execute insert:
    Provided "age" is an integer, then "insert into person values ('30')" can 
be executed correctly, but "insert into person values ('')" can not. On 
oracle, a default value will be added. So jdbc driver for postgresql should 
also do it.

    Yours,
    mili




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2003-04-24 02:50  Barry Lind <blind@xythos.com>
  parent: milimeter@163.com <milimeter@163.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Barry Lind @ 2003-04-24 02:50 UTC (permalink / raw)
  To: milimeter@163.com; +Cc: pgsql-jdbc

Mili,

I don't understand your issues.  Can you explain them in a bit more 
detail?  Perhaps with code examples?

thanks,
--Barry

milimeter@163.com wrote:
> Hi, all
> 
>     I have a table: CREATE TABLE person (age char(4))
>     After executing "select age from person" with jdbc, I extract the value 
> with: 
>     getInt("age")
>     Now is the problem, the same code can succeed on oracle, but on 
> postgresql, because of not triming space automaticlly, it cause an error.
> 
>     So, I hope the newest jdbc driver for postgresql can automaticlly trim 
> space just like oracle. The same problem also exists when execute insert:
>     Provided "age" is an integer, then "insert into person values ('30')" can 
> be executed correctly, but "insert into person values ('')" can not. On 
> oracle, a default value will be added. So jdbc driver for postgresql should 
> also do it.
> 
>     Yours,
>     mili
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2003-04-24 03:06  milimeter@163.com <milimeter@163.com>
  parent: Barry Lind <blind@xythos.com>
  0 siblings, 1 reply; 12+ messages in thread

From: milimeter@163.com @ 2003-04-24 03:06 UTC (permalink / raw)
  To: pgsql-jdbc

Thank you, Barry

  You know, I have to work with oracle and postgresql at the same time now. In 
company, I have to use oracle, and at home, I will use postgresql to develop 
application. So I hope my java codes can work anywhere (other coworker only 
use oracle, so I have to adapt all postgresql features to be fit to oracle).

  Now, someone wrote a code line as:
    ResultSet rs = .....
    int age = rs.getInt("age"); //here, feild "age" is a char(4) type
  The above codes can work well on oracle jdbc driver, but on postgresql, not 
work, because if age is 20, then in database it's "20  " but no "20". The 
reason is that jdbc driver of oracle automaticlly trim the returned result 
string; but postgresql not. There's so many places in codes of my company 
where get an integer from a char(...) feild, I can't change them all. So I 
hope jdbc driver of postgresql can also do it.

  Another problem when programming jdbc codes:
    "INSERT INTO person VALUES ('100')" //here, the field is an integer, but I 
insert as a string
  The above SQL can work well on both oracle and postgresql, but:
    "INSERT INTO person VALUES ('')"
  can work only on oracle but not work on postgresql. On oracle, a default 
value will be inserted, but postgresql will report an error.

  I hope I have expressed myself clearly. If I can't, it's my fault.

  Thank you very much,
  mili


在 星期四 24 四月 2003 10:50,您写道:
> Mili,
>
> I don't understand your issues.  Can you explain them in a bit more
> detail?  Perhaps with code examples?
>
> thanks,
> --Barry
>
> milimeter@163.com wrote:
> > Hi, all
> >
> >     I have a table: CREATE TABLE person (age char(4))
> >     After executing "select age from person" with jdbc, I extract the
> > value with:
> >     getInt("age")
> >     Now is the problem, the same code can succeed on oracle, but on
> > postgresql, because of not triming space automaticlly, it cause an error.
> >
> >     So, I hope the newest jdbc driver for postgresql can automaticlly
> > trim space just like oracle. The same problem also exists when execute
> > insert: Provided "age" is an integer, then "insert into person values
> > ('30')" can be executed correctly, but "insert into person values ('')"
> > can not. On oracle, a default value will be added. So jdbc driver for
> > postgresql should also do it.
> >
> >     Yours,
> >     mili
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2003-04-24 16:13  Barry Lind <blind@xythos.com>
  parent: milimeter@163.com <milimeter@163.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Barry Lind @ 2003-04-24 16:13 UTC (permalink / raw)
  To: milimeter@163.com; +Cc: pgsql-jdbc

Mili,

See my comments below.

milimeter@163.com wrote:
> Thank you, Barry
> 
>   You know, I have to work with oracle and postgresql at the same time now. In 
> company, I have to use oracle, and at home, I will use postgresql to develop 
> application. So I hope my java codes can work anywhere (other coworker only 
> use oracle, so I have to adapt all postgresql features to be fit to oracle).
> 
>   Now, someone wrote a code line as:
>     ResultSet rs = .....
>     int age = rs.getInt("age"); //here, feild "age" is a char(4) type
>   The above codes can work well on oracle jdbc driver, but on postgresql, not 
> work, because if age is 20, then in database it's "20  " but no "20". The 
> reason is that jdbc driver of oracle automaticlly trim the returned result 
> string; but postgresql not. There's so many places in codes of my company 
> where get an integer from a char(...) feild, I can't change them all. So I 
> hope jdbc driver of postgresql can also do it.

In general I think your code is broken.  Either you should be using an 
integer datatype or you should be using getString().  However according 
to the jdbc spec, what you are doing should be possible and this is a 
bug in the driver.  Can you submit a patch for this?

> 
>   Another problem when programming jdbc codes:
>     "INSERT INTO person VALUES ('100')" //here, the field is an integer, but I 
> insert as a string
>   The above SQL can work well on both oracle and postgresql, but:
>     "INSERT INTO person VALUES ('')"
>   can work only on oracle but not work on postgresql. On oracle, a default 
> value will be inserted, but postgresql will report an error.
> 
Here the problem is that Oracle is not following the ANSI Standard.  The 
standard says the '' = empty string which is how postgres correctly 
interprets it.  In Oracle '' = null, which is a violation of the spec. 
Thus you are going to get different behavior in Oracle than in postgres. 
  This code really should be doing the following which is in compliance 
with the sql spec and will work on both oracle and postgres:
INSERT INTO person VALUES(null)

thanks,
--Barry




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* jdbc problem
@ 2006-01-16 16:21  Gilbert, Antoine <AGilbert@korem.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Gilbert, Antoine @ 2006-01-16 16:21 UTC (permalink / raw)
  To: pgsql-jdbc

Hi

 

I'am fetching records via the PostgreSQL JDBC driver.

 

I have a strange problem. The string values always have some blank
characters (or tab?) at the end.

 

So if I have in the database 'British Columbia', it become in my java
program with rs.getString() something like 'British Columbia    '.

 

The select I'm using is basic : select Province_name from myTable

 

When I try this query in the PostgreSQL admin console, I don't have this
problem.

 

Any idea?

 

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2006-01-16 16:39  Roland Walter <rwa@mosaic-ag.com>
  parent: Gilbert, Antoine <AGilbert@korem.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Roland Walter @ 2006-01-16 16:39 UTC (permalink / raw)
  To: Gilbert, Antoine <AGilbert@korem.com>; +Cc: pgsql-jdbc

Gilbert, Antoine schrieb:

> Hi
>
>  
>
> I'am fetching records via the PostgreSQL JDBC driver.
>
>  
>
> I have a strange problem. The string values always have some blank 
> characters (or tab?) at the end.
>
>  
>
> So if I have in the database 'British Columbia', it become in my java 
> program with rs.getString() something like 'British Columbia    '.
>
>  
>
> The select I'm using is basic : select Province_name from myTable
>
>  
>
> When I try this query in the PostgreSQL admin console, I don't have 
> this problem.
>
>  
>
> Any idea?
>
>  
>
This is correct if  the type of Province_name is char(xx) and the column 
width xx is longer than the value.

-- 
Roland Walter                   mailto: rwa (at) mosaic-ag (dot) com
MOSAIC SOFTWARE AG               phone: +49 (0) 22 25 / 88 2-41 1
Am Pannacker 3                     fax: +49 (0) 22 25 / 88 2-20 1
D-53340 Meckenheim                http://www.mosaic-ag.com



Die in dieser E-Mail enthaltenen Nachrichten und Anhaenge sind ausschliesslich 
fuer den bezeichneten Adressaten bestimmt. Sie koennen rechtlich geschuetzte, 
vertrauliche Informationen enthalten. Falls Sie nicht der bezeichnete Empfaenger
oder zum Empfang dieser E-Mail nicht berechtigt sind, ist die Verwendung,
Vervielfaeltigung oder Weitergabe von Nachrichten und Anhaengen untersagt.
Falls Sie diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte 
unverzueglich den Absender und vernichten Sie die E-Mail.

This e-mail message and any attachment are intended exclusively for the named 
addressee. They may contain confidential information which may also be protected 
by professional secrecy. Unless you are the named addressee (or authorised to
receive for the addressee) you may not copy or use this message or any attachment
or disclose the contents to anyone else. If this e-mail was sent to you by mistake
please notify the sender immediately and delete this e-mail.

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* jdbc problem
@ 2007-08-22 13:48  Paweł Cesar Sanjuan Szklarz <paweld2@gmail.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Paweł Cesar Sanjuan Szklarz @ 2007-08-22 13:48 UTC (permalink / raw)
  To: pgsql-jdbc

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.

Pawel Cesar Sanjuan Szklarz.





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2007-08-27 05:02  Kris Jurka <books@ejurka.com>
  parent: Paweł Cesar Sanjuan Szklarz <paweld2@gmail.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Kris Jurka @ 2007-08-27 05:02 UTC (permalink / raw)
  To: Paweł Cesar Sanjuan Szklarz <paweld2@gmail.com>; +Cc: pgsql-jdbc



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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2007-08-27 10:38  Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com>
  parent: Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Pawel Cesar Sanjuan Szklarz @ 2007-08-27 10:38 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

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
>



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: jdbc problem
@ 2007-09-03 12:48  Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com>
  parent: Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Pawel Cesar Sanjuan Szklarz @ 2007-09-03 12:48 UTC (permalink / raw)
  To: 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
> >
>



^ permalink  raw  reply  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2007-09-03 12:48 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-15 10:20 JDBC problem Parul Agarwal <parul@netcore.co.in>
2002-06-18 12:11 ` Nookala Satish Kumar <javasatish@yahoo.com>
2003-04-24 02:20 jdbc problem milimeter@163.com <milimeter@163.com>
2003-04-24 02:50 ` Re: jdbc problem Barry Lind <blind@xythos.com>
2003-04-24 03:06   ` Re: jdbc problem milimeter@163.com <milimeter@163.com>
2003-04-24 16:13     ` Re: jdbc problem Barry Lind <blind@xythos.com>
2006-01-16 16:21 jdbc problem Gilbert, Antoine <AGilbert@korem.com>
2006-01-16 16:39 ` Re: jdbc problem Roland Walter <rwa@mosaic-ag.com>
2007-08-22 13:48 jdbc problem Paweł Cesar Sanjuan Szklarz <paweld2@gmail.com>
2007-08-27 05:02 ` Re: jdbc problem Kris Jurka <books@ejurka.com>
2007-08-27 10:38   ` Re: jdbc problem Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com>
2007-09-03 12:48     ` Re: jdbc problem Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox