GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.44k stars 1.12k forks source link

QGIS failing to commit editing changes to Geonode WFS-T #1275

Closed vdeparday closed 4 years ago

vdeparday commented 10 years ago

I just did some testing (current master version) with different permission settings either with 'Any registered user' or with 'Only the following users or groups' with a local GeoNode and using the admin user in QGIS in the WFS-T dialog and I was never able to commit changes I always got an error along those lines:

Could not commit changes to layer geonode:hti_boundaries_communes_adm2_cnigs_polygon

Errors: ERROR: 1 geometries not changed.

  Provider errors:
      WFS service exception:
          {http://www.geonode.org/}hti_boundaries_communes_adm2_cnigs_polygon is read-only

I also did some testing with a vanilla geoserver: 2.4.2 binary: http://sourceforge.net/projects/geoserver/files/GeoServer/2.4.2/geoserver-2.4.2-bin.zip/download I connected with QGIS through WFS without even putting credentials and I was able to edit and save changes back to the layer sf:roads (demo dataset shipped with GeoServer) I also tried to load the same layer in GeoNode with a datastore type shapefile and it was still not working in GeoNode so it doesn't look like it is the datastore type the issue but it does seem like the issue lies within GeoNode.

(see recent thread on geonode-dev, can't hyperlink as the mailing list archives are currently not available)

Credits to Salvador Bayarri for the initial report on the mailing.

ScottEvil commented 9 years ago

This is still an issue with QGIS and at least GeoServer 2.4 and 2.5. I tested it with a QGIS dev build (2.5) and there is still an error. Mine was: Errors: ERROR: 1 geometries not changed Provider errors: empty response.

The updates made it into the dataset (I checked in MapLoom) but QGIS can't handle the return message properly and therefore you get the error. I posted to the QGIS dev lest on 1 Oct but there haven't been any replies.

fegyi001 commented 9 years ago

I recently suffered with it quite a lot.

For me this was the problem: the GeoServer was running under Windows. With Lubuntu (OSGeoLive VirtualBox) there was no errors with WFS editing.

So: GeoServer: Linux, QGIS: Windows & Linux

jj0hns0n commented 8 years ago

@afabiani can you guys look at this at some point? It may just go away with the new authentication work. Moving to 2.7

afabiani commented 8 years ago

Just tested using latest GeoNode 2.5 and GeoServer 2.9

It works both using shapefile or PostGis based layers

image

image

Japhetho commented 4 years ago

I'm still experiencing this issue despite using SPC Geonode 3.0 that I installed with docker. I am able to access the layers from Geonode as WFS and view them in QGIS. However whenever I edit any of the layers and save, QGIS throws a "Could not commit changes to layer, WFS service exception: java.lang.NullPointerException". In Geoserver logs, the error is java.lang.NullPointerException at org.geoserver.wfs.Transaction.getDatastoreTransaction(Transaction.java:535) at org.geoserver.wfs.Transaction.execute(Transaction.java:138) at org.geoserver.wfs.Transaction.transaction(Transaction.java:92) ... 117 more I've googled for solutions for three days now and none of the suggested solutions seems to work. Any assistance will be highly appreciated.

The full error is: 2020-02-26 07:02:42,576 WARN [geotools.xsd] - Sax parser property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' not recognized. Xerces version is incompatible. 2020-02-26 07:02:42,606 ERROR [geoserver.ows] - org.geoserver.wfs.WFSException: java.lang.NullPointerException at org.geoserver.wfs.Transaction.transaction(Transaction.java:98) at org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:147) at sun.reflect.GeneratedMethodAccessor1089.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:28) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy159.transaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor1317.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:879) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:265) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875) 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:73) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:66) at org.geoserver.monitor.MonitorFilter.doFilter(MonitorFilter.java:140) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:66) at org.geoserver.flow.controller.IpBlacklistFilter.doFilter(IpBlacklistFilter.java:89) 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.oauth2.GeoServerOAuthAuthenticationFilter.doFilter(GeoServerOAuthAuthenticationFilter.java:174) 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:107) 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:357) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) 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.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:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) 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.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at org.geoserver.wfs.Transaction.getDatastoreTransaction(Transaction.java:535) at org.geoserver.wfs.Transaction.execute(Transaction.java:138) at org.geoserver.wfs.Transaction.transaction(Transaction.java:92) ... 117 more

t-book commented 4 years ago

@Japhetho can you somehow capture the payload when saving the wfs? doing so you could try to replicate the issue with a simple curl request and gather more information. Further, can you could provide some test data (shp)?

Japhetho commented 4 years ago

@t-book The shapefile I've been trying to edit and save is nairobi_points.zip

bszady commented 4 years ago

I have the same problem, any indications?

Japhetho commented 4 years ago

@bszady A temporary solution would be, if you're using Geoserver 2.16.2, downgrade it to version 2.15.4 and then try editing the later again. That's how I solved the issue temporarily when I had a similar problem.

bszady commented 4 years ago

@Japhetho thanks a lot, I will try... I have tried to change roles in service wfs.transactions in geoserver. Without results....

gannebamm commented 4 years ago

If this is still an open issue @bszady @Japhetho could you please open a new ticket with a description how to reproduce it?

Thanks, we will close this now.