build fails in OracleDataStoreTest

Description

All the test cases in OracleDataStoreTest fail with the following error. All other tests work fine so I don't think it is a network error really.

Testcase: testGetFeatureTypes took 0.25 sec
Caused an ERROR
Io exception: The Network Adapter could not establish the connection
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:361)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:117)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:61)
at org.geotools.data.jdbc.ConnectionPool.getConnection(ConnectionPool.java:121)
at org.geotools.data.oracle.OracleDataStoreTest.setUp(OracleDataStoreTest.java:70)
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)

Environment

None

Activity

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

CodeHaus Comment From: seangeo - Time: Thu, 6 Nov 2003 18:19:54 -0600
---------------------
Ive just committed a fix to this. I had left some hard coded connection parameters in the Oracle Data Store Test.

codehaus
April 10, 2015, 2:47 PM

CodeHaus Comment From: ianturton - Time: Tue, 11 Nov 2003 09:04:25 -0600
---------------------
Network problem seems to be fixed, now fails as follows

Testsuite: org.geotools.data.oracle.OracleDataStoreTest

Tests run: 9, Failures: 1, Errors: 2, Time elapsed: 149.078 sec

Testcase: testGetFeatureTypes took 12.641 sec

FAILED

expected:<3> but was:<392>

junit.framework.AssertionFailedError: expected:<3> but was:<392>

at org.geotools.data.oracle.OracleDataStoreTest.testGetFeatureTypes(OracleDataStoreTest.java:96)

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)

Testcase: testGetFeatureTypesTestcase: testGetSchema took 26.172 sec

Testcase: testGetFeatureReader took 16.922 sec

Testcase: testGetFeatureWriter took 18.109 sec

Caused an ERROR

Error Performing SQL query

org.geotools.data.DataSourceException: Error Performing SQL query

at org.geotools.data.jdbc.JDBCDataStore.executeQuery(JDBCDataStore.java:673)

at org.geotools.data.jdbc.JDBCDataStore.getFeatureWriter(JDBCDataStore.java:1327)

at org.geotools.data.oracle.OracleDataStoreTest.testGetFeatureWriter(OracleDataStoreTest.java:138)

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.doScrollStmtExecuteQuery(OracleStatement.java:6280)

at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:640)

at org.geotools.data.jdbc.JDBCDataStore.executeQuery(JDBCDataStore.java:659)

... 44 more

Testcase: testGetFeatureWriterTestcase: testLikeGetFeatures took 13.078 sec

Testcase: testAttributeFilter took 13.484 sec

Testcase: testBBoxFilter took 17.86 sec

Testcase: testPointGeometryConversion took 18.515 sec

Testcase: testAddFeatures took 12.266 sec

Caused an ERROR

Error Performing SQL query

org.geotools.data.DataSourceException: Error Performing SQL query

at org.geotools.data.jdbc.JDBCDataStore.executeQuery(JDBCDataStore.java:673)

at org.geotools.data.jdbc.JDBCDataStore.getFeatureWriter(JDBCDataStore.java:1327)

at org.geotools.data.jdbc.JDBCDataStore.getFeatureWriter(JDBCDataStore.java:1230)

at org.geotools.data.jdbc.JDBCDataStore.getFeatureWriterAppend(JDBCDataStore.java:1264)

at org.geotools.data.jdbc.JDBCFeatureStore.addFeatures(JDBCFeatureStore.java:172)

at org.geotools.data.oracle.OracleDataStoreTest.testAddFeatures(OracleDataStoreTest.java:254)

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.doScrollStmtExecuteQuery(OracleStatement.java:6280)

at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:640)

at org.geotools.data.jdbc.JDBCDataStore.executeQuery(JDBCDataStore.java:659)

... 47 more

Testcase: testAddFeatures

codehaus
April 10, 2015, 2:47 PM

CodeHaus Comment From: seangeo - Time: Tue, 11 Nov 2003 17:36:28 -0600
---------------------
Okay there is two problems here:

Firstly their is problem with the default SQL encodings for Filter.NONE and Filter.ALL. I have just commited a fix to this in the data module, the SQL builder now checks if the filter is one of the above and ignores it.

The second issue is the getFeatureTypes Test. The test assumes that the testdata is loaded into its own schema in Oracle and that the schema name is defined in the properties file. Otherwise alot of other tables will show up as feature types, throwing out the check. If this is not possible you can probably just comment out the test. If this is not realistic for lots of people Ill look at replacing the test.

codehaus
April 10, 2015, 2:47 PM

CodeHaus Comment From: ianturton - Time: Wed, 12 Nov 2003 06:02:57 -0600
---------------------
now works fine for me

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Priority

Medium
Configure