Re: PostgreSQL 7.3.1 multiple schema select query error: - Mailing list pgsql-sql
From | Achilleus Mantzios |
---|---|
Subject | Re: PostgreSQL 7.3.1 multiple schema select query error: |
Date | |
Msg-id | Pine.LNX.4.44.0302071050500.19210-100000@matrix.gatewaynet.com Whole thread Raw |
In response to | PostgreSQL 7.3.1 multiple schema select query error: java.sql.SQLException: ERROR: parser: parse error at or near "." ("waimeng" <waimeng@efkonasia.com.my>) |
List | pgsql-sql |
On Fri, 7 Feb 2003, waimeng wrote: The Exception is thrown in public java.sql.ResultSet execute() method of QueryExecutor.java This method implements the native protocol of postgres server/client communication. So, the message is actually from the backend. See line 104: errorMessage.append(pg_stream.ReceiveString(connection.getEncoding())); and then if ( errorMessage != null ) throw new SQLException( errorMessage.toString()); and thats where you get your Exception. Be sure you have the right postgres-service.xml in /usr/local/jboss-3.0.3/server/default/deploy/. (or whatever it is for windows). (Could it be that you are pointing to a 7.2.x backend??) Also place your postgres jdbc driver in /usr/local/jboss-3.0.3/lib/ Do a simple test Quit any app that uses the DB. start your jboss, and then invoke some pages that use your database. then do ps -ax | grep postgres Do you see any lines??? If yes then are you sure you are running 7.3.1??? If no then you are hitting another server. > > I am using postgresql 7.3.1 on windows 2000. I downloaded the lattest > postgres jdbc driver > for version 7.3.1, called pg73jdbc3.jar and using JBoss-3.04_Tomcat-4.0.6. > > I created one database called 'testdb', and a scheme called 'sc_test', with > a table called 'tbl_company' under the sc_test scheme. > When i execute the following query from java code, i get the following > error: > > java.sql.Statement stmt1 = conn.createStatement(); > Resultset rs = stmt1.executeQuery("SELECT * FROM sc_test.tbl_company"); > > > 15:43:39,877 ERROR [STDERR] java.sql.SQLException: ERROR: parser: parse > error at or near "." > 15:43:39,877 ERROR [STDERR] at > org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131) > 15:43:39,877 ERROR [STDERR] at > org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection > .java:505 > ) > 15:43:39,888 ERROR [STDERR] at > org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.j > ava:320) > 15:43:39,888 ERROR [STDERR] at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j > ava:48) > 15:43:39,888 ERROR [STDERR] at > org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statem > ent.java: > 153) > 15:43:39,898 ERROR [STDERR] at > org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statem > ent.java: > 141) > 15:43:39,908 ERROR [STDERR] at > org.jboss.resource.adapter.jdbc.local.LocalStatement.executeQuery(LocalState > ment.java > :211) > 15:43:39,908 ERROR [STDERR] at > com.ilium.eapps.compmenu.dao.GenericModuleDAO.list(GenericModuleDAO.java:246 > ) > 15:43:39,908 ERROR [STDERR] at > com.ilium.eapps.compmenu.ejb.sb.SBModuleBean.getList(SBModuleBean.java:258) > 15:43:39,918 ERROR [STDERR] at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > 15:43:39,918 ERROR [STDERR] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > 15:43:39,918 ERROR [STDERR] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > > 15:43:39,928 ERROR [STDERR] at > java.lang.reflect.Method.invoke(Method.java:324) > 15:43:39,928 ERROR [STDERR] at > org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(Stateles > sSessionC > ontainer.java:660) > 15:43:39,938 ERROR [STDERR] at > org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach > edConnect > ionInterceptor.java:186) > 15:43:39,938 ERROR [STDERR] at > org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSe > ssionInst > anceInterceptor.java:77) > 15:43:39,948 ERROR [STDERR] at > org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor > .java:107 > ) > 15:43:39,948 ERROR [STDERR] at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. > java:178) > > 15:43:39,958 ERROR [STDERR] at > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) > 15:43:39,958 ERROR [STDERR] at > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13 > 0) > 15:43:39,958 ERROR [STDERR] at > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) > 15:43:39,968 ERROR [STDERR] at > org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav > a:313) > 15:43:39,968 ERROR [STDERR] at > org.jboss.ejb.Container.invoke(Container.java:712) > 15:43:39,968 ERROR [STDERR] at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) > 15:43:39,978 ERROR [STDERR] at > org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98) > 15:43:39,978 ERROR [STDERR] at > org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102) > 15:43:39,978 ERROR [STDERR] at > org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77 > ) > 15:43:39,988 ERROR [STDERR] at > org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80) > 15:43:39,988 ERROR [STDERR] at > org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInter > ceptor.ja > va:111) > 15:43:39,988 ERROR [STDERR] at > org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) > 15:43:39,998 ERROR [STDERR] at $Proxy33.getList(Unknown Source) > 15:43:39,998 ERROR [STDERR] at > com.ilium.eapps.compmenu.controller.ModuleAction.performList(ModuleAction.ja > va:163) > 15:43:39,998 ERROR [STDERR] at > com.ilium.eapps.compmenu.controller.ModuleAction.execute(ModuleAction.java:1 > 31) > 15:43:40,008 ERROR [STDERR] at > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces > sor.java: > 465) > 15:43:40,008 ERROR [STDERR] at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > 15:43:40,008 ERROR [STDERR] at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) > 15:43:40,018 ERROR [STDERR] at > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505) > 15:43:40,018 ERROR [STDERR] at > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > 15:43:40,018 ERROR [STDERR] at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > 15:43:40,028 ERROR [STDERR] at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > FilterCha > in.java:247) > 15:43:40,028 ERROR [STDERR] at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java: > 193) > 15:43:40,038 ERROR [STDERR] at > com.ilium.eapps.syswar.filter.SetCharacterEncodingFilter.doFilter(SetCharact > erEncodin > gFilter.java:147) > 15:43:40,038 ERROR [STDERR] at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > FilterCha > in.java:213) > 15:43:40,048 ERROR [STDERR] at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java: > 193) > 15:43:40,048 ERROR [STDERR] at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja > va:243) > 15:43:40,058 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > 15:43:40,058 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > 15:43:40,058 ERROR [STDERR] at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > 15:43:40,068 ERROR [STDERR] at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja > va:190) > 15:43:40,068 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > 15:43:40,068 ERROR [STDERR] at > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 > 46) > 15:43:40,068 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > 15:43:40,078 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > 15:43:40,078 ERROR [STDERR] at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > 15:43:40,078 ERROR [STDERR] at > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) > 15:43:40,088 ERROR [STDERR] at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 > ) > 15:43:40,088 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > 15:43:40,088 ERROR [STDERR] at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. > java:170) > > 15:43:40,098 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > 15:43:40,098 ERROR [STDERR] at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 > ) > 15:43:40,098 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > 15:43:40,108 ERROR [STDERR] at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) > 15:43:40,108 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > 15:43:40,108 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > 15:43:40,108 ERROR [STDERR] at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > 15:43:40,118 ERROR [STDERR] at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java > :174) > 15:43:40,118 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > 15:43:40,118 ERROR [STDERR] at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > 15:43:40,128 ERROR [STDERR] at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > 15:43:40,128 ERROR [STDERR] at > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: > 1027) > 15:43:40,128 ERROR [STDERR] at > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 > ) > 15:43:40,128 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536) > > > What would the possible cause of the error?? > The above query run fine when using pgadmin2 client. > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003 > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-10-8981112 fax: +30-10-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr