0

I'm encountering an issue with Gradle build of my javafx project after adding the json-simple library as a dependency. However, the build crashes, and I'm unsure about the cause of the problem. Here are the details of my setup:

  • I added the following line to my build.gradle file within the dependencies block: implementation 'com.googlecode.json-simple:json-simple:1.1.1'

  • I also included the line requires json.simple; in my module-info.java file.

However, I'm encountering the following error:

error: module json.simple reads package org.hamcrest from both hamcrest.core and junit
error: module json.simple reads package org.hamcrest.internal from both hamcrest.core and junit
error: module json.simple reads package org.hamcrest.core from both hamcrest.core and junit

Additionally, I received the following vulnérability warning:

Provides transitive vulnerable dependency maven:junit:junit:4.10
CVE-2020-15250 5.5 Incorrect Permission Assignment for Critical Resource vulnerability pending CVSS allocation
Results powered by Checkmarx(c)

The error disappears if I remove the requires json.simple; line from the module-info.java file.

Dabouz
  • 1
  • Does this help? https://stackoverflow.com/questions/32543197/error-json-simple-java-util-zip-zipexception-duplicate-entry-org-hamcrest-bas – MNEMO May 22 '23 at 10:35
  • 3
    Json simple has been abandoned for years. Better use some other json library. – aled May 22 '23 at 11:39
  • 1
    Please use the correct terminology. The build errors and warnings you are receiving are not what would be normally termed a "crash". – jewelsea May 22 '23 at 20:04

0 Answers0