Restful api creates user error

Hi,Everybody is good

Use the Restful api to create a user XWiki error, what is the cause of this?

Thank you

2019-03-13 11:24:21,214 [http://localhost:8080/rest/wikis/xwiki/spaces/XWiki/pages/wiki04?objects=true] WARN  w.i.AutomaticWatchModeListener - Failed to watch document [xwiki:XWiki.wiki04] for user [xwiki:XWiki.admin] 
org.xwiki.notifications.NotificationException: Failed to get the notification preferences scope for the user [xwiki:XWiki.admin].
	at org.xwiki.notifications.filters.internal.DefaultModelBridge.getFilterPreferences(DefaultModelBridge.java:161)
	at org.xwiki.notifications.filters.internal.CachedModelBridge.getFilterPreferences(CachedModelBridge.java:81)
	at org.xwiki.notifications.filters.internal.UserProfileNotificationFilterPreferenceProvider.getFilterPreferences(UserProfileNotificationFilterPreferenceProvider.java:59)
	at org.xwiki.notifications.filters.internal.DefaultNotificationFilterManager.getFilterPreferences(DefaultNotificationFilterManager.java:154)
	at org.xwiki.notifications.filters.watch.WatchedLocationReference.isWatched(WatchedLocationReference.java:93)
	at org.xwiki.notifications.filters.watch.internal.DefaultWatchedEntitiesManager.entityIsAlreadyInDesiredState(DefaultWatchedEntitiesManager.java:140)
	at org.xwiki.notifications.filters.watch.internal.DefaultWatchedEntitiesManager.handleEntity(DefaultWatchedEntitiesManager.java:96)
	at org.xwiki.notifications.filters.watch.internal.DefaultWatchedEntitiesManager.watchEntity(DefaultWatchedEntitiesManager.java:64)
	at org.xwiki.notifications.filters.watch.internal.AutomaticWatchModeListener.documentModifiedHandler(AutomaticWatchModeListener.java:135)
	at org.xwiki.notifications.filters.watch.internal.AutomaticWatchModeListener.onEvent(AutomaticWatchModeListener.java:106)
	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1801)
	at com.xpn.xwiki.api.Document.saveDocument(Document.java:2521)
	at com.xpn.xwiki.api.Document.save(Document.java:2407)
	at org.xwiki.rest.internal.resources.pages.ModifiablePageResource.putPage(ModifiablePageResource.java:47)
	at org.xwiki.rest.internal.resources.pages.PageResourceImpl.putPage(PageResourceImpl.java:70)
	at sun.reflect.GeneratedMethodAccessor557.invoke(Unknown Source	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:140)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
	at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:77)
	at org.restlet.Application.handle(Application.java:385)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Router.doHandle(Router.java:422)
	at org.restlet.routing.Router.handle(Router.java:641)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Router.doHandle(Router.java:422)
	at org.restlet.routing.Router.handle(Router.java:641)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
	at org.restlet.Component.handle(Component.java:408)
	at org.restlet.Server.handle(Server.java:507)
	at org.restlet.engine.connector.ServerHelper.handle(ServerHelper.java:63)
	at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:143)
	at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1117)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter.doFilter(XWikiCon	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
	at org.apac2019-03-13 11:24:22,898 [http://localhost:8080/rest/wikis/xwiki/spaces/XWiki/pages/XWikiAllGroup/objects] WARN  w.i.AutomaticWatchModeListener - Failed to watch document [xwiki:XWiki.XWikiAllGroup] for user [xwiki:XWiki.admin] 
org.xwiki.notifications.NotificationException: Failed to get the notification preferences scope for the user [xwiki:XWiki.admin].
	at org.xwiki.notifications.filters.internal.DefaultModelBridge.getFilterPreferences(DefaultModelBridge.java:161)
	at org.xwiki.notifications.filters.internal.CachedModelBridge.getFilterPreferences(CachedModelBridge.java:81)
	at org.xwiki.notifications.filters.internal.UserProfileNotificationFilterPreferenceProvider.getFilterPreferences(UserProfileNotificationFilterPreferenceProvider.java:59)
	at org.xwiki.notifications.filters.internal.DefaultNotificationFilterManager.getFilterPreferences(DefaultNotificationFilterManager.java:154)
	at org.xwiki.notifications.filters.watch.WatchedLocationReference.isWatched(WatchedLocationReference.java:93)
	at org.xwiki.notifications.filters.watch.internal.DefaultWatchedEntitiesManager.entityIsAlreadyInDesiredState(DefaultWatchedEntitiesManager.java:140)
	at org.xwiki.notifications.filters.watch.internal.DefaultWatchedEntitiesManager.handleEntity(DefaultWatchedEntitiesManager.java:96)
	at org.xwiki.notifications.filters.watch.internal.DefaultWatchedEntitiesManager.watchEntity(DefaultWatchedEntitiesManager.java:64)
	at org.xwiki.notifications.filters.watch.internal.AutomaticWatchModeListener.documentModifiedHandler(AutomaticWatchModeListener.java:135)
	at org.xwiki.notifications.filters.watch.internal.AutomaticWatchModeListener.onEvent(AutomaticWatchModeListener.java:106)
	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1803)
	at com.xpn.xwiki.api.Document.saveDocument(Document.java:2521)
	at com.xpn.xwiki.	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:140)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
	at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:77)
	at org.restlet.Application.handle(Application.java:385)
	at org.restlet.routing.Filter.doHandle(Filter.java:150)
	at org.restlet.routing.Filter.handle(Filter.java:197)
	at org.restlet.routing.Router.doHandle(Router.java:422)
	at org.restlet.routing.Router.handle(Router.java:641)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apac	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: No enum constant org.xwiki.notifications.filters.NotificationFilterType.
	at java.lang.Enum.valueOf(Enum.java:238)
	at org.xwiki.notifications.filters.NotificationFilterType.valueOf(NotificationFilterType.java:29)
	at org.xwiki.notifications.filters.internal.DefaultModelBridge.getFilterPreferences(DefaultModelBridge.java:133)
	... 96 common frames omitted

Please could you:

  • specify which version you are using
  • explain which REST API you use exactly (copy paste the URL and the parameters if you could)

Thanks,

hi,
I am using version 10.4,

curl -v -u admin:admin -X POST -d “className=XWiki.XWikiGroups&property#member=XWiki.wiki04”
http://localhost:8080/rest/wikis/xwiki/spaces/XWiki/pages/XWikiAllGroup/objects