[Geoserver-users] Oracle views disfunctional with 1.3.4?

Hi list,

we just upgraded from 1.3.0 to 1.3.4 and Oracle views don't work anymore.
There is always a SELECT "null" in the SQL statement when do perform a
GetFeature request.

Any ideas what could be causing this?

Caused by: org.geotools.data.DataSourceException: Error Performing SQL
query: SELECT "null", "OGR_FID", "ORA_GEOM
ETRY", "WEGNUMMER", "HECTOMTRNG_ORG", "HECTOMTRNG" FROM "V_HECTOPUNTEN"
        at
org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:927)
        at
org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:666)
        at
org.geotools.data.jdbc.JDBCFeatureCollection.reader(JDBCFeatureCollection.java:78)
        at
org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:396)
        ... 31 more
Caused by: java.sql.SQLException: ORA-00904: "null": invalid identifier

        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at
oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java(Compiled
Code))
        at
oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:598)
        at
oracle.jdbc.driver.T2CStatement.executeForDescribe(T2CStatement.java:778)
        at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
        at
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
        at
org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:916)
        ... 34 more

Best regards,
Bart

Bart van den Eijnden (OSGIS) wrote:

Hi list,

we just upgraded from 1.3.0 to 1.3.4 and Oracle views don't work anymore.
There is always a SELECT "null" in the SQL statement when do perform a
GetFeature request.

I'm experiencing the same on DB2 with latest WCS branch see my "View as featuretypes on DB2" post.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Bart van den Eijnden (OSGIS) wrote:

Hi list,

we just upgraded from 1.3.0 to 1.3.4 and Oracle views don't work anymore.
There is always a SELECT "null" in the SQL statement when do perform a
GetFeature request.

hmmm... maybe it misses a PK: try something like:
ALTER VIEW myview ADD CONSTRAINT myview_PK PRIMARY KEY(mycolumn) DISABLE NOVALIDATE;

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Just found out there is a new requirement apparently, if I define a
primary key constraint on my view it works again.

Example SQL for Oracle:

CREATE OR REPLACE VIEW V_KMMARKERINGEN
("OGR_FID","ORA_GEOMETRY","VWK_ID","VWK_BEGDTM","POS_TOV_AS","GTLWAARDE","LTRWAARDE","AFSTAND","MST_CODE","VWG_NAAM"
UNIQUE RELY DISABLE NOVALIDATE,
CONSTRAINT PK_V_KMMARKERINGEN
PRIMARY KEY (OGR_FID) RELY DISABLE NOVALIDATE) AS
(SELECT
"OGR_FID","ORA_GEOMETRY","VWK_ID","VWK_BEGDTM","POS_TOV_AS","GTLWAARDE","LTRWAARDE","AFSTAND","MST_CODE","VWG_NAAM"
FROM KMMARKERINGEN) ORDER BY VWG_NAAM, GTLWAARDE

Best regards,
Bart

Bart van den Eijnden (OSGIS) wrote:

Hi list,

we just upgraded from 1.3.0 to 1.3.4 and Oracle views don't work
anymore.
There is always a SELECT "null" in the SQL statement when do perform a
GetFeature request.

I'm experiencing the same on DB2 with latest WCS branch see my "View as
featuretypes on DB2" post.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Something happened in GeoTools used between Geoserver 1.3.0 and 1.4 which causes a NullFIDMapper to return a key column name of "null" and also decide to use this as a selected column name.

I have a fix for DB2 but the change needs to be made higher in the class hierarchy which will probably fix the problem for Oracle as well.

What level of GeoTools is currently being used by GeoServer? I'm working with the GeoTools 2.2.x code tree.

David

At 10:08 AM 10/3/2006, Luca Morandini wrote:

Bart van den Eijnden (OSGIS) wrote:
> Hi list,
>
> we just upgraded from 1.3.0 to 1.3.4 and Oracle views don't work anymore.
> There is always a SELECT "null" in the SQL statement when do perform a
> GetFeature request.

I'm experiencing the same on DB2 with latest WCS branch see my "View as
featuretypes on DB2" post.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

It'd be great to have that fix. GeoServer 1.3.1+ and 1.4.x are all built on geotools 2.2.x.

Be sure to commit to trunk as well though, so that we don't have the problem pop up again.

best regards,

Chris

David Adler wrote:

Something happened in GeoTools used between Geoserver 1.3.0 and 1.4 which causes a NullFIDMapper to return a key column name of "null" and also decide to use this as a selected column name.

I have a fix for DB2 but the change needs to be made higher in the class hierarchy which will probably fix the problem for Oracle as well.

What level of GeoTools is currently being used by GeoServer? I'm working with the GeoTools 2.2.x code tree.

David

At 10:08 AM 10/3/2006, Luca Morandini wrote:

Bart van den Eijnden (OSGIS) wrote:

Hi list,

we just upgraded from 1.3.0 to 1.3.4 and Oracle views don't work anymore.
There is always a SELECT "null" in the SQL statement when do perform a
GetFeature request.

I'm experiencing the same on DB2 with latest WCS branch see my "View as
featuretypes on DB2" post.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,4522ad2c223494750375898!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Chris Holmes wrote:

It'd be great to have that fix. GeoServer 1.3.1+ and 1.4.x are all built on geotools 2.2.x.

AFAIK, the WCS branch is built using 2.3-SNAPSHOT.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------