On Mon, Feb 28, 2011 at 12:40 PM, Jan De Moerloose <
[email protected]> wrote:

> Hello,
>
> while upgrading to geotools 2.7-RC2 i am getting the following error on
> 2.6 code:
>
> Caused by: java.lang.NoSuchMethodError:
>
> org.geotools.data.DataStore.getFeatureSource(Ljava/lang/String;)Lorg/geotools/data/FeatureSource;
>     at
>
> org.geomajas.layer.shapeinmem.FeatureSourceRetriever.getFeatureSource(FeatureSourceRetriever.java:81)
> ~[classes/:na]
>     at
>
> org.geomajas.layer.shapeinmem.ShapeInMemLayer.initFeatures(ShapeInMemLayer.java:221)
> ~[classes/:na]
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.6.0_18]
>
> Apparently the return type of getFeatureSource() has changed to a
> subtype of FeatureSource called SimpleFeatureSource.
> I suppose the signature change is intentionally, but it causes a big
> problem for us as we try to adhere to a strict api contract for our
> Geomajas project (no recompilation of old code for upgrades).
>
> I would like to know if there is a fix possible that does not require
> recompiling the 2.6 code (i doubt it from a java view point) ?
> If not, should we expect similar issues with upcoming minor version
> upgrades or is this an exceptional case ?
>
>
I guess it's a different interpretation of minor version.

In GeoTools when we change from x.y.z to x.y.z+1 the api
is not going to break.

When we change from x.y to x.y+1 the api is often going to
change, like it happened this time, but the overall structure
of the project can be maintained.

The day we decide to go from x to x+1... you'll probably have
so many api changes in your hand that it will feel like starting
over your application.
Just look for GeoTools 1.x series and compare with 2.x,
the 2.x was basically rewritten from scratch with no backwards
compatibility whatsoever.

Now, I don't envision such a harsh change if/when we go 3.0,
but it is likely that api break will pop up like popcorn (that is,
we'll probably decide to call it GeoTools 3 the day that the
changes are really fundamental).

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to