GetOptimizedBounds throws Exception when table has 2 geometry columns

Description

Udig 1.2.1 with Geotools 2.7RC1 throws exception for tables with 2 geometry columns:

!ENTRY net.refractions.udig.project 2 0 2011-02-24 13:22:31.777
!MESSAGE class java.lang.RuntimeException occured during rendering: java.io.IOException: Error occured calculating bounds
!STACK 0
net.refractions.udig.project.render.RenderException: class java.lang.RuntimeException occured during rendering: java.io.IOException: Error occured calculating bounds
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:375)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:224)
at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(RenderJob.java:108)
at net.refractions.udig.project.internal.render.impl.RenderJob.run(RenderJob.java:213)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.RuntimeException: java.io.IOException: Error occured calculating bounds
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:476)
at org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:178)
at org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:369)
at org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:341)
at org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceBridge.java:49)
at net.refractions.udig.project.internal.impl.UDIGSimpleFeatureStore.getBounds(UDIGSimpleFeatureStore.java:227)
at org.geotools.map.FeatureLayer.getBounds(FeatureLayer.java:189)
at org.geotools.map.MapContext.getLayerBounds(MapContext.java:463)
at org.geotools.map.DefaultMapContext.getViewport(DefaultMapContext.java:524)
at org.geotools.map.MapContent.<init>(MapContent.java:207)
at org.geotools.map.MapContext.<init>(MapContext.java:170)
at org.geotools.map.DefaultMapContext.<init>(DefaultMapContext.java:98)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.prepareDraw(BasicFeatureRenderer.java:168)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:247)
... 4 more
Caused by: java.io.IOException: Error occured calculating bounds
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1124)
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:469)
... 17 more
Caused by: java.sql.SQLException: ORA-01422: dokładne pobranie zwraca większą liczbę wierszy niż zamówiono
ORA-06512: przy "MDSYS.SDO_TUNE", linia 571
ORA-06512: przy linia 1

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1273)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.data.oracle.OracleDialect.getOptimizedBounds(OracleDialect.java:624)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1085)
... 18 more
net.refractions.udig.project.render.RenderException: class java.lang.RuntimeException occured during rendering: java.io.IOException: Error occured calculating bounds
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:375)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:224)
at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(RenderJob.java:108)
at net.refractions.udig.project.internal.render.impl.RenderJob.run(RenderJob.java:213)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.RuntimeException: java.io.IOException: Error occured calculating bounds
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:476)
at org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:178)
at org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:369)
at org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:341)
at org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceBridge.java:49)
at net.refractions.udig.project.internal.impl.UDIGSimpleFeatureStore.getBounds(UDIGSimpleFeatureStore.java:227)
at org.geotools.map.FeatureLayer.getBounds(FeatureLayer.java:189)
at org.geotools.map.MapContext.getLayerBounds(MapContext.java:463)
at org.geotools.map.DefaultMapContext.getViewport(DefaultMapContext.java:524)
at org.geotools.map.MapContent.<init>(MapContent.java:207)
at org.geotools.map.MapContext.<init>(MapContext.java:170)
at org.geotools.map.DefaultMapContext.<init>(DefaultMapContext.java:98)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.prepareDraw(BasicFeatureRenderer.java:168)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:247)
... 4 more
Caused by: java.io.IOException: Error occured calculating bounds
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1124)
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:469)
... 17 more
Caused by: java.sql.SQLException: ORA-01422: dokładne pobranie zwraca większą liczbę wierszy niż zamówiono
ORA-06512: przy "MDSYS.SDO_TUNE", linia 571
ORA-06512: przy linia 1

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1273)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.data.oracle.OracleDialect.getOptimizedBounds(OracleDialect.java:624)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1085)
... 18 more

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Affects versions

Priority

High
Configure