У меня есть загрузочное приложение Spring, в которое я загружаю несколько файлов и после отправки оно преобразует все файлы в byte[]
и прикрепляет эти файлы к электронной почте. Работает нормально на местном. Когда я загружаю файлы размером более 5 МБ, но они не работают нормально после загрузки их в Google Cloud Platform.
Ниже приводится ошибка, которую я получаю.
2020-04-17 02:07:13 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\njava.lang.NullPointerException
2020-04-17 02:07:13 default[20200416t214835] at taxtown.taxfile.controller.TaxRestController.getFormData(TaxRestController.java:238)
2020-04-17 02:07:13 default[20200416t214835] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2020-04-17 02:07:13 default[20200416t214835] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2020-04-17 02:07:13 default[20200416t214835] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
2020-04-17 02:07:13 default[20200416t214835] at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
2020-04-17 02:07:13 default[20200416t214835] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.lang.Thread.run(Thread.java:834)
2020-04-17 02:07:13 default[20200416t214835] --------------Excepiton is----------null
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.593 INFO 10 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.594 INFO 11 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.594 INFO 11 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.641 INFO 10 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
Любой помощь приветствуется.