Role Create / Edit

Hi Team ,

Currently we are using Cuba 2.7.4 we are facing issue with the role-edit/create

below is the exception that is thrown from the Framework

   java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.base/java.util.TimSort.mergeHi(TimSort.java:903)
	at java.base/java.util.TimSort.mergeAt(TimSort.java:520)
	at java.base/java.util.TimSort.mergeForceCollapse(TimSort.java:461)
	at java.base/java.util.TimSort.sort(TimSort.java:254)
	at java.base/java.util.Arrays.sort(Arrays.java:1515)
	at java.base/java.util.ArrayList.sort(ArrayList.java:1749)
	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:392)
	at java.base/java.util.stream.DistinctOps$1$2.end(DistinctOps.java:168)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at com.haulmont.cuba.gui.config.PermissionConfig$Item.walkAllScreens(PermissionConfig.java:162)
	at com.haulmont.cuba.gui.config.PermissionConfig$Item.compileScreens(PermissionConfig.java:107)
	at com.haulmont.cuba.gui.config.PermissionConfig$Item.<init>(PermissionConfig.java:89)
	at com.haulmont.cuba.gui.config.PermissionConfig$Item.<init>(PermissionConfig.java:77)
	at com.haulmont.cuba.gui.config.PermissionConfig.getItem(PermissionConfig.java:403)
	at com.haulmont.cuba.gui.config.PermissionConfig.getScreens(PermissionConfig.java:415)
	at com.haulmont.cuba.gui.app.security.ds.ScreenPermissionTreeDatasource.getPermissions(ScreenPermissionTreeDatasource.java:41)
	at com.haulmont.cuba.gui.app.security.ds.BasicPermissionTreeDatasource.loadTree(BasicPermissionTreeDatasource.java:50)
	at com.haulmont.cuba.gui.data.impl.AbstractTreeDatasource.loadData(AbstractTreeDatasource.java:49)
	at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.refresh(CollectionDatasourceImpl.java:165)
	at com.haulmont.cuba.gui.data.impl.CollectionDatasourceImpl.refresh(CollectionDatasourceImpl.java:123)
	at com.haulmont.cuba.gui.app.security.role.edit.tabs.ScreenPermissionsFrame.loadPermissions(ScreenPermissionsFrame.java:224)
	at com.haulmont.cuba.gui.app.security.role.edit.RoleEditor.postInit(RoleEditor.java:95)
	at com.haulmont.cuba.gui.components.AbstractEditor.setItem(AbstractEditor.java:160)
	at com.haulmont.cuba.gui.components.AbstractEditor.setEntityToEdit(AbstractEditor.java:451)
	at com.haulmont.cuba.web.sys.WebScreens.openEditor(WebScreens.java:1209)
	at com.haulmont.cuba.gui.components.HasWindowManager.openEditor(HasWindowManager.java:138)
	at com.haulmont.cuba.gui.components.actions.EditAction.internalOpenEditor(EditAction.java:288)
	at com.haulmont.cuba.gui.components.actions.EditAction.actionPerform(EditAction.java:232)
	at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:67)
	at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76)
	at com.vaadin.ui.Button$1.click(Button.java:57)
	at jdk.internal.reflect.GeneratedMethodAccessor400.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215)
	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.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93)
	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:200)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
	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:678)
	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:836)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)

What is the root cause for that ?

Your urgent support as we are facing this on pre-prod environment

Thanks

Hello!

Sorry for the long delay, maybe do you mean 7.2.5 version? Because this bug is reproduced only in 7.2.5 version and will be fixed in the next bugfix release. See issue.

Thanks @Pinyazhin,

Yes it is 7.2.5 version , the wear thing is that it is working sometimes without any reason
hope that bugs is fixed as soon as we are going for production within week .

Thanks

The issue is fixed in CUBA 7.2.6 which will be available in the next couple of days.