JHipster微服务cloudfoundry部署报错
JHipster microservices cloudfoundry deployment error
我在使用 cloudfoundry 部署到云时遇到以下异常。
这是从任何 jhipster 部署开始的。即使将 jhipster-registry 应用程序部署到云时也会出现同样的错误。
本地应用程序 运行 没有错误。
2017-11-11T13:40:10.75+0300 [APP/PROC/WEB/0] OUT 2017-11-11 10:40:10.748 WARN 12 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'allowLinkingEmbeddedServletContainerCustomizer' defined in class path resource [org/cloudfoundry/container/customizer/boot1/AllowLinkingAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoClassDefFoundError: org/apache/catalina/Context
2017-11-11T13:40:11.54+0300 [APP/PROC/WEB/0] OUT 2017-11-11 10:40:11.535 WARN 12 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'allowLinkingEmbeddedServletContainerCustomizer' defined in class path resource [org/cloudfoundry/container/customizer/boot1/AllowLinkingAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoClassDefFoundError: org/apache/catalina/Context
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getObject(AbstractBeanFactory.java:306)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at io.github.jhipster.registry.JHipsterRegistryApp.main(JHipsterRegistryApp.java:75)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.reflect.Method.invoke(Method.java:498)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/Context
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT ... 21 common frames omitted
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.Class.getDeclaredMethods0(Native Method)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:206)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:125)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT ... 32 common frames omitted
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT 2017-11-11 10:40:11.661 ERROR 12 --- [ main] o.s.boot.SpringApplication : Application startup failed
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.Class.getDeclaredMethods(Class.java:1975)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:489)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT Caused by: java.lang.ClassNotFoundException: org.apache.catalina.Context
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:187)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:295)
2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523)
2017-11-11T13:40:12.19+0300 [APP/PROC/WEB/0] OUT Exit status 1
2017-11-11T13:40:12.22+0300 [CELL/0] OUT Exit status 0
这肯定与几天前的以下提交有关
我现在通过更改 buildpack url 以在 /deploy/cloudfoundry/manifest.yml[ 中包含 #v3.19.2 来修复它=23=] 使用更改前的版本,使用旧的定制器
buildpack: https://github.com/cloudfoundry/java-buildpack#v3.19.2
我在使用 cloudfoundry 部署到云时遇到以下异常。 这是从任何 jhipster 部署开始的。即使将 jhipster-registry 应用程序部署到云时也会出现同样的错误。
本地应用程序 运行 没有错误。
2017-11-11T13:40:10.75+0300 [APP/PROC/WEB/0] OUT 2017-11-11 10:40:10.748 WARN 12 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'allowLinkingEmbeddedServletContainerCustomizer' defined in class path resource [org/cloudfoundry/container/customizer/boot1/AllowLinkingAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoClassDefFoundError: org/apache/catalina/Context 2017-11-11T13:40:11.54+0300 [APP/PROC/WEB/0] OUT 2017-11-11 10:40:11.535 WARN 12 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources. 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'allowLinkingEmbeddedServletContainerCustomizer' defined in class path resource [org/cloudfoundry/container/customizer/boot1/AllowLinkingAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoClassDefFoundError: org/apache/catalina/Context 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getObject(AbstractBeanFactory.java:306) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at io.github.jhipster.registry.JHipsterRegistryApp.main(JHipsterRegistryApp.java:75) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.reflect.Method.invoke(Method.java:498) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/Context 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT ... 21 common frames omitted 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.Class.getDeclaredMethods0(Native Method) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:206) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:125) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.net.URLClassLoader.findClass(URLClassLoader.java:381) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT ... 32 common frames omitted 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT 2017-11-11 10:40:11.661 ERROR 12 --- [ main] o.s.boot.SpringApplication : Application startup failed 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at java.lang.Class.getDeclaredMethods(Class.java:1975) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:489) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT Caused by: java.lang.ClassNotFoundException: org.apache.catalina.Context 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:187) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:295) 2017-11-11T13:40:11.66+0300 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523) 2017-11-11T13:40:12.19+0300 [APP/PROC/WEB/0] OUT Exit status 1 2017-11-11T13:40:12.22+0300 [CELL/0] OUT Exit status 0
这肯定与几天前的以下提交有关
我现在通过更改 buildpack url 以在 /deploy/cloudfoundry/manifest.yml[ 中包含 #v3.19.2 来修复它=23=] 使用更改前的版本,使用旧的定制器
buildpack: https://github.com/cloudfoundry/java-buildpack#v3.19.2