Im using StartGWT EE.
I have been connecting to a MySQL database through a Datasource and its been working fine. I have now moved to a PostgreSQL database, its got the same table sturcture.
I have edited the ds.xml file and the server.properties file so that it can work with the new database. But when i try and do a fetch on the datasource i get the following error
=== 2011-10-07 16:13:43,034 [15-7] WARN RequestContext - dsRequest.execute() failed:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "."
Position: 12
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:375)
at com.isomorphic.sql.SQLDriver.executeQuery(SQLDriver.java:625)
at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:387)
at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:381)
at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1225)
at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:289)
at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:233)
at com.isomorphic.datasource.DataSource.execute(DataSource.java:1195)
at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
at com.isomorphic.application.AppBase.execute(AppBase.java:491)
at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1839)
at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Here is my ds.xml file
<DataSource ID="login" dataFormat="iscServer" serverType="sql" dataSourceVersion="1" dbName="myDatabase" schema="security" tableName="user" autoDeriveSchema="true">
<fields>
<field name="user_id" type="text" required="true" title="Username" primaryKey="true" />
<field name="password" type="Password" required="true" title="Password"/>
<field name="username" type="text" hidden="true" />
<field name="column_numbers" type="int" hidden="false" />
<field name="name1" type="text" hidden="true" />
<field name="name2" type="text" hidden="true" />
<field name="sname" type="text" hidden="true" />
<field name="email" type="text" hidden="true" />
</fields>
<dropExtraFields>false</dropExtraFields>
</DataSource>
Here is PostgreSql settings in the server.properties file
# -------------- SETTINGS FOR PostgreSQL --------------------
# These are the settings for use with the PostgreSQL database.
# name of the database to use
sql.myDatabase.driver.databaseName: myDatabase
# sql.myDatabase.driver.context:
# username and password that can create and modify tables in that database
# this user must have the following privileges for the system to function
# properly: create/alter/drop table; create/drop sequences;
# insert/update/replace/delete rows.
sql.myDatabase.driver.user: postgres
sql.myDatabase.driver.password: postgres
sql.myDatabase.database.ansiMode: false
sql.myDatabase.driver.driverType: thin
# hostname and port where the database server is installed
sql.myDatabase.driver.serverName: localhost
sql.myDatabase.driver.portNumber: 5432
sql.myDatabase.pool.enabled: true
sql.myDatabase.interface.credentialsInURL: false
sql.myDatabase.driverName: postgresql
sql.myDatabase.driver.useUnicode: true
sql.myDatabase.driver.networkProtocol: tcp
sql.myDatabase.interface.type: driverManager
sql.myDatabase.driver: org.postgresql.Driver
sql.myDatabase.database.type: postgresql
sql.myDatabase.autoJoinTransactions: true
sql.myDatabase.driver.url: jdbc:postgresql://localhost:5433/myDatabase
Any help would be greatly appreciated