Integer attribute + Entity Log -> IllegalFormatConversionException: d != java.lang.String

I activated the entity log and get an error when the system tries to log the change: (I did nothing fancy in the project, just a normal entity with a big integer number and the entity log)

CUBA 7.2.5

This looks like a platform bug to me.

Stacktrace
10:28:10.577 WARN  c.h.cuba.security.app.EntityLog         - Unable to log entity com.example.entity.user.MyUser-0050f802-3288-9704-c80d-1c8490129044 [managed], id=0050f802-3288-9704-c80d-1c8490129044
java.util.IllegalFormatConversionException: d != java.lang.String
	at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) ~[na:1.8.0_252]
	at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793) ~[na:1.8.0_252]
	at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747) ~[na:1.8.0_252]
	at java.util.Formatter.format(Formatter.java:2520) ~[na:1.8.0_252]
	at java.util.Formatter.format(Formatter.java:2455) ~[na:1.8.0_252]
	at java.lang.String.format(String.java:2940) ~[na:1.8.0_252]
	at com.haulmont.cuba.core.global.MetadataTools.getInstanceName(MetadataTools.java:219) ~[cuba-global-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.security.app.EntityLog.internalRegisterModify(EntityLog.java:603) ~[cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.security.app.EntityLog.registerModify(EntityLog.java:550) ~[cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.core.sys.persistence.PersistenceImplSupport$OnSaveEntityVisitor.visit(PersistenceImplSupport.java:585) [cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.core.sys.persistence.PersistenceImplSupport.beforeStore(PersistenceImplSupport.java:237) [cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.core.sys.persistence.PersistenceImplSupport.traverseEntities(PersistenceImplSupport.java:223) [cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.core.sys.persistence.PersistenceImplSupport$ContainerResourceSynchronization.beforeCommit(PersistenceImplSupport.java:409) [cuba-core-7.2.5.jar:7.2.5]
	at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:96) [spring-tx-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:920) [spring-tx-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:728) [spring-tx-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:712) [spring-tx-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.haulmont.cuba.core.sys.TransactionImpl.commit(TransactionImpl.java:104) [cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.core.app.RdbmsStore.commit(RdbmsStore.java:552) [cuba-core-7.2.5.jar:7.2.5]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.sun.proxy.$Proxy362.commit(Unknown Source) [na:na]
	at com.haulmont.cuba.core.app.DataManagerBean.commit(DataManagerBean.java:188) [cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.core.app.DataServiceBean.commit(DataServiceBean.java:41) [cuba-core-7.2.5.jar:7.2.5]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:90) [cuba-core-7.2.5.jar:7.2.5]
	at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.sun.proxy.$Proxy116.commit(Unknown Source) [na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252]
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94) [cuba-core-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:159) [cuba-web-7.2.5.jar:7.2.5]
	at com.sun.proxy.$Proxy244.commit(Unknown Source) [na:na]
	at com.haulmont.cuba.client.sys.DataManagerClientImpl.commit(DataManagerClientImpl.java:100) [cuba-client-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.model.impl.DataContextImpl.commitToDataManager(DataContextImpl.java:673) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.model.impl.DataContextImpl.performCommit(DataContextImpl.java:651) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.model.impl.DataContextImpl.commit(DataContextImpl.java:614) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.screen.StandardEditor.lambda$commitChanges$4(StandardEditor.java:423) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.screen.StandardEditor.commitChanges(StandardEditor.java:438) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.screen.StandardEditor.closeWithCommit(StandardEditor.java:587) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.screen.StandardEditor.commitAndClose(StandardEditor.java:553) [cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.gui.components.actions.BaseAction.actionPerform(BaseAction.java:222) ~[cuba-gui-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:67) ~[cuba-web-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76) ~[cuba-web-widgets-7.2.5.jar:na]
	at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) ~[vaadin-server-8.9.2-10-cuba.jar:8.9.2-10-cuba]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) ~[cuba-web-7.2.5.jar:7.2.5]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) ~[cuba-web-7.2.5.jar:7.2.5]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) ~[cuba-web-7.2.5.jar:7.2.5]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:9.0.27]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[catalina.jar:9.0.27]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[catalina.jar:9.0.27]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[catalina.jar:9.0.27]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[catalina.jar:9.0.27]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.27]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_252]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.27]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_252]

Debug information. In java.util.Formatter

        private void printInteger(Object var1, Locale var2) throws IOException {
            if (var1 == null) {
                this.print("null");
            } else if (var1 instanceof Byte) {
                this.print((Byte)var1, var2);
            } else if (var1 instanceof Short) {
                this.print((Short)var1, var2);
            } else if (var1 instanceof Integer) {
                this.print((Integer)var1, var2);
            } else if (var1 instanceof Long) {
                this.print((Long)var1, var2);
            } else if (var1 instanceof BigInteger) {
                this.print((BigInteger)var1, var2);
            } else {
                this.failConversion(this.c, var1); // var1 has the value "1,345" here, but is actually an integer!
            }

        }

image

Hi,
It looks like one of entities in your project has invalid @NamePattern format string ("%d", and something not suitable in the right part).