Error changing a user from one group to another

Bug and problem reporting on Cyclos 4 version

Moderators: hugo, alexandre, rmvanarkel

Post Reply
jar
Posts: 119
Joined: Mon Apr 20, 2015 8:55 am

Error changing a user from one group to another

Post by jar »

Hi,

I am trying to change an user from one group to another and I cannot do it, because there is an error. Can you tell me what is the problem?
The error is this:

Method
UserGroupService.changeGroup

Details of JAVA error
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
at java.lang.Iterable.forEach(Iterable.java:74)
at org.eclipse.persistence.indirection.IndirectSet.forEach(IndirectSet.java:424)
at org.cyclos.impl.users.ProfileFieldHandlerImpl.purgeDisabled(ProfileFieldHandlerImpl.java:856)
at org.cyclos.impl.users.UserValidationServiceImpl.doReindex(UserValidationServiceImpl.java:1117)
at java.util.Vector.forEach(Vector.java:1275)
at org.cyclos.impl.users.UserValidationServiceImpl.reindex(UserValidationServiceImpl.java:889)
at org.cyclos.impl.users.UserGroupServiceImpl.changeGroup(UserGroupServiceImpl.java:154)
at org.cyclos.security.users.UserGroupServiceSecurity.changeGroup(UserGroupServiceSecurity.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.performInvocation(ServiceInvokerHandlerImpl.java:280)
at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.lambda$0(ServiceInvokerHandlerImpl.java:211)
at org.cyclos.impl.InvokerHandlerImpl.runAs(InvokerHandlerImpl.java:109)
at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.doInTransaction(ServiceInvokerHandlerImpl.java:211)
at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.doInTransaction(ServiceInvokerHandlerImpl.java:1)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.runEnsuringInvocationContext(TransactionHandlerImpl.java:183)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.doRun(TransactionHandlerImpl.java:109)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:159)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:80)
at sun.reflect.GeneratedMethodAccessor11452.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.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
at com.sun.proxy.$Proxy666.run(Unknown Source)
at org.cyclos.impl.InvokerHandlerImpl.performInTransaction(InvokerHandlerImpl.java:238)
at org.cyclos.impl.InvokerHandlerImpl.doRunAsInTransaction(InvokerHandlerImpl.java:187)
at org.cyclos.impl.InvokerHandlerImpl.runAsInTransaction(InvokerHandlerImpl.java:168)
at org.cyclos.impl.ServiceInvokerHandlerImpl.doInvoke(ServiceInvokerHandlerImpl.java:748)
at org.cyclos.impl.ServiceInvokerHandlerImpl.invoke(ServiceInvokerHandlerImpl.java:581)
at org.cyclos.impl.access.ServiceFacadeImpl.lambda$2(ServiceFacadeImpl.java:174)
at org.cyclos.impl.access.ServiceFacadeImpl.runInRequestContext(ServiceFacadeImpl.java:593)
at org.cyclos.impl.access.ServiceFacadeImpl.invoke(ServiceFacadeImpl.java:172)
at org.cyclos.server.spring.root.RequestServiceFactory$ServiceProxyInvocationHandler.invoke(RequestServiceFactory.java:74)
at com.sun.proxy.$Proxy906.changeGroup(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.cyclos.server.spring.webrpc.WebRpcRequestHandler.handleRequest(WebRpcRequestHandler.java:140)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:53)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cyclos.server.http.CORSFilter.doFilterInternal(CORSFilter.java:67)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cyclos.server.http.RequestDataFilter.doFilterInternal(RequestDataFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cyclos.server.http.RequestContextFilter.doFilterInternal(RequestContextFilter.java:52)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
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:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
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)
Thanks for your kind attention.
Best regards,

JAR

alexandre
Posts: 913
Joined: Wed Sep 06, 2006 9:06 am

Re: Error changing a user from one group to another

Post by alexandre »

Hi

You are using the main web channel or trying it from Rest Webservices?

regards
Alexandre Caurrinhos
Cyclos development team.

jar
Posts: 119
Joined: Mon Apr 20, 2015 8:55 am

Re: Error changing a user from one group to another

Post by jar »

Main web channel.

Some days ago, I had a similar problem and the issue was connected to phone numbers. I deleted the mobile phone number and I could move an user from one group to another. I already tried that, but this time that is not the problem.

Cyclos version 4.12.1
Thanks for your kind attention.
Best regards,

JAR

alexandre
Posts: 913
Joined: Wed Sep 06, 2006 9:06 am

Re: Error changing a user from one group to another

Post by alexandre »

Hi,

Can you try wit the latest Cyclos version (4.12.2)?
If the problem persists then you can send a database dump to info@cyclos.org with the details so we can try to reproduce.

Regards
Alexandre Caurrinhos
Cyclos development team.

jar
Posts: 119
Joined: Mon Apr 20, 2015 8:55 am

Re: Error changing a user from one group to another

Post by jar »

Now, I tried by REST API and the response is the following:

Error:
Response body

{
"exceptionType": "java.util.ConcurrentModificationException",
"kind": "general"
}

Response headers

connection: close
content-type: application/json;charset=UTF-8
date: Fri, 13 Sep 2019 21:25:15 GMT
transfer-encoding: chunked
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block

We will analyse if we can try the new version of Cyclos 4.12.2.

I think that we cannot send a dump of our database, because you are outside of European Union and GDPR does not allow us to send personal data to outside European Union (with some exceptions, I think). We would also need to comunicate to our National Central Bank that we sent you a dump of our database. We need to analyse these issues with a lawyer... However, it is very important to us to be able to receive your help with issues like this.
Thanks for your kind attention.
Best regards,

JAR

jar
Posts: 119
Joined: Mon Apr 20, 2015 8:55 am

Re: Error changing a user from one group to another

Post by jar »

I found the cause of the problem.

This user created an operator. The operator has the same phone numbers (mobile and fixed) of the user. So, this is the reason of the concurrent data. I deleted the phones from operator and I could migrate the user.

Thanks for your time.
Thanks for your kind attention.
Best regards,

JAR

alexandre
Posts: 913
Joined: Wed Sep 06, 2006 9:06 am

Re: Error changing a user from one group to another

Post by alexandre »

Hi,

It will be fixed on Cyclos version 4.12.4.
Thanks for report.

regards
Alexandre Caurrinhos
Cyclos development team.

Post Reply