Uploaded image for project: 'GeoServer'
  1. GEOS-7137

NPE on reattach during import if the target workspace is missing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.3
    • Component/s: Importer
    • Labels:
      None

      Description

      When trying to import a new granule in an empty mosaic, I receive a NullPointerException while getting prefixedName.

      The empty mosaic has been created via REST (checking if it exists first) :

      03 Aug 12:42:28 INFO [geoserver.filters] - 127.0.0.1 "GET /geoserver/rest/workspaces/sar/coveragestores/sar/coverages/sar.xml?quietOnNotFound=true" took 2ms
      03 Aug 12:45:24 INFO [geoserver.filters] - 127.0.0.1 "PUT /geoserver/rest/workspaces/sar/coveragestores/sar/file.imagemosaic?configure=none&coverageName=sar" "Jakarta Commons-HttpClient/3.1" "" request-size: 883 body:

      {ZIP_FILE_BIN_CODE}

      Then I try to import the granule:
      03 Aug 12:46:44 INFO [geoserver.filters] - 127.0.0.1 "POST /geoserver/rest/imports" "Jakarta Commons-HttpClient/3.1" "" request-size: 382 body:
      {"import":{"targetWorkSpace":{"workspace":{"name":"sar"}},"targetStore":{"dataStore":{"name":"sar"}},"data":

      {"file":"/<path_to_my_tiff>/mytiff.tif","type":"file"}

      }}

      03 Aug 12:46:44 WARN [geoserver.security] - Could not find factory for store : DataStoreInfoImpl[sar]. Unable to encrypt connection parameters.
      03 Aug 12:46:44 INFO [org.geoserver] - Loaded store 'sar', disabled
      03 Aug 12:46:45 ERROR [geoserver.rest] -
      java.lang.NullPointerException
      at org.geoserver.catalog.impl.LayerInfoImpl.prefixedName(LayerInfoImpl.java:122)
      at org.geoserver.importer.ImporterUtils.resolve(ImporterUtils.java:71)
      at org.geoserver.importer.ImportTask.reattach(ImportTask.java:264)
      at org.geoserver.importer.ImportContext.reattach(ImportContext.java:270)
      at org.geoserver.importer.rest.ImportResource.createImport(ImportResource.java:188)
      at org.geoserver.importer.rest.ImportResource.handlePost(ImportResource.java:226)
      at org.restlet.Finder.handle(Finder.java:296)
      at org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:38)
      at org.restlet.Filter.doHandle(Filter.java:105)
      at org.restlet.Filter.handle(Filter.java:134)
      at org.restlet.Router.handle(Router.java:444)
      at org.geoserver.rest.RESTDispatcher$1.handle(RESTDispatcher.java:205)
      at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)
      at org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:87)

        Attachments

          Activity

            People

            • Assignee:
              aaime Andrea Aime
              Reporter:
              offtherailz Lorenzo Natali
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: