planetfederal / qgis-geoserver-plugin

GNU General Public License v2.0
62 stars 52 forks source link

Can't Connet to GeoServer Version 2.10.* #62

Closed ailong closed 7 years ago

ailong commented 7 years ago

image

image

johnniehard commented 7 years ago

I get this same error (geoserver 2.10.02, qgis 2.18.4, ubuntu)

gioman commented 7 years ago

Confirmed here with Geoserver 2.10.2

Could not connect to catalog: Traceback (most recent call last): File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 313, in addGeoServerCatalog geoserverItem.populate() File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 552, in populate raise Exception(var) Exception: Traceback (most recent call last): File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 547, in populate self._populate() File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 564, in _populate self.layersItem.populate() File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 344, in populate layerItem = GsLayerItem(layer) File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 705, in __init__ GsTreeItem.__init__(self, layer, icon, layer.resource.title) File "build/bdist.linux-x86_64/egg/geoserver/support.py", line 67, in getter self.fetch() File "build/bdist.linux-x86_64/egg/geoserver/support.py", line 176, in fetch self.dom = self.catalog.get_xml(self.href) File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/geoserver/auth.py", line 74, in get_xml return parse_or_raise(content) File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/geoserver/auth.py", line 65, in parse_or_raise raise Exception(msg, e) Exception: (u'GeoServer gave non-XML response for [GET http://localhost:8080/geoserver/rest/workspaces/ubc/datastores/ubc_ubc/featuretypes/wb.xml]: \n wb\n wb\n \n ubc\n \n \n \n \n features\n wb\n \n GEOGCS["WGS 84", \n DATUM["World Geodetic System 1984", \n SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], \n AUTHORITY["EPSG","6326"]], \n PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], \n UNIT["degree", 0.017453292519943295], \n AXIS["Geodetic longitude", EAST], \n AXIS["Geodetic latitude", NORTH], \n AUTHORITY["EPSG","4326"]]\n EPSG:4326\n \n -31.7374992370605\n 73.6949844360352\n -1.79403030872345\n 62.7062530517578\n EPSG:4326\n \n \n -31.7374992370605\n 73.6949844360352\n -1.79403030872345\n 62.7062530517578\n GEOGCS["WGS84(DD)", \n DATUM["WGS84", \n SPHEROID["WGS84", 6378137.0, 298.257223563]], \n PRIMEM["Greenwich", 0.0], \n UNIT["degree", 0.017453292519943295], \n AXIS["Geodetic longitude", EAST], \n AXIS["Geodetic latitude", NORTH]]\n \n FORCE_DECLARED\n true\n \n ubc:ubc_ubc\n \n \n 0\n 0\n false\n false\n false\n

gioman commented 7 years ago

after the above error the tree is partially populated, adding layers causes other errors like

Traceback (most recent call last):
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/explorertree.py", line 205, in mimeData
    uri = uri_utils.layerMimeUri(layer)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/qgis/uri.py", line 93, in layerMimeUri
    uri = layerUri(layer)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/qgis/uri.py", line 45, in layerUri
    resource = layer.resource
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/geoserver/basecatalog.py", line 36, in resource
    return self.catalog.get_resource(name, workspace=self.name.split(':')[0])
  File "build/bdist.linux-x86_64/egg/geoserver/catalog.py", line 686, in get_resource
    for store in self.get_stores(workspace):
  File "build/bdist.linux-x86_64/egg/geoserver/catalog.py", line 298, in get_stores
    ds_list = self.get_xml(workspace.datastore_url)
AttributeError: 'NoneType' object has no attribute 'datastore_url'
gioman commented 7 years ago

fixed with https://github.com/boundlessgeo/qgis-geoserver-plugin/commit/366427933b39802b565c62e559e5f630cf54bd5b

suggested to use GS 2.11

EwertonMoreiraDev commented 6 years ago

I am using GS 2.12.2 and also get the same error. Anybody understands why? Using QGIS 2.18.21:

Traceback (most recent call last):
  File "D:/Users/emoreira/.qgis2/python/plugins\geoserverexplorer\gui\explorer.py", line 101, in run
    command(*params)
  File "D:/Users/emoreira/.qgis2/python/plugins\geoserverexplorer\gui\gsexploreritems.py", line 551, in populate
    raise e
Exception: (u'GeoServer gave non-XML response for [GET http://gisvm/geoserver/rest/layers/ne_10m_admin_0_countries.xml]: \n  ne_10m_admin_0_countries\n  VECTOR\n