[SQL] PostgreSQL 7.3.1 multiple schema select query error: java.sql.SQLException: ERROR: parser: parse error at or near "."
I am using postgresql 7.3.1 on windows 2000. I
downloaded the lattest postgres jdbc driverfor 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.java:320)15:43:39,888
ERROR [STDERR] at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)15:43:39,888
ERROR [STDERR] at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statement.java:153)15:43:39,898
ERROR [STDERR] at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statement.java:141)15:43:39,908
ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.local.LocalStatement.executeQuery(LocalStatement.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(StatelessSessionContainer.java:660)15:43:39,938
ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)15:43:39,938
ERROR [STDERR] at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.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:130)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.java: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(StatelessSessionInterceptor.java: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.java:163)15:43:39,998
ERROR [STDERR] at
com.ilium.eapps.compmenu.controller.ModuleAction.execute(ModuleAction.java:131)15:43:40,008
ERROR [STDERR] at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.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.HttpServl
[SQL] PostgreSQL 7.3.1 multiple schema select query error: java.sql.SQLException: ERROR: parser: parse error at or near "."
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(HttpSer
