metasfresh / metasfresh-webui-api-legacy

metasfresh webui API server
GNU General Public License v3.0
30 stars 32 forks source link

Warehouse cannot be created / opening window causes error #1163

Closed metas-dh closed 5 years ago

metas-dh commented 5 years ago

Is this a bug or feature request?

Bug

What is the current behavior?

You cannot create a new warehouse, opening the window in WebUI causes error: "404 Document type not found."

``` {timestamp: 1552380766.494, status: 404, error: "Not Found",…} error: "Not Found" exception: "de.metas.ui.web.window.exceptions.DocumentLayoutBuildException" message: "" path: "/rest/api/documentView/139/layout" status: 404 timestamp: 1552380766.494 trace: ["de.metas.ui.web.window.exceptions.DocumentLayoutBuildException: ",…] [0 … 99] 0: "de.metas.ui.web.window.exceptions.DocumentLayoutBuildException: " 1: " at de.metas.ui.web.window.exceptions.DocumentLayoutBuildException.wrapIfNeeded(DocumentLayoutBuildException.java:59)" 2: " at de.metas.ui.web.window.descriptor.factory.standard.DefaultDocumentDescriptorFactory.getDocumentDescriptor(DefaultDocumentDescriptorFactory.java:72)" 3: " at de.metas.ui.web.view.SqlViewFactory.createViewLayout(SqlViewFactory.java:253)" 4: " at de.metas.ui.web.view.SqlViewFactory.lambda$getViewLayout$6(SqlViewFactory.java:248)" 5: " at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:5065)" 6: " at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)" 7: " at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)" 8: " at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)" 9: " at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)" 10: " at com.google.common.cache.LocalCache.get(LocalCache.java:4154)" 11: " at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:5060)" 12: " at de.metas.cache.CCache.get(CCache.java:504)" 13: " at de.metas.cache.CCache.getOrLoad(CCache.java:538)" 14: " at de.metas.ui.web.view.SqlViewFactory.getViewLayout(SqlViewFactory.java:248)" 15: " at de.metas.ui.web.view.ViewsRepository.getViewLayout(ViewsRepository.java:236)" 16: " at sun.reflect.GeneratedMethodAccessor290.invoke(Unknown Source)" 17: " at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" 18: " at java.lang.reflect.Method.invoke(Method.java:498)" 19: " at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)" 20: " at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)" 21: " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)" 22: " at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)" 23: " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)" 24: " at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)" 25: " at com.sun.proxy.$Proxy126.getViewLayout(Unknown Source)" 26: " at de.metas.ui.web.view.ViewRestController.getViewLayout(ViewRestController.java:246)" 27: " at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)" 28: " at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" 29: " at java.lang.reflect.Method.invoke(Method.java:498)" 30: " at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)" 31: " at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)" 32: " at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)" 33: " at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)" 34: " at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)" 35: " at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)" 36: " at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)" 37: " at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)" 38: " at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)" 39: " at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)" 40: " at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)" 41: " at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)" 42: " at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)" 43: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)" 44: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 45: " at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)" 46: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 47: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 48: " at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)" 49: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 50: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 51: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 52: " at de.metas.ui.web.config.WebConfig$1.doFilter(WebConfig.java:82)" 53: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 54: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 55: " at de.metas.ui.web.config.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:89)" 56: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 57: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 58: " at de.metas.ui.web.config.CORSFilter.doFilter(CORSFilter.java:79)" 59: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 60: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 61: " at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)" 62: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 63: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 64: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 65: " at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)" 66: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 67: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 68: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 69: " at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)" 70: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 71: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 72: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 73: " at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)" 74: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 75: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 76: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 77: " at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)" 78: " at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)" 79: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 80: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 81: " at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)" 82: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 83: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 84: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 85: " at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)" 86: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 87: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 88: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 89: " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)" 90: " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)" 91: " at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)" 92: " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)" 93: " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)" 94: " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)" 95: " at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)" 96: " at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)" 97: " at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)" 98: " at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)" 99: " at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)" [100 … 120] 100: " at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)" 101: " at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)" 102: " at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)" 103: " at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)" 104: " at java.lang.Thread.run(Thread.java:748)" 105: "Caused by: java.lang.NullPointerException" 106: " at de.metas.ui.web.window.descriptor.factory.standard.ADTabLoader.load(ADTabLoader.java:69)" 107: " at de.metas.ui.web.window.descriptor.factory.standard.DefaultDocumentDescriptorLoader.load(DefaultDocumentDescriptorLoader.java:119)" 108: " at de.metas.ui.web.window.descriptor.factory.standard.DefaultDocumentDescriptorFactory.lambda$getDocumentDescriptor$0(DefaultDocumentDescriptorFactory.java:68)" 109: " at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:5065)" 110: " at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)" 111: " at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)" 112: " at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)" 113: " at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)" 114: " at com.google.common.cache.LocalCache.get(LocalCache.java:4154)" 115: " at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:5060)" 116: " at de.metas.cache.CCache.get(CCache.java:504)" 117: " at de.metas.cache.CCache.getOrLoad(CCache.java:538)" 118: " at de.metas.ui.web.window.descriptor.factory.standard.DefaultDocumentDescriptorFactory.getDocumentDescriptor(DefaultDocumentDescriptorFactory.java:68)" 119: " ... 102 more" 120: "" ```

Which are the steps to reproduce?

Try and see.

What is the expected or desired behavior?

Shall work.

metas-ts commented 5 years ago

Dev-test

click on "New Warehouse" in the menu-tree:

![image](https://user-images.githubusercontent.com/1264789/54200929-bad43f80-44cc-11e9-9366-739fc730fd2a.png)

👍 creating a new WH works:

![image](https://user-images.githubusercontent.com/1264789/54201007-ec4d0b00-44cc-11e9-916f-bd9a00d0c9fc.png)

👍 adding a locator also works (sortof proving that the M_Warehouse record was really created)

![image](https://user-images.githubusercontent.com/1264789/54201172-464dd080-44cd-11e9-81a9-bb5dfb6400a5.png)
metas-ts commented 5 years ago

🍒 picked commit https://github.com/metasfresh/metasfresh-webui-api/pull/1164/commits/08778398bdeccdf514757718aaba05431ac2b98c into branch release

metas-dh commented 5 years ago

Results of IT1 tested in mf15