Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 01:00 AM
Joksan Nempu Fernandez
 
Posts: n/a
Default Problemas with update sentence in postgres from jdbc

Hi:

I try this ...

String sql ="UPDATE crupier "+
"SET c_estado='"+cestado+"' WHERE "+
" c_rut='"+crut+"' ";

and send me the next exception Error:

04-04-2008 07:00:03 PM Persistencia.Mesa ActualizarTupla
GRAVE: null
org.postgresql.util.PSQLException: ERROR: el valor de array debe comenzar
con «{» o información de dimensión
at
org.postgresql.core.v3.QueryExecutorImpl.receiveEr rorResponse(QueryExecutorImpl.java:1548)
at
org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutorImpl.java:1316)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:191)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:452)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:337)

I no t understand what happen in my code and i put the sql sentence in
pgadmin3 , i run this update and send me the same error.

Im using postgresql 8.3

THanx in advance.
--
Joksan Nempu Fernandez
Estudiante Ingeniería Civil en Computación e Informática.
Encargado del Laboratorio de Sistemas Distribuidos.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 01:00 AM
Craig Ringer
 
Posts: n/a
Default Re: Problemas with update sentence in postgres from jdbc

Joksan Nempu Fernandez wrote:
> Hi:
>
> I try this ...
>
> String sql ="UPDATE crupier "+
> "SET c_estado='"+cestado+"' WHERE "+
> " c_rut='"+crut+"' ";
>
> and send me the next exception Error:
>
> 04-04-2008 07:00:03 PM Persistencia.Mesa ActualizarTupla
> GRAVE: null
> org.postgresql.util.PSQLException: ERROR: el valor de array debe comenzar
> con «{» o información de dimensión
>

If I'm not mistaken that's complaining that the array must (begin with?)
{ . There don't seem to be any arrays in your query.

Try turning on query logging in the database and obtaining the query,
and the error, from the PostgreSQL logs. It's possible that the query
you're writing isn't exactly what's being sent, especially since it
sounds like you're using a persistence layer. As it is, we can't see the
values of your variables or what the final SQL being sent is. Even the
output of System.out.println(sql) would be helpful, though not as good
as information from the database logs.

If you set your locale to English for the testing you would probably get
a better response too.

Please also post the output of running "\d crupier" in psql.

--
Craig Ringer

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 01:00 AM
Craig Ringer
 
Posts: n/a
Default Re: Problemas with update sentence in postgres from jdbc

Joksan Nempu Fernandez wrote:
> Hi , thanx for answer me, well here is the sql string that i send from my
> web app. Im using a context connection for the pool in tomcat.


In future I recommend replying to the mailing list, not just to me, so
that everybody can read your message. I was telling you that you should
send more information so that *everybody* on the list would have more
chance of helping you.

As it happens your query string does not explain the problem, so:

Please set:
log_statement = 'all'
in your postgresql.conf, restart postgresql, and run your problem query
again. Look in the postgresql logs and find the query. Then include the
full text of the query as shown in PostgreSQL's logs, as well as the
following error message, in your reply.

Please also include the output of running "\d mesa" in psql. Without
being able to see your schema it is hard to tell what is going on.

I've left your statement included below.

> AbrirMesa: abriendo mesa...
> update mesa set m_col1=1 , m_col2=2 , m_col3=3 , m_col4=4 , m_col5=5 ,
> m_col6=6 , m_col7=7 , m_col8=8 , m_col9=9 , m_col10=10 , m_col11=11 ,
> m_col12=12 , m_col13=13 , m_col14=0 , m_col15=0 , m_col16=0 ,
> m_estado='abierta' where m_cod='2'
> Mesa: AT ERROR:ERROR: el valor de array debe comenzar con «{» o información
> de dimensión
> AbrirMesa: mesa cerrada...
> 05-04-2008 01:15:46 PM Persistencia.Mesa ActualizarTupla
> GRAVE: null
> org.postgresql.util.PSQLException: ERROR: el valor de array debe comenzar
> con «{» o información de dimensión
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveEr rorResponse(QueryExecutorImpl.java:1548)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutorImpl.java:1316)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:191)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:452)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:337)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery(AbstractJdbc2Statement.java:236)
> at
> org.apache.tomcat.dbcp.dbcp.DelegatingStatement.ex ecuteQuery(DelegatingStatement.java:208)
> at Persistencia.Mesa.ActualizarTupla(Mesa.java:207)
> at Persistencia.Supervisor.abrirMesa(Supervisor.java: 186)
> at controladores.AbrirMesa.processRequest(AbrirMesa.j ava:46)
> at controladores.AbrirMesa.doGet(AbrirMesa.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
> at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:26 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145