Java SecurityException: signer information does not match

后端 未结 18 2703
迷失自我
迷失自我 2020-11-22 12:56

I recompiled my classes as usual, and suddenly got the following error message. Why? How can I fix it?

java.lang.SecurityException: class \"Chinese_English_D         


        
相关标签:
18条回答
  • 2020-11-22 13:45
    1. After sign, access: dist\lib
    2. Find extra .jar
    3. Using Winrar, You extract for a folder (extract to "folder name") option
    4. Access: META-INF/MANIFEST.MF
    5. Delete each signature like that:

    Name: net/sf/jasperreports/engine/util/xml/JaxenXPathExecuterFactory.c lass SHA-256-Digest: q3B5wW+hLX/+lP2+L0/6wRVXRHq1mISBo1dkixT6Vxc=

    1. Save the file
    2. Zip again
    3. Renaime ext to .jar back
    4. Already
    0 讨论(0)
  • 2020-11-22 13:45

    This question has lasted for a long time but I want to pitch in something. I have been working on a Spring project challenge and I discovered that in Eclipse IDE. If you are using Maven or Gradle for Spring Boot Rest APIs, you have to remove the Junit 4 or 5 in the build path and include Junit in your pom.xml or Gradle build file. I guess that applies to yml configuration file too.

    0 讨论(0)
  • 2020-11-22 13:46

    If you added all the jars from bouncycastle.org (in my case from crypto-159.zip), just remove the ones for the JDKs that do not apply to you. There are redundancies. You probably only need the "jdk15on" jars.

    0 讨论(0)
  • 2020-11-22 13:50

    In my case it was a package name conflict. Current project and signed referenced library had one package in common package.foo.utils. Just changed the current project error-prone package name to something else.

    0 讨论(0)
  • 2020-11-22 13:50

    this happened to me when using JUnit + rest assured + hamcrest, in this case, dont add junit to build path, if you have the maven project, this resolved me, below is the pom.xml

    <dependencies>
    
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.0.0</version>
        </dependency>
    
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
        </dependency>
    
    
        <!-- https://mvnrepository.com/artifact/junit/junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
    
        </dependency>
    
    
    </dependencies>
    
    0 讨论(0)
  • 2020-11-22 13:51

    If you're running it in Eclipse, check the jars of any projects added to the build path; or do control-shift-T and scan for multiple jars matching the same namespace. Then remove redundant or outdated jars from the project's build path.

    0 讨论(0)
提交回复
热议问题