0

When I am deploying in liberty server I am getting this error

it is working in tomcat server but throwing error in IBM open liberty server

[ERROR ] SRVE0777E: Exception thrown by application class 'org.springframework.web.servlet.DispatcherServlet.doDispatch:1,053' org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.bouncycastle.asn1.ASN1ObjectIdentifier.equals(Lorg/bouncycastle/asn1/ASN1Primitive;)Z at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1053)

          <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.test</groupId>
<artifactId>testapp</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>

<!-- Spring boot parent dependency jar -->
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.1.RELEASE</version>
</parent>
<dependencies>
    <!-- Spring boot web mvc jar -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
         <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
        </exclusions> 
                </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.9.2</version>
    </dependency>
    <dependency>
        <groupId>eu.agno3.jcifs</groupId>
        <artifactId>jcifs-ng</artifactId>
        <version>2.1.6</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.9.2</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>

<!--    <dependency>
        <groupId>jcifs</groupId>
        <artifactId>jcifs</artifactId>
        <version>1.3.17</version>
    </dependency> -->

    <!-- https://mvnrepository.com/artifact/com.hierynomus/smbj -->
    <dependency>
        <groupId>com.hierynomus</groupId>
        <artifactId>smbj</artifactId>
        <version>0.11.1</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <!-- liberty server configs-->
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>

</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
                <execution>
                    <id>copy-resources</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${basedir}/target/classes/static/</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${basedir}/../ui/build</directory>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>io.openliberty.tools</groupId>
            <artifactId>liberty-maven-plugin</artifactId>
            <version>3.2</version>
            <configuration>
                <appsDirectory>apps</appsDirectory>
                <mainClass>${start-class}</mainClass>
            </configuration>
        </plugin>

    </plugins>
</build>
Arvind Reddy
  • 31
  • 1
  • 8
  • You have excluded `tomcat` from your dependency – ray Sep 04 '21 at 23:04
  • I am deploying in IBM liberty server – Arvind Reddy Sep 04 '21 at 23:34
  • 1. Don't show us partial stacktraces. Show us complete stacktraces ... including the nested exceptions. 2. Read https://stackoverflow.com/questions/35186 ... and see if you can use the >insight< that the answers give you to track down the problem for yourself. – Stephen C Sep 05 '21 at 00:21
  • 1
    `NoSuchMethodError` is *typically* caused by an inconsistency in your dependencies. Class A is trying to use method M from class B. When A was compiled, the method was there. At runtime it isn't there ... because the version of B that is used at runtime is different to the one that was used at runtime. – Stephen C Sep 05 '21 at 00:24

0 Answers0