It would be nice if GeoServer could help more in identifying this sort of problem (I've committed a patch to make the REST API less forgiving of broken configuration, but it won't be in a release until the 2.2 series.) However, usually the problem can be identified (and often corrected too) through the REST API as well. My first pass is to use a small script with gsconfig to enumerate through all fields, then search through that for fields set to None to identify problems. Here's an example (it should work fine with the gsconfig in the GeoNode installation.): https://gist.github.com/1232047
A common problem is to have the latlon_bbox field set to None (and often that is paired with the native projection not being detected.) -- David Winslow OpenGeo - http://opengeo.org/ On Tue, Sep 20, 2011 at 6:45 PM, Ariel Nunez <[email protected]>wrote: > Jeff, > > You are right, this was in the middle of the document that was trying > to be parsed. > > <SRS><?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE > ServiceExceptionReport SYSTEM > " > http://geonode.sopac.org:80/geoserver-geonode-dev/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd > "> > <ServiceExceptionReport version="1.1.1" > <ServiceException>\n > javax.xml.transform.TransformerException: Translator error\nTranslator > error\nnull\n</ServiceException></ServiceExceptionReport> > > This seems to be related to the following thread in geoserver-devel > [1], where Andrea talked about running validate before starting to > write the XML. > > I am going to take this issue to our developer's list and create > tickets in both GeoServer and GeoNode with links. > > But the original problem remains, how should my friend troubleshoot > which layer is causing trouble? > > Ariel. > > [1] > http://sourceforge.net/mailarchive/forum.php?thread_name=CA%2BnxMTs3t0fCydsJqAd-Q-ZcxQjQtWuxk%2Ba-QwW2J43rfBWpgw%40mail.gmail.com&forum_name=geoserver-devel > > On Tue, Sep 20, 2011 at 6:31 PM, Jeffrey Johnson <[email protected]> > wrote: > > I think we need to see what the local variable 'text' on line 150 > contains. > > > > http://dpaste.de/LKcHa/#l150 > > > > again, my suspicion is that it is a ServiceException in the middle of > > the GetCapabilities doc. > > > > Anyway you can post the contents of that variable?? > > > > Jeff > > > > On Tue, Sep 20, 2011 at 3:25 PM, Ariel Nunez <[email protected]> > wrote: > >> Thanks Jeff, here is a complete stacktrace[1] > >> > >> The line in GeoNode that is failing is: > >> > >> File > "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py" > >> in get_wms > >> 556. _wms = WebMapService(wms_url, xml=body) > >> File "/var/www/geonode/wsgi/geonode/src/owslib/owslib/wms.py" in > __init__ > >> 74. self._capabilities = reader.readString(xml) > >> File "/var/www/geonode/wsgi/geonode/src/owslib/owslib/wms.py" in > readString > >> 557. return etree.fromstring(st) > >> File "/usr/lib/python2.6/xml/etree/ElementTree.py" in XML > >> 963. parser.feed(text) > >> File "/usr/lib/python2.6/xml/etree/ElementTree.py" in feed > >> 1245. self._parser.Parse(data, 0) > >> > >> > >> [1] http://dpaste.de/LKcHa/ > >> > >> On Tue, Sep 20, 2011 at 5:52 PM, Jeffrey Johnson <[email protected]> > wrote: > >>> I've seen something similar before a few times, and iirc it was > >>> usually because there was a ServiceException in the middle of the wms > >>> GetCapabilities from GeoServer due to a misconfigured layer. > >>> > >>> Jeff > >>> > >>> On Tue, Sep 20, 2011 at 2:46 PM, Ariel Nunez <[email protected]> > wrote: > >>>> Hello people, > >>>> > >>>> A friend of mine got the following error in GeoNode, he is using > >>>> master from a few months back. Has anyone else seen this error before? > >>>> Do you know if it is related to GeoServer or GeoNetwork? > >>>> > >>>> Unexpected error during upload: XML or text declaration not at start > >>>> of entity: line 4708, column 11 > >>>> > >>>> Best regards, > >>>> Ariel. > >>>> > >>> > >> > > >
