Hii
I have created a feature layer in openlayers using WFS. I am able to modify
features, delete features but when I try to create new features and save, an
error is coming.
" Error performing insert: java.lang.String cannot be cast to
com.vividsolutions.jts.geom.Geometry "
This is full response send send by geoserver.
<?xml version="1.0" encoding="UTF-8"?><wfs:WFS_TransactionResponse
version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://182.71.192.178:8088/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd"><wfs:InsertResult><ogc:FeatureId
fid="none"/></wfs:InsertResult> <wfs:TransactionResult> <wfs:Status>
<wfs:FAILED/> </wfs:Status> <wfs:Message>Error performing insert:
java.lang.String cannot be cast to
com.vividsolutions.jts.geom.Geometry</wfs:Message>
</wfs:TransactionResult></wfs:WFS_TransactionResponse>
Any help...
Regards
Pankaj Bansal
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-while-adding-new-feature-in-WFS-layer-tp5090373.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi,
you should share with us the WFS-T request you’ve made, and possibly, also the result
of DescribeFeatureType against that feature type.
The error indicates there is a type mismatch between the attribute you are trying to insert/update
and the one in the data source in use (literally, it seems you’re trying to write a string in a place
where only a geometry can be used).
Cheers
Andrea
···
On Thu, Nov 21, 2013 at 10:18 AM, pankaj123 <pankaj.bansal.jiit@anonymised.com.> wrote:
Hii
I have created a feature layer in openlayers using WFS. I am able to modify
features, delete features but when I try to create new features and save, an
error is coming.
" Error performing insert: java.lang.String cannot be cast to
com.vividsolutions.jts.geom.Geometry "
This is full response send send by geoserver.
<?xml version="1.0" encoding="UTF-8"?><wfs:WFS_TransactionResponse
version=“1.0.0” xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:ogc=“http://www.opengis.net/ogc”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.opengis.net/wfs
http://182.71.192.178:8088/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd”>wfs:InsertResult<ogc:FeatureId
fid=“none”/></wfs:InsertResult> wfs:TransactionResult wfs:Status
wfs:FAILED/ </wfs:Status> wfs:MessageError performing insert:
java.lang.String cannot be cast to
com.vividsolutions.jts.geom.Geometry</wfs:Message>
</wfs:TransactionResult></wfs:WFS_TransactionResponse>
Any help…
Regards
Pankaj Bansal
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-while-adding-new-feature-in-WFS-layer-tp5090373.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Hi
I have managed to solve this problem. The problem was that my geoserver
layer was expecting a point geometry but I was creating a multiPoint
geometry. So the geoserver was not able to cast the geometry properly.
Thanks andrea for your quick reply.
Regards
Pankaj Bansal
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-while-adding-new-feature-in-WFS-layer-tp5090373p5090534.html
Sent from the GeoServer - User mailing list archive at Nabble.com.