我需要在WL v12.2.1上部署Spring boot Web应用程序。
我的本地Windows WL实例一切正常。
本地Java版本:1.8.0_171 外部Java版本:1.8.0_77-> wl嵌入式Java版本
但是当我尝试在外部Linux WL上部署相同的应用程序时,会出现此错误:
Administration Console encountered the following error:
weblogic.application.ModuleException:java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.asMap(Lcom / google / common / collect / ListMultimap;)Ljava / util / Map; 在weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140) 在weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124) 在weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:237) 在weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:232) 在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45) 在weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:82) 在weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:52) 在weblogic.application.internal.BaseDeployment $ 2.next(BaseDeployment.java:753) 在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45) 在weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:263) 在weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:53) 在weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165) 在weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80) 在weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:601)上 在weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:171)上 在weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:121) 在weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:343)上 在weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:895) 在weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1422) 在weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:454) 在weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:181) 在weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)处 位于weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access $ 100(DeploymentReceiverCallbackDeliverer.java:13) 在weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer $ 2.run(DeploymentReceiverCallbackDeliverer.java:68) 在weblogic.work.SelfTuningWorkManagerImpl $ WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:643) 在weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348) 在weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333) 在weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54) 在weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) 在weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617) 在weblogic.work.ExecuteThread.execute(ExecuteThread.java:397) 在weblogic.work.ExecuteThread.run(ExecuteThread.java:346) 造成原因:java.lang.NoSuchMethodError:com.google.common.collect.Multimaps.asMap(Lcom / google / common / collect / ListMultimap;)Ljava / util / Map; 在springfox.documentation.spring.web.scanners.ApiListingReferenceScanner.scan(ApiListingReferenceScanner.java:59) 在springfox.documentation.spring.web.scanners.ApiDocumentationScanner.scan(ApiDocumentationScanner.java:67) 在springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.scanDocumentation(DocumentationPluginsBootstrapper.java:101) 在springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:167) 在org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:175) 在org.springframework.context.support.DefaultLifecycleProcessor.access $ 200(DefaultLifecycleProcessor.java:50) 在org.springframework.context.support.DefaultLifecycleProcessor $ LifecycleGroup.start(DefaultLifecycleProcessor.java:348) 在org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:151) 在org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:114) 在org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:880) 在org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144) 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) 在org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) 在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) 在org.springframework.boot.SpringApplication.run(SpringApplication.java:303) 在org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:154) 在org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:134)处 在org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87) 在org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169) 在weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1420) 在weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1359) 在weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1340) 在weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1906) 在weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3063) 在weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1830) 在weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:875) 在weblogic.application.internal.ExtensibleModuleWrapper $ StartStateChange.next(ExtensibleModuleWrapper.java:360) 在weblogic.application.internal.ExtensibleModuleWrapper $ StartStateChange.next(ExtensibleModuleWrapper.java:356) 在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45) 在weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
这是我的pom:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<relativePath />
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
<netty.version>4.0.27.Final</netty.version>
<swagger.version>2.8.0</swagger.version>
<maven.test.skip>true</maven.test.skip>
</properties>
<dependencies>
<!-- apache poi XSSF -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/io.netty/netty-bom -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.28.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- Swagger -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.8.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.8.Final</version>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.5.1</version>
</dependency>
<dependency>
<groupId>customlibrary.security</groupId>
<artifactId>modis-security-core</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/modis-security-core-1.0-SNAPSHOT.jar</systemPath>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>projectName</finalName>
</build>
</project>
为什么在我的本地WL上没有出现此错误? 我如何将这个缺少的课程放在我的课程路径上?
答案 0 :(得分:0)
解决了推杆问题
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>com.google.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
在weblogic.xml上