Query unit tests fail with oracle error

Description

OracleTest fails with the following errors:

Testsuite: org.geotools.data.oracle.OracleTest
Tests run: 14, Failures: 0, Errors: 5, Time elapsed: 149.875 sec

Testcase: testLikeGetFeatures took 19.453 sec
Testcase: testAttributeFilter took 8.047 sec
Testcase: testBBoxFilter took 11.172 sec
Testcase: testPointGeometryConversion took 11.64 sec
Testcase: testAddFeatures took 12 sec
Testcase: testDummy took 8.688 sec
Testcase: testGetFeatures took 8.516 sec
Caused an ERROR
SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

org.geotools.data.DataSourceException: SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:571)
at org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
at org.geotools.data.oracle.OracleTest.testGetFeatures(OracleTest.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:525)
at org.apache.maven.cli.App.main(App.java:1088)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Caused by: java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:634)
at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:550)
... 44 more

Testcase: testGetFeaturesTestcase: testMaxFeatures took 4.953 sec
Caused an ERROR
SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

org.geotools.data.DataSourceException: SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:571)
at org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
at org.geotools.data.oracle.OracleTest.testMaxFeatures(OracleTest.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:525)
at org.apache.maven.cli.App.main(App.java:1088)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Caused by: java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:634)
at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:550)
... 44 more

Testcase: testMaxFeaturesTestcase: testGetBBox took 7.109 sec
Testcase: testRemoveFeatures took 12.75 sec
Caused an ERROR
SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

org.geotools.data.DataSourceException: SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:571)
at org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
at org.geotools.data.oracle.OracleTest.testRemoveFeatures(OracleTest.java:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:525)
at org.apache.maven.cli.App.main(App.java:1088)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Caused by: java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:634)
at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:550)
... 44 more

Testcase: testRemoveFeaturesTestcase: testModifyFeatures took 9.281 sec
Testcase: testTransaction took 9.485 sec
Caused an ERROR
SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

org.geotools.data.DataSourceException: SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:571)
at org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
at org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:153)
at org.geotools.data.oracle.OracleTest.testTransaction(OracleTest.java:276)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:525)
at org.apache.maven.cli.App.main(App.java:1088)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Caused by: java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:634)
at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:550)
... 45 more

Testcase: testTransactionTestcase: testMetaData took 14.281 sec
Testcase: testPropertySubset took 12.484 sec
Caused an ERROR
SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

org.geotools.data.DataSourceException: SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:571)
at org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
at org.geotools.data.oracle.OracleTest.testPropertySubset(OracleTest.java:330)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:525)
at org.apache.maven.cli.App.main(App.java:1088)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Caused by: java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:634)
at org.geotools.data.oracle.OracleDataSource.getFeatures(OracleDataSource.java:550)
... 44 more

Testcase: testPropertySubset

Environment

None

Activity

Show:
codehaus
April 10, 2015, 2:48 PM

CodeHaus Comment From: subnova - Time: Tue, 4 Nov 2003 10:56:05 -0600
---------------------
Log of same error running my app against the pre-data-exp-merge branch (all other packages a fully up-to-date).

04-Nov-2003 16:46:39 org.geotools.filter.SQLEncoder visit

[java] WARNING: exporting unknown filter type

No filter has been specified (call is via getFeatures() - i.e. null filter).

04-Nov-2003 16:46:39 org.geotools.data.oracle.SqlStatementEncoder makeSelectSQL

FINER: sqlString = SELECT PLACE_ID, BOUNDARY FROM GIS_TMP_TOWN_BOUNDARY WHERE TRUE and ROWNUM <= 100000000

Note the 'WHERE TRUE' clause - Oops!

04-Nov-2003 16:46:40 org.geotools.data.oracle.OracleDataSource getFeatures

WARNING: SQL Error when loading features: java.sql.SQLException: ORA-00920: invalid relational operator

codehaus
April 10, 2015, 2:48 PM

CodeHaus Comment From: cholmes - Time: Tue, 4 Nov 2003 11:34:18 -0600
---------------------
Sorry about that. I updated sql encoder to work with Filter.ALL and Filter.NONE, but couldn't check to make sure oracle handled things the same way. Would be nice if someone could implement those in oracle - for now I'm just moving the code to postgis. If there's a way to make it generic that would be nice, but it looks like subclasses will just have to do their override. If someone else could test it that'd be great, since I can't do so, no oracle install. If you test it successfully then please close this issue.

codehaus
April 10, 2015, 2:48 PM

CodeHaus Comment From: seangeo - Time: Thu, 6 Nov 2003 05:06:56 -0600
---------------------
Ive added checks in the OracleSQLStatementEncoder to not call the filter SQLEncoder when the filter == Filter.NONE. This issue should not be a problem in the new data API though since the JDBCDataStore has the same checks.

Perhaps using "WHERE '1' = '0'" for Filter.ALL and "WHERE '1' = '1'" for Filter.NONE would be more portable.

btw: Filter.ALL and Filter.NONE named back to front or it just me who gets them mixed up?

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

High
Configure