Error deploying application with Swagger and spring in Weblogic

Asked

Viewed 105 times

0

When deploying my application using spring with swagger2 I have the following error:

Message icon - Error An error occurred During Activation of changes, Please see the log for Details. Message icon - Error java.lang.Nosuchmethoderogate: com.google.common.base.Optional.Transform(Lcom/google/common/base/Function;)Lcom/google/common/base/Optional; Message icon - Error com.google.common.base.Optional.Transform(Lcom/google/common/base/Function;)Lcom/google/common/base/Optional;

Someone here has been there?

My pom.xml:

        <!-- inicio Apache -->
    <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>1.5.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.4</version>
    </dependency>
    <dependency>
        <groupId>commons-dbcp</groupId>
        <artifactId>commons-dbcp</artifactId>
        <version>1.4</version>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.6.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.6.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.xmlbeans</groupId>
        <artifactId>xmlbeans</artifactId>
        <version>2.6.0</version>
    </dependency>

    <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.9.3</version>
    </dependency>

    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.3.1</version>
    </dependency>

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.5</version>
    </dependency>

    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
    </dependency>

    <!-- Fim apache -->

    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>

    <!-- inicio eclipselink -->
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.core</artifactId>
        <version>2.6.4</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.jpa</artifactId>
        <version>2.6.4</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.oracle</artifactId>
        <version>2.6.4</version>
    </dependency>

    <!-- fim Eclipselink -->

    <!-- inicio javax -->
    <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0.2</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
    </dependency>

    <!-- fim javax -->

    <!-- inicio spring -->

    <!-- inicio spring-security -->

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>4.1.3.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>4.1.3.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>4.1.3.RELEASE</version>
    </dependency>
    <!-- fim spring-security -->

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>4.3.3.RELEASE</version>
    </dependency>

    <!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> 
        <version>4.3.3.RELEASE</version> </dependency> -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>4.3.3.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>4.3.3.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>4.3.3.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.6.3</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-autoconfigure</artifactId>
        <version>1.4.1.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>4.3.3.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
        <version>1.4.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
        <version>1.4.1.RELEASE</version>
    </dependency>
    <!-- fim spring -->

    <!-- Para retornar objetos JAVA no formato JSON -->
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20160810</version>
    </dependency>

    <!-- teste -->
    <!-- https://mvnrepository.com/artifact/org.jdom/jdom2 -->
    <dependency>
        <groupId>org.jdom</groupId>
        <artifactId>jdom2</artifactId>
        <version>2.0.6</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>4.3.1.RELEASE</version>
        <scope>test</scope>
    </dependency>
    <!-- fim tewste -->

    <dependency>
        <groupId>com.monitorjbl</groupId>
        <artifactId>xlsx-streamer</artifactId>
        <version>1.0.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-jaxrs -->
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.9.13</version>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.6.3</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.6.3</version>
    </dependency>

    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.11</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.1</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.4.196</version>
    </dependency>
    <!-- Java Email -->
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.7</version>
    </dependency>
    <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.1.1</version>
    </dependency>

    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.10.19</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>4.2</version>
        <scope>test</scope>
    </dependency>

    <!-- INICIO Swagger -->

    <!-- <dependency> -->
    <!-- <groupId>io.springfox</groupId> -->
    <!-- <artifactId>springfox-swagger2</artifactId> -->
    <!-- <version>2.7.0</version> -->
    <!-- </dependency> -->
    <!-- <dependency> -->
    <!-- <groupId>io.springfox</groupId> -->
    <!-- <artifactId>springfox-swagger-ui</artifactId> -->
    <!-- <version>2.7.0</version> -->
    <!-- </dependency> -->

    <!-- <dependency> -->
    <!-- <groupId>com.google.guava</groupId> -->
    <!-- <artifactId>guava</artifactId> -->
    <!-- <version>26.0-android</version> -->
    <!-- </dependency> -->
    <!--FIM - Swagger -->

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.2.2</version>
    </dependency>


    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.2.2</version>
    </dependency>

<!--        <dependency> -->
<!--            <groupId>com.google.guava</groupId> -->
<!--            <artifactId>guava</artifactId> -->
<!--            <version>27.0-android</version> -->
<!--        </dependency> -->

Stacktrace

####<Oct 25, 2018 10:48:51 AM BRST> <Info> <Deployer> <brux1308> <DevServer02> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1540471731093> <BEA-149059> <Module svcore.war of application svcore is transitioning from STATE_ADMIN to STATE_PREPARED on server DevServer02.>
<[STANDBY] Executethread: '2' for Queue: 'Weblogic.kernel.Default (self-tuning)'> <> <> <1540471731096> <[STANDBY] Executethread: '2' for Ueue: 'Weblogic.kernel.Default (self-tuning)'> <> <> <> <1540471731097> <[STANDBY] Executethread: '2' for Ueue: 'Weblogic.kernel.Default (self-tuning)'> <> <> <> <1540471731099> <[STANDBY] Executethread: '2' for Ueue: 'Weblogic.kernel.Default (self-tuning)'> <> <> <> <1540471731102> <[STANDBY] Executethread: '2' for Ueue: 'Weblogic.kernel.Default (self-tuning)'> <> <> <> <1540471731102>

