On Sun, Apr 24, 2011 at 2:01 PM, mounir younes <[email protected]> wrote:
> Hello everyone ! I need to send a feature collection over the network ! I
> created a class (which holds the feature source) and it implements
> serializable.
>
> The thing is that when I read the object back at the client I get this error
>
> java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException:
> org.geotools.feature.DefaultFeatureCollection
>
> Which should mean that DefaultFeatureCollection is not serializable what
> should I do ? should I get the FeatureCollection code and modify it to
> implement serializable? If yes, where could I get its code from ? svn?
> (link) ? can someone help? I need help fast! I don't have a lot of time :)

Premise: if you want to get help on a given deadline you should get those
support contract with various support levels that guarantee a response
within N hours.
This mailing list is providing help on a volunteer basis, so people help
when they feel to and have time, "I want help fast" "This is urgent" or
the many variants of this message are annoying.

That said, nothing in the Feature hierarchy implements Serializable, if you make
a Serializable collection you'll find that feature themselves are not
serializable.

Use a format that is meant for the network, such as GML or GeoJSON,
to send over a feature collection.

I'd suggest you have a look at the gt-geojson module, it's still not supported
but should give you decent performance without tying the two ends talking
to be written using the same version of Geotools or, for what is worth, both
being written in Java.

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

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

-------------------------------------------------------

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to