Home > Mobile >  java.lang.NoSuchMethodError: 'void org.glassfish.jersey.model.internal.CommonConfig.<init>
java.lang.NoSuchMethodError: 'void org.glassfish.jersey.model.internal.CommonConfig.<init>

Time:06-28

I am working on use the embedded e-signature in my web app ( java eclipse) i get this error and i do not understand what it means ?:

    java.lang.NoSuchMethodError: 'void org.glassfish.jersey.model.internal.CommonConfig.<init> 
    (javax.ws.rs.RuntimeType, java.util.function.Predicate)'
    org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:140)
    org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:496)
    com.docusign.esign.client.ApiClient.buildHttpClient(ApiClient.java:1753)
    com.docusign.esign.client.ApiClient.<init>(ApiClient.java:77)
    com.docusign.esign.client.Configuration.<clinit>(Configuration.java:5)
    com.docusign.esign.api.EnvelopesApi.<init>(EnvelopesApi.java:16)
    com.uniquedeveloper.registration.test2.EmbeddedSigningTest(test2.java:141)
    com.uniquedeveloper.registration.test2.doPost(test2.java:64)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

CodePudding user response:

I'm guessing that this is due to multiple versions of jersey-client in your codebase. Docusign's current jersey-client version is 2.29.1. Are you able to update your other versions to at least that, or you can add dependencies in your pom.xml for specific versions like so here: https://www.tutorialspoint.com/maven/maven_external_dependencies.htm. Please try that and let us know.

CodePudding user response:

Here is my updated pom file :


    <project xmlns="https://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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>Trial1</groupId>
      <artifactId>Trial1</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>war</packaging>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
              <release>15</release>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>3.2.3</version>
          </plugin>
        </plugins>
      </build>
       <properties>
            <java.version>11</java.version>
            <oauth2.version>2.5.6</oauth2.version>
            <commonsio.version>2.11.0</commonsio.version>
            <docusign.version>3.18.0</docusign.version>
            <rooms.version>1.1.0</rooms.version>
            <click.version>1.0.0</click.version>
            <monitor.version>1.1.0</monitor.version>
            <admin.version>1.0.0-BETA</admin.version>
        </properties>
    <dependencies>
     <dependency>
      <groupId>com.sun.mail</groupId>
      <artifactId>jakarta.mail</artifactId>
      <version>2.0.1</version>
      </dependency>
      <dependency>
      <groupId>com.docusign</groupId>
      <artifactId>docusign-esign-java</artifactId>
      <version>3.19.0</version>
    </dependency>
            <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
    </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.13.3</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.13.3</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.13.3</version>
            </dependency>
            <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-multipart</artifactId>
        <version>3.1.0-M3</version>
    </dependency>
      <dependency>
            <groupId>org.glassfish.jersey.connectors</groupId>
            <artifactId>jersey-apache-connector</artifactId>
            <version>3.1.0-M3</version>
        </dependency>
        <dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-client</artifactId>
    <version>3.0.2.Final</version>
        </dependency>
        <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-json-jackson</artifactId>
        <version>3.1.0-M3</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>3.1.0-M3</version>
    </dependency>
    </dependencies>
    </project> ```

btw i tried the quickstart but it wouldn't even compile ( i need to edit the methods used - the way they are called)
  • Related