eccenca / braine

This repository contains tools developed for the project BRAINE
0 stars 0 forks source link

Renaming of image #4

Closed petrcezner closed 2 years ago

petrcezner commented 2 years ago

When the image, which deployment was tested is renamed, following exception occurs:

2022-03-30 12:27:36.610 ERROR 1872007 --- [io-7070-exec-10] com.eccenca.braine.view.ImageView        : java.nio.file.NoSuchFileException: ./files/factorio/wp5-backend-fs-onboarding-test/braine-test.zip

java.nio.file.NoSuchFileException: ./files/factorio/wp5-backend-fs-onboarding-test/braine-test.zip
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[na:na]
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[na:na]
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[na:na]
    at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[na:na]
    at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149) ~[na:na]
    at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) ~[na:na]
    at java.base/java.nio.file.Files.readAttributes(Files.java:1763) ~[na:na]
    at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1225) ~[na:na]
    at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:727) ~[na:na]
    at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844) ~[na:na]
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247) ~[na:na]
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177) ~[na:na]
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:191) ~[na:na]
    at com.eccenca.braine.view.ImageView.getZipFileEntries(ImageView.java:290) ~[classes!/:0.0.1-SNAPSHOT]
    at com.eccenca.braine.view.ImageView.getImageFiles(ImageView.java:195) ~[classes!/:0.0.1-SNAPSHOT]
    at jdk.internal.reflect.GeneratedMethodAccessor179.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:737) ~[el-api-2.2.jar!/:na]
    at javax.el.BeanELResolver.invoke(BeanELResolver.java:467) ~[el-api-2.2.jar!/:na]
    at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:246) ~[el-api-2.2.jar!/:na]
    at com.sun.el.parser.AstValue.getValue(AstValue.java:111) ~[el-impl-2.2.jar!/:na]
    at com.sun.el.parser.AstValue.getValue(AstValue.java:163) ~[el-impl-2.2.jar!/:na]
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219) ~[el-impl-2.2.jar!/:na]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UISelectItems.getValue(UISelectItems.java:129) ~[jsf-api-2.2.20.jar!/:2.2]
    at org.primefaces.renderkit.SelectRenderer.getSelectItems(SelectRenderer.java:91) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeMarkup(SelectOneMenuRenderer.java:113) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeEnd(SelectOneMenuRenderer.java:106) ~[primefaces-11.0.0.jar!/:11.0.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) ~[jsf-api-2.2.20.jar!/:2.2]
    at org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:308) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.tabview.TabViewRenderer.lambda$encodeContents$1(TabViewRenderer.java:279) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.tabview.TabView.forEachTab(TabView.java:188) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:277) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:154) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:92) ~[primefaces-11.0.0.jar!/:11.0.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) ~[jsf-api-2.2.20.jar!/:2.2]
    at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:85) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:67) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.outputpanel.OutputPanelRenderer.encodeMarkup(OutputPanelRenderer.java:92) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(OutputPanelRenderer.java:60) ~[primefaces-11.0.0.jar!/:11.0.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) ~[jsf-api-2.2.20.jar!/:2.2]
    at org.primefaces.component.datatable.feature.RowExpandFeature.encodeExpansion(RowExpandFeature.java:103) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.datatable.feature.RowExpandFeature.encode(RowExpandFeature.java:76) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:88) ~[primefaces-11.0.0.jar!/:11.0.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) ~[jsf-api-2.2.20.jar!/:2.2]
    at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:582) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at org.primefaces.component.api.UIData.visitTree(UIData.java:709) ~[primefaces-11.0.0.jar!/:11.0.0]
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIForm.visitTree(UIForm.java:371) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[jsf-api-2.2.20.jar!/:2.2]
    at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:322) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:65) ~[primefaces-11.0.0.jar!/:11.0.0]
    at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) ~[jsf-api-2.2.20.jar!/:2.2]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) ~[jsf-api-2.2.20.jar!/:2.2]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) ~[jsf-api-2.2.20.jar!/:2.2]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) ~[jsf-impl-2.2.20.jar!/:2.2.20]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) ~[jsf-api-2.2.20.jar!/:2.2]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:111) ~[primefaces-11.0.0.jar!/:11.0.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.50.jar!/:na]
    at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

Probably the reason is that in the file system, new folder is created but no data, files, etc. aren't copied into that folder. Also the application didn't delete old folder after renaming.

edgardmarx commented 2 years ago

The problem is with the directory renaming, looking into that.

edgardmarx commented 2 years ago

A quick fix to this problem is to (1) remove the file after renaming and (2) add it again.