相关疑难解决方法(0)

Java SecurityException:签名者信息不匹配

我像往常一样重新编译了我的类,突然收到以下错误消息.为什么?我该如何解决?

java.lang.SecurityException: class "Chinese_English_Dictionary"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
Run Code Online (Sandbox Code Playgroud)

java securityexception certificate

115
推荐指数
6
解决办法
18万
查看次数

Hamcrest Matcher 签名者信息与同一包中其他类的签名者信息不匹配

我正在尝试使用 REST-Assured 和 JUnit5 在我的 Spring Boot 应用程序中编写一些集成测试,但是当我运行以下命令时:

@SpringBootTest(classes = ProductsApplication.class)
class ProductsApiTest {

  @Before
  public void setup() {
    RestAssured.baseURI = "http://localhost:8080/test/api/products";
  }

  @Test
  public void test1() {
    ValidatableResponse statusCode = given().when().get().then().statusCode(200);
  }
}
Run Code Online (Sandbox Code Playgroud)

出现一个令人讨厌的错误:

java.lang.SecurityException:类“org.hamcrest.Matchers”的签名者信息与同一包中其他类的签名者信息不匹配

请看一下我的 pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.4.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    ...
    <dependencies>
        ...
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        ...
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>   
        <dependency>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-engine</artifactId> …
Run Code Online (Sandbox Code Playgroud)

java junit integration-testing hamcrest spring-boot

5
推荐指数
1
解决办法
1938
查看次数

如何在类路径上找到重复的类?

是的,完全是标题

如何在类路径上找到重复的类?

是个问题.

背景:

我怀疑有重复的类(javax.mail.Session).我找到了这个类的一个罐子.但我不知道第二个jar包含同一个类的位置.

我正在使用eclipse.

java jar

4
推荐指数
1
解决办法
5067
查看次数