geowolf wrote
> On Wed, Nov 12, 2014 at 2:16 PM, fmd85 <
> florian-dietz@
> > wrote:
>
>> geowolf wrote
>> > Hi,
>> > I've never tried, but did you setup the store to expose the primary key
>> as
>> > normal
>> > attributes? I don't think we have a way to join on the feature
>> identifiers
>> > (which
>> > is what the primary keys become when geotools handles them)
>>
>> Hi,
>>
>> at the beginning i used
>> DataStore ds= DataStoreFinder.getDataStore(propertiesMap);
>>
>> After that i got my FeatureSource with
>> SimpleFeatureSource source = ds.getFeatureSource("Table_A");
>>
>>
>> After Ron's reply (thanks Ron!) i changed the DataSource to
>> JDBCDataStore ds = (JDBCDataStore)
>> DataStoreFinder.getDataStore(propertiesMap);
>> ds.setExposePrimaryKeyColumns(true);
>>
>> Now the primary keys get found and i can use them in the Join-Statement,
>> but
>> i get an SQLException (Invalid column index). I think i'v got another
>> mistake now.
>>
>
> You are probably stumbling into http://jira.codehaus.org/browse/GEOT-4868,
> which got fixed end of September 2014 on the master, 12.x and 11.x series.
> If that's the case, you'll need to upgrade GeoTools
>
> Cheers
> Andrea
I've just upgraded to Version 12, but the error stays the same:
WARNING: Unable to determine bounds of org.geotools.map.FeatureLayer[,
VISIBLE]
java.lang.RuntimeException: java.sql.SQLException: Invalid Column Index
at org.geotools.jdbc.JDBCFeatureReader.next(JDBCFeatureReader.java:359)
at
org.geotools.jdbc.JDBCJoiningFeatureReader.next(JDBCJoiningFeatureReader.java:114)
at
org.geotools.jdbc.JDBCJoiningFeatureReader.next(JDBCJoiningFeatureReader.java:41)
at
org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.next(ContentFeatureCollection.java:144)
at
org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.next(ContentFeatureCollection.java:124)
at
org.geotools.data.collection.CollectionDataStore.getBoundsInternal(CollectionDataStore.java:149)
at
org.geotools.data.collection.CollectionDataStore.getBounds(CollectionDataStore.java:133)
at
org.geotools.data.AbstractFeatureSource.getBounds(AbstractFeatureSource.java:318)
at
org.geotools.data.AbstractFeatureSource.getBounds(AbstractFeatureSource.java:286)
at org.geotools.map.FeatureLayer.getBounds(FeatureLayer.java:195)
at org.geotools.map.MapContent.getMaxBounds(MapContent.java:600)
at org.geotools.map.MapContent.getViewport(MapContent.java:665)
at
org.geotools.swing.AbstractMapPane.doSetMapContent(AbstractMapPane.java:539)
at
org.geotools.swing.AbstractMapPane.setMapContent(AbstractMapPane.java:517)
at org.geotools.swing.JMapPane.setMapContent(JMapPane.java:86)
at org.geotools.swing.JMapFrame.setMapContent(JMapFrame.java:456)
....
Caused by: java.sql.SQLException: Invalid Column Index
at
oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:1042)
at
org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.java:325)
at
org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.java:325)
at
org.apache.commons.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.java:325)
at org.geotools.jdbc.JDBCFeatureReader.next(JDBCFeatureReader.java:336)
... 17 more
Cheers,
Max
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Join-on-Primary-Keys-in-a-Query-tp5172471p5172743.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users