我有作爲java應用程序運行時正常工作的spring引導應用程序。Guava在websphere中部署spring引導應用程序的問題
現在我跟着從以下網址步驟,並試圖部署到WebSphere: How to deploy Spring Boot application in IBM Liberty and WAS 8.5
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: com/google/common/collect/Lists.reverse(Ljava/util/List;)Ljava/util/List; (loaded from file:/C:/Users/IBM_ADMIN/Downloads/spring-tool-suite-3.8.3.RELEASE-e4.6.2-win32-x86_64/sts-bundle/WLP/usr/servers/defaultServer/apps/expanded/wps-source-document-0.0.1-SNAPSHOT.war/WEB-INF/lib/google-collections-1.0.jar by [email protected]) called from class springfox.documentation.spring.web.ObjectMapperConfigurer (loaded from file:/C:/Users/IBM_ADMIN/Downloads/spring-tool-suite-3.8.3.RELEASE-e4.6.2-win32-x86_64/sts-bundle/WLP/usr/servers/defaultServer/apps/expanded/wps-source-document-0.0.1-SNAPSHOT.war/WEB-INF/lib/springfox-spring-web-2.7.0.jar by [email protected]).
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:2523) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1054) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6565) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:468) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApplication(DynamicVirtualHost.java:463) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplication(WebContainer.java:1051) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.osgi.WebContainer.access$000(WebContainer.java:104) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at com.ibm.ws.webcontainer.osgi.WebContainer$2.run(WebContainer.java:870) [com.ibm.ws.webcontainer_1.1.16.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522) [na:1.8.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:277) [na:1.8.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153) [na:1.8.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [na:1.8.0]
at java.lang.Thread.run(Thread.java:785) [na:1.8.0]
Caused by: java.lang.NoSuchMethodError: com/google/common/collect/Lists.reverse(Ljava/util/List;)Ljava/util/List; (loaded from file:/C:/Users/IBM_ADMIN/Downloads/spring-tool-suite-3.8.3.RELEASE-e4.6.2-win32-x86_64/sts-bundle/WLP/usr/servers/defaultServer/apps/expanded/wps-source-document-0.0.1-SNAPSHOT.war/WEB-INF/lib/google-collections-1.0.jar by [email protected]) called from class springfox.documentation.spring.web.ObjectMapperConfigurer (loaded from file:/C:/Users/IBM_ADMIN/Downloads/spring-tool-suite-3.8.3.RELEASE-e4.6.2-win32-x86_64/sts-bundle/WLP/usr/servers/defaultServer/apps/expanded/wps-source-document-0.0.1-SNAPSHOT.war/WEB-INF/lib/springfox-spring-web-2.7.0.jar by [email protected]).
at springfox.documentation.spring.web.ObjectMapperConfigurer.jackson2Converters(ObjectMapperConfigurer.java:76) ~[springfox-spring-web-2.7.0.jar:2.7.0]
at springfox.documentation.spring.web.ObjectMapperConfigurer.configureMessageConverters(ObjectMapperConfigurer.java:63) ~[springfox-spring-web-2.7.0.jar:2.7.0]
at springfox.documentation.spring.web.ObjectMapperConfigurer.postProcessBeforeInitialization(ObjectMapperConfigurer.java:47) ~[springfox-spring-web-2.7.0.jar:2.7.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
... 29 common frames omitted
我注意到,有有在這個環節上的類似問題幾個夥計:Exception caused by Guava library?
我試過下面的解決方案:
@Dilip克里斯南:你可以看一下 – javaMan