Folks,
I have a table of points stored in an Oracle Spatial table.
These points are shown fine on WMS, and listed successfully in WFS... but when I ask for a single feature using its featureid, like in:
http://<myserver>/geoserverdev/wfs?request=GetFeature
&version=1.0.0
&propertyname=*
&featureversion=1
&typename=demo:POI
&featureid=POI.18add58:109c642b24b:-7d4b
This error is reported:
Caused by: org.geotools.data.DataSourceException: Error Performing SQL query: SELECT "ID", "DESCR", "TYPE", "SHAPE" FROM "POI" WHERE ()
at org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:936)
at org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:684)
at org.geotools.data.jdbc.JDBCFeatureSource$1.reader(JDBCFeatureSource.java:206)
at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:395)
... 29 more
Caused by: java.sql.SQLException: ORA-00936: missing expression
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
...
Well, it seems the WHERE expression is missing: any clue ?
Best regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Does your oracle table have a primary key? That featureid looks suspiciously like a FID that is generated on the fly when no reasonable FID is found. We should probably report an error there, instead of just generating bad FIDs. Could you try to add a primary key and see if things are any better?
best regards,
Chris
Luca Morandini wrote:
Folks,
I have a table of points stored in an Oracle Spatial table.
These points are shown fine on WMS, and listed successfully in WFS... but when I ask for a single feature using its featureid, like in:
http://<myserver>/geoserverdev/wfs?request=GetFeature
&version=1.0.0
&propertyname=*
&featureversion=1
&typename=demo:POI
&featureid=POI.18add58:109c642b24b:-7d4b
This error is reported:
Caused by: org.geotools.data.DataSourceException: Error Performing SQL query: SELECT "ID", "DESCR", "TYPE", "SHAPE" FROM "POI" WHERE ()
at org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:936)
at org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:684)
at org.geotools.data.jdbc.JDBCFeatureSource$1.reader(JDBCFeatureSource.java:206)
at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:395)
... 29 more
Caused by: java.sql.SQLException: ORA-00936: missing expression
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
...
Well, it seems the WHERE expression is missing: any clue ?
Best regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com
Chris Holmes wrote:
Does your oracle table have a primary key? That featureid looks suspiciously like a FID that is generated on the fly when no reasonable FID is found. We should probably report an error there, instead of just generating bad FIDs. Could you try to add a primary key and see if things are any better?
Yes, it worked !
My bad, I should have thought it myself 
Regards,
P.S.
Should I add this to the troubleshooting section ?
BTW, I discovered every column name should be uppercase.
--------------------
Luca Morandini
www.lucamorandini.it
--------------------