|
Issue Type:
|
Bug
|
Affects Versions:
|
2.2.4
|
Assignee:
|
Andrea Aime
|
Components:
|
Global
|
Created:
|
14/Feb/13 2:41 PM
|
Description:
|
I’m trying to create a SQLView like:
select anid,featureid,shape from mytable where featureid = %feature%
The UI responds with:
Failed to create SQL view: ERROR: syntax error at or near “)” Position: 90
The catalina.out generates:
java.io.IOException: Error occurred building feature type [86/1906]
at org.geotools.jdbc.JDBCFeatureSource.buildFeatureType(JDBCFeatureSource.java:348)
at org.geotools.jdbc.JDBCDataStore.createFeatureSource(JDBCDataStore.java:796)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:387)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:352)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:336)
at org.geotools.jdbc.JDBCDataStore.addVirtualTable(JDBCDataStore.java:298)
at org.geoserver.web.data.layer.SQLViewAbstractPage.getFeatureType(SQLViewAbstractPage.java:349)
at org.geoserver.web.data.layer.SQLViewEditPage.onSave(SQLViewEditPage.java:39)
at org.geoserver.web.data.layer.SQLViewAbstractPage$6.onSubmit(SQLViewAbstractPage.java:269)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1561)
at org.apache.wicket.markup.html.form.Form.process(Form.java:958)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:920)
at sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
…
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near “)”
Position: 90
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.jdbc.JDBCFeatureSource.getColumnMetadata(JDBCFeatureSource.java:766)
at org.geotools.jdbc.JDBCFeatureSource.buildFeatureType(JDBCFeatureSource.java:202)
… 102 more
|
Environment:
|
Linux 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Build Information
Version
2.2.4
Git Revision
24dc0e1c81c8377046075017fab3abcf1ad2b2f3
Build Date
22-Jan-2013 10:38
GeoTools Version
8.6 (rev d08fcaf271fa4e2da894285fe6ca73806724248f)
|
Project:
|
GeoServer
|
Priority:
|
Major
|
Reporter:
|
Robert Nix
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa).
For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)