Exception Not found format strings for locale und

Hi,

When I edit the data of an entity by the application via the Edit button, I get the following exception: java.lang.IllegalArgumentException: Not found format strings for locale und. This only happens to this user, if logged on as the admin user this error does not happen. In the side menu you will see GMT (GMT + 00: 00) for that user too. In the sec_user table the time_zone_auto column was false, but this was changed and the error still occurs. I think it is related to timezone but I could not identify the cause of the error.

Any help is welcome, grateful!

java.lang.IllegalArgumentException: Not found format strings for locale und
	at com.haulmont.chile.core.datatypes.Datatypes.getFormatStringsNN(Datatypes.java:137)
	at com.haulmont.cuba.web.gui.components.WebDateField.<init>(WebDateField.java:93)
	at sun.reflect.GeneratedConstructorAccessor169.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at com.haulmont.cuba.web.gui.WebComponentsFactory.createComponent(WebComponentsFactory.java:152)
	at com.haulmont.cuba.web.gui.WebComponentsFactory.createComponent(WebComponentsFactory.java:173)
	at com.haulmont.cuba.gui.components.FieldGroupFieldFactoryImpl.createDateField(FieldGroupFieldFactoryImpl.java:237)
	at com.haulmont.cuba.gui.components.FieldGroupFieldFactoryImpl.createFieldComponent(FieldGroupFieldFactoryImpl.java:106)
	at com.haulmont.cuba.gui.components.FieldGroupFieldFactoryImpl.createField(FieldGroupFieldFactoryImpl.java:68)
	at com.haulmont.cuba.web.gui.components.WebFieldGroup.bindDeclarativeFieldConfigs(WebFieldGroup.java:466)
	at com.haulmont.cuba.web.gui.components.WebFieldGroup.bind(WebFieldGroup.java:451)
	at com.haulmont.cuba.gui.xml.layout.loaders.FieldGroupLoader.loadComponent(FieldGroupLoader.java:177)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponents(ContainerLoader.java:37)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponentsAndExpand(ContainerLoader.java:76)
	at com.haulmont.cuba.gui.xml.layout.loaders.AbstractBoxLoader.loadComponent(AbstractBoxLoader.java:46)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponents(ContainerLoader.java:37)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponentsAndExpand(ContainerLoader.java:76)
	at com.haulmont.cuba.gui.xml.layout.loaders.GroupBoxLayoutLoader.loadComponent(GroupBoxLayoutLoader.java:60)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponents(ContainerLoader.java:37)
	at com.haulmont.cuba.gui.xml.layout.loaders.ScrollBoxLayoutLoader.loadComponent(ScrollBoxLayoutLoader.java:93)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponents(ContainerLoader.java:37)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponentsAndExpand(ContainerLoader.java:76)
	at com.haulmont.cuba.gui.xml.layout.loaders.WindowLoader.loadComponent(WindowLoader.java:82)
	at com.haulmont.cuba.gui.WindowManager.createWindow(WindowManager.java:417)
	at com.haulmont.cuba.gui.WindowManager.openEditor(WindowManager.java:702)
	at com.haulmont.cuba.web.WebWindowManager.openEditor(WebWindowManager.java:159)
	at com.haulmont.cuba.gui.components.WindowDelegate.openEditor(WindowDelegate.java:250)
	at com.haulmont.cuba.web.gui.WebWindow.openEditor(WebWindow.java:445)
	at com.haulmont.cuba.gui.components.actions.EditAction.internalOpenEditor(EditAction.java:274)
	at com.haulmont.cuba.gui.components.actions.EditAction.actionPerform(EditAction.java:223)
	at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44)
	at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36)
	at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
	at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
	at com.vaadin.ui.Button.fireClick(Button.java:377)
	at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:54)
	at com.vaadin.ui.Button$1.click(Button.java:54)
	at sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:444)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:409)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:385)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:290)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:197)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Hi
check the TIME_ZONE column of the SEC_USER table. If it contains something like “und” for the problematic user, then you have found the source of your problem…

Bye
Paolo

Hi Paolo,

Thanks for the response but the time_zone column is empty for this and all other users.

Best regards.

Hi,

What is in the Language field of this user?

Hi,

The field is empty.

The problem is hardly related to timezones, it is rather about locale. The user gets this mysterious “und” locale for some reason. Please look at the rules that are used to assign a locale to a user: https://doc.cuba-platform.com/manual-6.6/app_properties_reference.html#cuba.localeSelectVisible. I think you should check the cuba.availableLocales and cuba.localeSelectVisible app properties in your app.properties and web-app.properties files.

Problem solved!

I was really related to the language, I put the pt language in the language_ column for this user and everything worked.

The cuba.availableLocales and cuba.localeSelectVisible properties in the app.properties and web-app.properties files are as follows:

cuba.availableLocales = English|en;Portuguese|pt
cuba.localeSelectVisible = false

In this case it was to be picking up the language of the operating system because the field was empty. Strange because there are other users with the same configuration and this problem does not happen.

The fact that the GMT appears in the menu is described here https://doc.cuba-platform.com/manual-6.6/timeZone.html, as it only appears to this user I thought it was related to the error.

Thanks for the attention Konstantin!