Sina, I can also reproduce your class cast exception, which is caused by new functionality in the restconfig code that does not anticipate complex features (it assumes a DataStore not the more general DataAccess). I am testing a fix for 2.1.x and trunk and will create a Jira issue if I can get it to work.
Kind regards, Ben. On 08/11/11 11:06, Ben Caradoc-Davies wrote: > Sina, > > I am impressed by what you have been able to do. I did not think > restconfig would be so useful with app-schema. > > One thing that has changed in later versions of app-schema is the > handling of the mapping file URL in datastore.xml. When I forgot to put > in a "file:" URL, I got the same NullPointerException as you. I note > that your mapping file URL starts with C: not "file:". Special handling > allows a "file:" URL relative to the data directory (technically an > invalid URL). I think you are also missing a "workspaces" in your path. > In your PHP script, please try changing: > > <entry > key='url'>".$data_dir."/".$workspace."/".$name."/".$name.".xml</entry> > > to > > <entry > key='url'>file:workspaces/".$workspace."/".$name."/".$name.".xml</entry> > > If the URL is incorrect, the app-schema plugin will not recognise your > datastore.xml and you will the the NullPointerException because no > provider can load it. > > Kind regards, > Ben. > > On 04/11/11 03:05, Sina wrote: >> Hi Ben, thanks, I spent some time creating a script to reproduce the problem >> for you. I'm not sure what has happened because the issue is now a >> NullPointerException, even when the requests are made from the original >> script. I've included both stack traces and responses. >> >> * >> rest_script.php<http://osgeo-org.1803224.n2.nabble.com/file/n6960237/rest_script.php> >> * >> classCast_geoserver.log<http://osgeo-org.1803224.n2.nabble.com/file/n6960237/classCast_geoserver.log> >> * >> classCast_requestLog.txt<http://osgeo-org.1803224.n2.nabble.com/file/n6960237/classCast_requestLog.txt> >> * >> nullPointer_geoserver.log<http://osgeo-org.1803224.n2.nabble.com/file/n6960237/nullPointer_geoserver.log> >> * >> nullPointer_requestLog.txt<http://osgeo-org.1803224.n2.nabble.com/file/n6960237/nullPointer_requestLog.txt> >> >> ________________________________ >> View this message in context: Re: 2.1.2 REST create featuretype with >> app-schema >> datastore<http://osgeo-org.1803224.n2.nabble.com/2-1-2-REST-create-featuretype-with-app-schema-datastore-tp6950658p6960237.html> >> Sent from the GeoServer - User mailing list >> archive<http://osgeo-org.1803224.n2.nabble.com/GeoServer-User-f6100014.html> >> at Nabble.com. >> > -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users