Weblogic.application.Moduleexception: java.lang.Nosuchmethoderogate: com.google.common.base.Optional.Transform(Lcom/google/common/base/Function;)Lcom/google/common/base/Optional; at Weblogic.application.Internal.ExtensibleModuleWrapper.start(Extensiblemodulewrapper.java:140) Weblogic.application.Internal.flow.Modulelistenerinvoker.start(Modulelistenerinvoker.java:124) at Weblogic.application.Internal.flow.Modulestatedriver$3.next(Modulestatedriver.java:216) at Weblogic.application.Internal.flow.Modulestatedriver$3.next(Modulestatedriver.java:211) at Weblogic.application.utils.StateMachineDriver.nextState(Statemachinedriver.java:42) at Weblogic.application.Internal.flow.Modulestatedriver.start(Modulestatedriver.java:73) at Weblogic.application.Internal.flow.Startmodulesflow.Activate(Startmodulesflow.java:24) at Weblogic.application.Internal.Basedeployment$2.next(Basedeployment.java:729) at Weblogic.application.utils.StateMachineDriver.nextState(Statemachinedriver.java:42) at Weblogic.application.Internal.BaseDeployment.Activate(Basedeployment.java:258) Weblogic.application.Internal.SingleModuleDeployment.Activate(Singlemoduledeployment.java:48) at Weblogic.application.Internal.DeploymentStateChecker.Activate(Deploymentstatechecker.java:165) Weblogic.deploy.Internal.targetserver.Appcontainerinvoker.Activate(Appcontainerinvoker.java:80) at Weblogic.deploy.Internal.targetserver.Operations.AbstractOperation.Activate(Abstractoperation.java:587) at Weblogic.deploy.Internal.targetserver.Operations.ActivateOperation.activateDeployment(Activateoperation.java:150) Weblogic.deploy.Internal.targetserver.Operations.ActivateOperation.doCommit(Activateoperation.java:116) at Weblogic.deploy.Internal.targetserver.Operations.AbstractOperation.commit(Abstractoperation.java:339) at Weblogic.deploy.Internal.targetserver.Deploymentmanager.handleDeploymentCommit(Deploymentmanager.java:846) at Weblogic.deploy.Internal.targetserver.Deploymentmanager.activateDeploymentList(Deploymentmanager.java:1275) at Weblogic.deploy.Internal.targetserver.Deploymentmanager.handleCommit(Deploymentmanager.java:442) at Weblogic.deploy.Internal.targetserver.Deploymentservicedispatcher.commit(Deploymentservicedispatcher.java:176) at Weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(Deploymentreceivercallbackdeliverer.java:195) at Weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(Deploymentreceivercallbackdeliverer.java:13) at Weblogic.deploy.service.internal.targetserver.Deploymentreceivercallbackdeliverer$2.run(Deploymentreceivercallbackdeliverer.java:68) Weblogic.work.Selftuningworkmanagerimpl$Workadapterimpl.run(Selftuningworkmanagerimpl.java:548) Weblogic.work.Executethread.execute(Executethread.java:311) at Weblogic.work.Executethread.run(Executethread.java:263) Caused By: java.lang.Nosuchmethoderogate: com.google.common.base.Optional.Transform(Lcom/google/common/base/Function;)Lcom/google/common/base/Optional; at springfox.documentation.spring.web.Propertysourcedrequestmappinghandlermapping.mappingPath(Propertysourcedrequestmappinghandlermapping.java:80) at springfox.documentation.spring.web.Propertysourcedrequestmappinghandlermapping.initHandlerMethods(Propertysourcedrequestmappinghandlermapping.java:63) at org.springframework.web.servlet.Handler.AbstractHandlerMethodMapping.afterPropertiesSet(Abstracthandlermethodmapping.java:184) at org.springframework.web.servlet.mvc.method.Annotation.RequestMappingHandlerMapping.afterPropertiesSet(Requestmappinghandlermapping.java:128) at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstractautowirecapablebeanfactory.java:1637) at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstractautowirecapablebeanfactory.java:1574)) >

<[STANDBY] Executethread: '2' for Queue: 'Weblogic.kernel.Default (self-tuning)'> <> <> <> <1540471731109>
  • have tried to upgrade springfox to a newer version?

  • I already tried yes @Lucasmiranda tried since last to 2.9.2, I thought this was some compatibility problem between the version of spring and the version of Swagger so I thought to test other versions, but the error continues.

  • Version of Guava in Runtime. This is lib conflict, your pom is a little messy, duplicated libs, unnecessary, etc. With depencency Tree you find out what it is. Include the stack trace also complete, that you can know who is generating the error, then see which Guava he uses and which is in Runtime.

  • In dependency Tree shows that there is only one version of Guava at 1.8

  • stacktrace

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.