[Geoserver-users] WFS-T Updating View Error

Hi all,

I'm working with versioned database (Oracle), using workspace. I'm trying to
update a table using wfs-t update request and i'm getting this error:

org.geoserver.wfs.WFSTransactionException:
{http://www.openplans.org/topp\}GIR_INFRA_NODES_TESTE is read-only
  at org.geoserver.wfs.Transaction.execute(Transaction.java:281)
  at org.geoserver.wfs.Transaction.transaction(Transaction.java:111)
  at
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
  at org.geoserver.ows.util.EMFLogger.invoke(EMFLogger.java:51)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  at $Proxy17.transaction(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at
org.geoserver.security.OperationSecurityInterceptor.invoke(OperationSecurityInterceptor.java:41)
  at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:587)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:212)

If i try to do this operation outside geoserver, for example, in a sql
manager everything works fine.

What may me the cause of this problem?

Thanks in advance.

D.Nunes
--
View this message in context: http://www.nabble.com/WFS-T-Updating-View-Error-tp22120179p22120179.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

D.Nunes ha scritto:

Hi all,

I'm working with versioned database (Oracle), using workspace. I'm trying to
update a table using wfs-t update request and i'm getting this error:

org.geoserver.wfs.WFSTransactionException:
{http://www.openplans.org/topp\}GIR_INFRA_NODES_TESTE is read-only
  at org.geoserver.wfs.Transaction.execute(Transaction.java:281)
  at org.geoserver.wfs.Transaction.transaction(Transaction.java:111)
  at
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
  at org.geoserver.ows.util.EMFLogger.invoke(EMFLogger.java:51)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  at $Proxy17.transaction(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at
org.geoserver.security.OperationSecurityInterceptor.invoke(OperationSecurityInterceptor.java:41)
  at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:587)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:212)

If i try to do this operation outside geoserver, for example, in a sql
manager everything works fine.

What may me the cause of this problem?

You have to declare a primary key for your view (something that Oracle
allows for), otherwise GeoServer won't see a way to encode a stable
feature id and won't let you make updates.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.