[Geoserver-users] Bug rest post featureTypes with indexingEnabled and cachingEnabled

Stevan,

Are you trying to upload features to Geoserver using the REST API?

Ronak
-----Original Message-----
From: Stevan_FR [mailto:semos92@anonymised.com]
Sent: Thursday, June 11, 2009 12:38 PM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] Bug rest post featureTypes with
indexingEnabled and cachingEnabled

Hi

i donno if i'm in the right place to post but i need to... all the day
for
this idiot thing...

So when i'm trying to post the xml to rest, i have an exception :

2009-06-11 20:06:52,815 ERROR [org.vfny.geoserver.global] - Could not
load
feature type topp:GEOSPEED5
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Boolean
        at
org.vfny.geoserver.global.FeatureTypeInfo.isIndexingEnabled(FeatureTypeI
nfo.java:1687)
        at
org.vfny.geoserver.global.FeatureTypeInfo.toDTO(FeatureTypeInfo.java:529
)
       
the part wich causes trouble in my xml looks like this :
        " <metadata>" +"\n"+
        " <indexingEnabled>true</indexingEnabled>" +"\n"+
        " <cachingEnabled>false</cachingEnabled>" +"\n"+
        " <kml.regionateStrategy>best_guess</kml.regionateStrategy>"
+"\n"+
        " <dirName>GeoWeb_GEOSPEED5</dirName>" +"\n"+
        " <kml.regionateFeatureLimit>15</kml.regionateFeatureLimit>"
+"\n"+
        " </metadata>" +"\n"+

I suppressed all this metadata part, and it works now, but without cache
nor
index...

If someone have an idea i take everything :smiley:

ps: i did it with javascript, my servlet give me everytime a 401 HTTP
code i
don't understand, coz i have dont have this problem with get requests :

     URL url = new URL(adresse);
     
      HttpURLConnection conn = (HttpURLConnection) url.openConnection();
     
      conn.setRequestProperty("Authorization","admin:geoserver");
      conn.setRequestProperty("Content-Type", "text/xml");
     conn.setAllowUserInteraction(false);
     conn.setUseCaches(false);
      conn.setDoOutput(true);
      conn.setDoInput(true);
      conn.setRequestMethod("POST");
       writer = new java.io.PrintWriter(conn.getOutputStream());
      writer.write(req);
      writer.flush();

      reader = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
--
View this message in context:
http://www.nabble.com/Bug-rest-post-featureTypes-with-indexingEnabled-an
d-cachingEnabled-tp23987618p23987618.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

nope i am trying to add new features, more preciselly, it is some tables that
i create dynamically in an oracle datastore.
so i took the xml file from
http://localhost/geoserver/rest/workspaces/&lt;ws&gt;/datastores/&lt;ds&gt;/featuretypes/&lt;ft&gt;/default\.xml
and used it to create the new feature types.
--
View this message in context: http://www.nabble.com/Bug-rest-post-featureTypes-with-indexingEnabled-and-cachingEnabled-tp23987618p23988922.html
Sent from the GeoServer - User mailing list archive at Nabble.com.