[Geoserver-users] Manual creation of Image Mosaic .properties and sample_image files?

I have been creating image mosaics using geoserver gui and noticed that it
takes along time to create the .qix file. I used a solution on one of the
forums that suggested running the following command in the
geoserver/WEB-INF/lib directory

java -cp gt-shapefile-12.0.jar org.geotools.data.shapefile.ShapeFileIndexer
{path_to_shapefile}

This created the .qix file very fast, but when I tried to use the shapefile
(.qix included) I was getting the following error: "Could not list layers
for this store, an error occurred retrieving them: Failed to create reader
from {path_to_shapefile} and hints null"

I ran some tests where I had geoserver create the image mosaic .properties
and sample_image files, then removed the image mosaic store and substitute
my shapefile with the geoserver created shapefile, which I created using
gdaltindex and it worked. I removed the store and also the sample_image,
then tried to add a new image mosaic which it displayed the "Add a new
layer" page and the option to publish it, but when I selected the "Publish"
link I received the following error:

java.lang.RuntimeException: Error occurred while building the resources for
the configuration page
  at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:330)
  at
org.geoserver.web.data.layer.NewLayerPage$7.onClick(NewLayerPage.java:261)
  at
org.geoserver.web.wicket.SimpleAjaxLink$1.onClick(SimpleAjaxLink.java:46)
  at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:68)
  at
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
  at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
  at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:119)
  at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
  at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
  at
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
  at
org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
  at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
  at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
  at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
  at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
  at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
  at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
  at
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
  at
org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
  at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
  at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
  at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
  at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
  at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
  at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
  at
org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:116)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
  at
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
  at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
  at
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
  at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
  at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:76)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
  at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
  at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at org.mortbay.jetty.Server.handle(Server.java:324)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
  at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
  at
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:620)
  at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
  at
org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1390)
  at
org.geotools.gce.imagemosaic.RasterLayerResponse.processRequest(RasterLayerResponse.java:1228)
  at
org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:1194)
  at org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:1143)
  at
org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:863)
  at
org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:842)
  at
org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:226)
  at
org.geoserver.catalog.SingleGridCoverage2DReader.read(SingleGridCoverage2DReader.java:141)
  at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:968)
  at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:856)
  at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:320)
  ... 98 more
Caused by: com.vividsolutions.jts.util.AssertionFailedException
  at com.vividsolutions.jts.util.Assert.isTrue(Assert.java:68)
  at com.vividsolutions.jts.util.Assert.isTrue(Assert.java:54)
  at
org.geotools.gce.imagemosaic.RasterLayerResponse.createBlankResponse(RasterLayerResponse.java:1713)
  at
org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1387)
  ... 108 more

when I restart geoserver and add the sample_image it allows me to publish
the layer with no issues. What is the sample_image? gdalinfo does not
recognize the format of the sample_image, so it appears it is something that
the jvm has generated. If possible is there a java -cp
gt-imagemosaic-12.0.jar {some_class} command that I can run to generate the
properties file and sample_image?

Thanks in advance.

Respectfully,
Dan

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Manual-creation-of-Image-Mosaic-properties-and-sample-image-files-tp5173421.html
Sent from the GeoServer - User mailing list archive at Nabble.com.