lorenzo.pini ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5cf6252deba18b0ea85a70d4
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYWI3MTYwNjliNTJmNGFmODg3ZWIwMGJhZWNmMGU0MjgiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-9571?atlOrigin=eyJpIjoiYWI3MTYwNjliNTJmNGFmODg3ZWIwMGJhZWNmMGU0MjgiLCJwIjoiaiJ9
 ) GEOS-9571 ( 
https://osgeo-org.atlassian.net/browse/GEOS-9571?atlOrigin=eyJpIjoiYWI3MTYwNjliNTJmNGFmODg3ZWIwMGJhZWNmMGU0MjgiLCJwIjoiaiJ9
 ) Importer fails to init context with simple setup ( 
https://osgeo-org.atlassian.net/browse/GEOS-9571?atlOrigin=eyJpIjoiYWI3MTYwNjliNTJmNGFmODg3ZWIwMGJhZWNmMGU0MjgiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.16.2, 2.18-RC Assignee: Unassigned 
Attachments: 1.tif, 2.tif Components: Importer Created: 10/Apr/20 4:00 PM 
Environment:

Windows

Priority: Medium Reporter: lorenzo.pini ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5cf6252deba18b0ea85a70d4
 )

On Windows with the official release binary package

This is a bug I'm facing while trying to reproduce another one

I set up 2 simple mosaics with a single file in them.
Then I put another file in one of them and tried to use the importer to add it 
to the index.

The REST response was INIT_ERROR and the following stack trace was printed:

0 apr 15:33:59 WARN [geoserver.security] - Could not find factory for store : 
DataStoreInfoImpl[m]. Unable to encrypt connection parameters.
10 apr 15:33:59 ERROR [geoserver.importer] - Failed to init the context
java.lang.NullPointerException
       at org.geoserver.importer.SpatialFile.prepare(SpatialFile.java:103)
       at org.geoserver.importer.Importer.addTasks(Importer.java:488)
       at org.geoserver.importer.Importer.init(Importer.java:456)
       at 
org.geoserver.importer.rest.ImportController.createImport(ImportController.java:223)
       at 
org.geoserver.importer.rest.ImportController.postImports(ImportController.java:72)
       at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
       at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
       at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
       at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
       at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:893)
       at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:798)
       at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
       at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
       at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
       at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
       at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
       at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
       at 
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:26)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:69)
       at 
org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:70)
       at 
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:66)
       at 
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:41)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:37)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
       at 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
       at 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
       at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
       at 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
       at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
       at 
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:51)
       at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
       at 
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
       at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
       at 
org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:81)
       at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
       at 
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
       at 
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
       at 
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
       at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
       at 
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
       at 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
       at 
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:142)
       at 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
       at 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:101)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:77)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:42)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
       at 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
       at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
       at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
       at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
       at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
       at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
       at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
       at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
       at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
       at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
       at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
       at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
       at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
       at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
       at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
       at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
       at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
       at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
       at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152)
       at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
       at org.eclipse.jetty.server.Server.handle(Server.java:505)
       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
       at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
       at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
       at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
       at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
       at 
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
       at java.base/java.lang.Thread.run(Thread.java:834)

To reproduce:

* Install Importer Plugin
* Download the attached samples
* Create the folders "A" and "B" and put a copy of 1.tif in each one
* Create workspace "a"
* Create workspace "b"
* Create an Imagemosaic Datastore "m" in workspace "a" pointing to folder "A"
* Publish layer a:A
* Create an Imagemosaic Datastore "m" in workspace "b" pointing to folder "B"
* Publish layer b:B
* Put the file 2.tif in folder B
* Send a POST request to http://localhost:8080/geoserver/rest/imports with the 
following body

{
 "import": {
   "targetStore": {
     "dataStore": {
       "name": "m"
     }
   },
   "data": {
       "type": "file",
       "file": "2.tif"
     },
   "targetWorkspace": {
     "workspace": {
       "name": "b"
     }
   }
 }
}

( 
https://osgeo-org.atlassian.net/browse/GEOS-9571#add-comment?atlOrigin=eyJpIjoiYWI3MTYwNjliNTJmNGFmODg3ZWIwMGJhZWNmMGU0MjgiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-9571#add-comment?atlOrigin=eyJpIjoiYWI3MTYwNjliNTJmNGFmODg3ZWIwMGJhZWNmMGU0MjgiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124- 
sha1:185bad4 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to