Re: JDBC parse error

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: JDBC parse error
Дата
Msg-id 3D0F7530.9030602@xythos.com
обсуждение исходный текст
Ответ на JDBC parse error  (John Metz <johnmetz@excite.com>)
Список pgsql-jdbc
John,

Can you turn on query logging on the server to see what the actual
queries sent from the jdbc driver to the server actually are?  That
might give some indication of where the problem is.  Finally are you
sure that your own code isn't munging the string before it is passed to
the jdbc driver?  I haven't heard of anyone else seeing this problem.
  We need to track down what is different in your environment that is
causing it.  Also if you would mention what version of the server and
jdbc driver you are using, that would be helpful.

thanks,
--Barry

John Metz wrote:

 >Hi,
 >
 >I'm having an intermittent problem with the PostGres JDBC Driver I
recently
 >downloaded from http://jdbc.postgresql.org/download.html.  I am running a
 >Java Servlet application under Tomcat 4.0  and Solaris 8.  On some
occasions
 >it seems that the String passed to a Statement object gets altered when
 >executed. I get a SQLException with the text "parse error at or near
selec".
 >It always seems to happen on a select.  On some occasions it works but it
 >seems to happen on some queries more than others.  The text in the parse
 >error is different at times for the same query (another example was
 >selecaria).  Here is an example stack trace:
 >
 >java.sql.SQLException: ERROR:  parser: parse error at or near "selec"
 >
 > at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
 > at org.postgresql.Connection.ExecSQL(Connection.java:398)
 > at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
 > at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
 > at
 >org.postgresql.jdbc2.PreparedStatement.executeQuery(PreparedStatement.java:9
 >9)
 > at
 >com.conquestnet.database.entity.EducationDegree.getAllEducationDegrees(Educa
 >tionDegree.java:211)
 > at org.apache.jsp.edit$jsp._jspService(edit$jsp.java:218)
 > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
 > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 > at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
 >Source)
 > at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
 > at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
 >
 >Any help that can be provided is much appriciated.  I've searched the FAQ
 >but could not find anything that seemed like the same problem.
 >
 >Thanks,
 >
 >John Metz
 >
 >
 >---------------------------(end of broadcast)---------------------------
 >TIP 4: Don't 'kill -9' the postmaster
 >
 >
 >




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Aaron Mulder
Дата:
Сообщение: 7.2.1 getImportedKeys/getExportedKeys Problems
Следующее
От: Vernon Wu
Дата:
Сообщение: getString can't pick up the last new column