I do specify a schema parameter the config properties eg.
map.put("schema","MY_SCHEMA_NAME");
When I use the getTypeNames (typeNames = dataStore.getTypeNames()) method it
returns all types (tables) in the schema.
The NoSuchMethodError is generated when I use
dataStore.getFeautureSource("MYTABLE")
1) NoSuchMethodError stacktrace start
Exception in thread "main" java.lang.NoSuchMethodError:
org.geotools.factory.CommonFactoryFinder.getAttributeTypeFactory(Lorg/geotools/factory/Hints;)Lorg/geotools/feature/AttributeTypeFactory;
at
org.geotools.feature.AttributeTypeFactory.defaultInstance(AttributeTypeFactory.java:46)
at
org.geotools.feature.AttributeTypeFactory.newAttributeType(AttributeTypeFactory.java:126)
at
org.geotools.data.jdbc.JDBC1DataStore.buildAttributeType(JDBC1DataStore.java:1290)
at
org.geotools.data.oracle.OracleDataStore.buildAttributeType(OracleDataStore.java:191)
at
org.geotools.data.jdbc.JDBC1DataStore.buildSchema(JDBC1DataStore.java:1183)
at
org.geotools.data.jdbc.FeatureTypeHandler.getFeatureTypeInfo(FeatureTypeHandler.java:197)
at
org.geotools.data.jdbc.FeatureTypeHandler.getSchema(FeatureTypeHandler.java:165)
at
org.geotools.data.jdbc.JDBC1DataStore.getSchema(JDBC1DataStore.java:320)
at
org.geotools.data.oracle.OracleDataStore.getFeatureSource(OracleDataStore.java:440)
at
org.geotools.demo.gui.MyOracleSpatialConnection.createConnection(MyOracleSpatialConnection.java:50)
at
org.geotools.demo.gui.MyOracleSpatialConnection.main(MyOracleSpatialConnection.java:15)
stack trace end
When I use dataStore.getSchema("MYSCHEMA") I receive a AbstractMethodError:
2) AbstractMethodError stacktrace
Exception in thread "main" java.lang.AbstractMethodError:
org.geotools.data.oracle.OracleDataStore.getSchema(Ljava/lang/String;)Lorg/opengis/feature/simple/SimpleFeatureType;
at
org.geotools.demo.gui.MyOracleSpatialConnection.createConnection(MyOracleSpatialConnection.java:47)
at
org.geotools.demo.gui.MyOracleSpatialConnection.main(MyOracleSpatialConnection.java:15)
opengis/feature/simple/SimpleFeatureType is located in the
geoapi-2.2-M1.jar.
I'm struggling with this for over two days. I'm busy trying to build a proof
of concept GIS GUI application and my time is running out. If I don't figure
this out it will force me to read the column data (not the geom columns but
the varchar columns with lat/long values) with a plain sql select and add
the values to a FeatureCollection object and then add it to the map layer.
There must be a simple sollution to this, it usually works like that.
Thanks for your response.
Here is an updated list of all my dependancies I'm using at the moment.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<!-- <version>2.5-RC1</version>-->
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<!--<version>2.5-RC1</version>-->
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-render</artifactId>
<!--<version>2.5-RC1</version>-->
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-cql</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-epsg-hsql</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-postgis</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-widgets-swing</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-mappane</artifactId>
<version>2.4.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-wfs</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-wms</artifactId>
<version>2.4.5</version>
</dependency>
<!-- NOT really a dependancy But a milestone version is being downloaded
if I don't specify this -->
<!--
<dependency>
<groupId>org.opengis</groupId>
<artifactId>geoapi</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.opengis</groupId>
<artifactId>geoapi-nogenerics</artifactId>
<version>2.1.1</version>
</dependency>
-->
<!--
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-data</artifactId>
<version>2.5.3</version>
</dependency>
-->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt2-oracle-spatial</artifactId>
<version>2.4.5</version>
</dependency>
<!--
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.2.0</version>
</dependency>
-->
<dependency>
<groupId>ojdbc</groupId>
<artifactId>ojdbc</artifactId>
<version>14</version>
</dependency>
Jody Garnett-2 wrote:
>
> I seem to recall oracle has some kind of schema or other parameter that
> controls what tables you see. In anycase once you connect ot the datastore
> you can ask it for the list of valid table names can you not? Those should
> all work as I understand it.
> Jody
>
> On Thu, Mar 5, 2009 at 6:40 PM, alwynn <[email protected]> wrote:
>
>>
>> OK, so I'm still investigating this problem.
>>
>> Because I'm new to GIS, Geotools as well as Oracle spatial bear with me.
>>
>> When I refer to the type name string as a parameter in getFeatureSource
>> I'm
>> using the table name. This results in 'Exception in thread "main"
>> java.lang.NoSuchMethodError'
>>
>> org.geotools.factory.CommonFactoryFinder.getAttributeTypeFactory(Lorg/geotools/factory/Hints;)Lorg/geotools/feature/AttributeTypeFactory;
>>
>> But when I use the table name and referring to the column that contains
>> the
>> geometric data [eg. "shops.shape_atl"] I get a :
>> Feature type could not be found for shops.shape_atl.
>> A entry in the shape_atl column only has the following data:
>> MDSYS.SDO_GEOMETRY
>>
>> I tried with ojdb6 library as well as ojdbc14 with no joy [thinking that
>> might resolve the no method found mentioned in my previous post].
>>
>> Here is my pom.xml thinking that this could be a library problem or just
>> plain stupidity from my side not know what typename to use.
>>
>> Thanks for any thoughts, idees responses.
>>
>> Alwyn
>>
>> 1
>>
>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/creating-featuresource-from-oracle-spatial-tp2422971p2427981.html
>> Sent from the geotools-devel mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Geotools-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
--
View this message in context:
http://n2.nabble.com/creating-featuresource-from-oracle-spatial-tp2422971p2435148.html
Sent from the geotools-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel