1

I would like to use the ImageMosaic plugin to set up a Geoserver layer which refers to a WorldImage, just like in the official tutorial.

As a simple test case, I put a custom folder into my Geoserver data directory with one World Image (image + WorldFile + projection). When I specify the folder location to a ImageMosaic Store in Geoserver, it simply displays the error message:

Could not list layers for this store, an error occurred retrieving them: Argument "value" should not be null.

On the other hand, when I put my image into a default folder that comes with the openGeo suite (like file:data/dem/ with the Medform Digital Elevation Data), the thing works as it should.

So I suspect there is something going wrong with user rights, can anybody enlighten me?


PS: My Geoserver error log

    INFO [geoserver.web] - Getting list of coverages for saved store file:mosaic
    java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: Argument "value" should not be null.
    at org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:123)
    ...
    Caused by: java.lang.IllegalArgumentException: Argument "value" should not be null.
    at org.geotools.util.SoftValueHashMap.ensureNotNull(SoftValueHashMap.java:140)
    ...

1 Answer 1

3

The simple solution: contrary to other data sources for Geoserver, it seems that when you deal with an ImageMosaic you strictly need your data folder to be owned by user/usergroup tomcat6. So changing the user/usergroup from root to tomcat6 resolved the problem for me.

Useful commands for Linux:

  • display file ownership: $ ls -l (2nd column: owner, 3rd column: owner group)
  • change file owner: $ chown myownername myfile (add option -R for folders)
  • change file owner group: $ chgrp myownername myfile (add option -R for folders)
4
  • Heho! Which OS and Geoserver distribution do you use? I have the same issue and can't fix it. I use Geoserver 2.3.3 binary release on OpenSuse 12.3 and have only the Appache-user wwwrun, no user tomcat6. Did you change ownership of the whole geoserver's data-folder or only of the folder containing your images?
    – der Michi
    Commented Jul 3, 2013 at 17:05
  • I'm on Ubuntu 12.04 using GeoServer 2.2 (shipped with the OpenGeo Suite). I only changed the ownership of the folder containing the images. My GeoServer data folder is owned by tomcat6 by default. Maybe have a look at my original revision of the post including some more details on my failed attempts... Commented Jul 4, 2013 at 7:19
  • I played the whole day: The ImageMosaic in Geoserver 2.3.3 binary distribution works in Windows 7 and Ubuntu 10.4. Further the WAR-distribution works under Ubuntu 10.4 (Tomcat 6) under 12.4 (Tomcat 7) like a charm. Thanks!
    – der Michi
    Commented Jul 4, 2013 at 15:21
  • In case of standard ubuntu installation sudo chmod -R geoserver:geoserver mydatafolder worked. And it was not enough that all files/subfolders were under this user, also first level data subfolder had to be chown correctly.
    – JaakL
    Commented May 14, 2014 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.