We encountered a similar issue to this: #406
We recently upgraded to Spring Boot 2.1.1 and the following Spring Cloud versions:
springBootVersion = '2.1.1.RELEASE'
springCloudServicesVersion = '2.1.0.RELEASE'
springCloudVersion = 'Greenwich.RELEASE'
The application boots and runs locally with no issues. When we deploy the application to PCF, we are seeing the following error when navigating to the route:
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:748)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:685)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.cloudfoundry.router.ClientCertificateMapper.doFilter(ClientCertificateMapper.java:77)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:209)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at com.common.util.RedirDomainFilter.doFilter(RedirDomainFilter.java:42)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at com.web.filter.CrossScriptingFilter.doFilter(CrossScriptingFilter.java:33)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at com.web.filter.RequestWrapper.<init>(RequestWrapper.java:55)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] at com.account.domain.dao.UserDAO.findByUsername(UserDAO.java:437)
2019-02-19T18:14:55.388-05:00 [APP/PROC/WEB/0] [OUT] 02-19 23:14:55 ERROR [http-nio-8080-exec-10] [] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[default] Servlet.service() for servlet [default] in context with path [] threw exception [Filter execution threw an exception] with root cause, java.lang.NoClassDefFoundError: Could not initialize class com.account.domain.User
The User class above lives in a jar inside the WEB-INF\lib directory of the WAR file. The same code works locally which has us wondering is this could be a compatibility issue with the java_buildpack. We are using version 4.16: java-buildpack-offline-cflinuxfs2-v4.16.zip. The application is also using Tomcat embed version 9.0.13. Also we had been able to boot and run the application successfully in same PCF instance when using Spring Boot 2.0.1. Please let us know if there is a known incompatibility version with the java build pack and other relevant spring boot components.
Thank you,
Jorge
We encountered a similar issue to this: #406
We recently upgraded to Spring Boot 2.1.1 and the following Spring Cloud versions:
The application boots and runs locally with no issues. When we deploy the application to PCF, we are seeing the following error when navigating to the route:
The
Userclass above lives in a jar inside theWEB-INF\libdirectory of the WAR file. The same code works locally which has us wondering is this could be a compatibility issue with the java_buildpack. We are using version 4.16:java-buildpack-offline-cflinuxfs2-v4.16.zip. The application is also using Tomcat embed version 9.0.13. Also we had been able to boot and run the application successfully in same PCF instance when using Spring Boot 2.0.1. Please let us know if there is a known incompatibility version with the java build pack and other relevant spring boot components.Thank you,
Jorge