json-patch-1.13.jar: CVE-2021-4279(9.8) Quarkus 2.15.2.Final - quarkus

The dependency check is now failing on json-patch:
[ERROR] Failed to execute goal org.owasp:dependency-check-maven:7.4.3:check (default-cli) on project ins-app: [ERROR] [ERROR] One or more dependencies were identified with vulnerabilities that have a CVSS score greater than or equal to '8.0': [ERROR] [ERROR] json-patch-1.13.jar: CVE-2021-4279(9.8) CVE is https://nvd.nist.gov/vuln/detail/CVE-2021-4279
The fix PR is probably here (Starcounter-Jack/JSON-Patch#7ad6af4). But it is another repository?
https://github.com/java-json-tools/json-patch/issues/144

It is actually a bug on DependencyCheck, one that was already addressed:
https://github.com/jeremylong/DependencyCheck/issues/5212
You could add it to your suppression list.

Related

java.nio.file.InvalidPathException while resolving sbt project

Great fan of Scala, but SBT keeps giving me tooth aches in places without teeth.
Usually I manage, but this one has me somewhat baffled.
Can anyone help me with the following:
TL/DR
While re-importing my sbt-project, I encountered the following error.
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\cucumber-junit-5.7.0.pom.lock
It seems that the import encountered some corrupt path including a tab character while resolving the cucumber dependency. The weird thing is, that this was a re-import; it imported fine before. Also, the actual path C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\ cannot be found, neither via the explorer or the shell.
The error first occurred while importing the project into Intellij, but using SBT via the shell yielded the same.
Details below.
Does anyone know how to:
- solve this?
- prevent it from happening again?
Project can be found here
Full SBT log:
[info] Loading global plugins from C:\Users\-username-\.sbt\1.0\plugins
[info] Loading settings for project sandbox-build from plugins.sbt ...
[info] Loading project definition from C:\coding\modules\scala\sandbox\project
[info] Loading settings for project sandbox from build.sbt ...
[info] Set current project to sandbox (in build file:/C:/coding/modules/scala/sandbox/)
[error] java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[error] at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
[error] at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
[error] at java.base/java.io.File.toPath(File.java:2311)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:35)
[error] at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$32(FileCache.scala:508)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error] at java.base/java.lang.Thread.run(Thread.java:832)
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] Total time: 1 s, completed 4 jun. 2020 13:57:57```
Already tried to
clear the Coursier cache by deleting the C:\Users\-username-\AppData\Local\Coursier\cache\ directory
clear the project by deleting the ./target and ./project/target directories
update the offending Cucumber dependencies to 6.0.0-RC2
It seems that the lock file still exists somewhere and SBT can't re-download itself?
As the exception reports there are 6 spaces or a tab to many. Exactly the ones in your build.sbt file on line 52: "io.cucumbe\t r". Happy programming!

Maven TestNG Class No found exception

I'm running TestNG file from maven and I'm getting this exception.
I checked target folder of maven there are no classes generated
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test
(default-test) on project Tes ts: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed:
There was an error in the forked process
[ERROR] org.testng.TestNGException: [ERROR] Cannot find class in
classpath: ai.dharma.web.test.functional.TestBaseSetup [ERROR] at
org.testng.xml.XmlClass.loadClass(XmlClass.java:81) [ERROR] at
org.testng.xml.XmlClass.init(XmlClass.java:73)
Ok i found answer almost after 5 days of deep search..
it was folder structure,it should be "Src > Main > Java" + your regular package structure, maven searches through that structure for generating class..

how to fix the build with maven in bluemix

I have created a sample app (java liberty profile) on Bluemix.
When I try to build the app on Bluemix devops (I do not make changes to the code). I have this error msg :
Cloning the 'master' branch from repo 'https://P90MSG01:3041/git/abderrazak/sia-test-build'
[INFO] Scanning for projects...
[INFO] Downloading: http://repo.maven.apache.org/maven2/net/wasdev/maven/parent/java7-parent/1.4/java7-parent-1.4.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project net.wasdev.wlp.sample:JavaHelloWorldApp:1.0-SNAPSHOT (/home/pipeline/1366b39e-02e6-4b9d-bb71-89d6d65b202d/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact net.wasdev.maven.parent:java7-parent:pom:1.4 from/to central (http://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/151.101.44.215] failed: Connection refused and 'parent.relativePath' points at no local POM # line 5, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Finished: FAILED
Is there a reason ?
Thank you.
As per Bluemix Status Page today DevOps Delivery Pipeline service experienced some issues that should be fixed now. Some users experienced issues with pipeline jobs.
I suggest you to try again now, it should work.

Sakai 10 Building Error

I'm trying to install Sakai 10.2 and it gives me an error every time. I've reinstall everything, including de OS. And the error persist.
This is my current configuration:
Sakai 10.2
Maven 3.2.5
Tomcat 7.0.59
This the error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------ ------
[INFO] Total time: 02:00 min
[INFO] Finished at: 2015-03-17T17:56:31+01:00
[INFO] Final Memory: 347M/829M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project entitybroker-restimpl: There are test failures.
[ERROR]
[ERROR] Please refer to C:\opt\sakai-10.x\entitybroker\rest\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :entitybroker-restimpl
These are de reports of the test.
EntityDescriptionManagerTest
EntityHandlerImplTest
[EntityBrokerServlet]http://pastebin.com/vWmbNXxa
There appears to be an error in the tests.
Build Sakai with -Dmaven.test.skip.
Could you also file a Jira at http://jira.sakaiproject.org with the test errors and someone can take a look.
Ok. Problem solved. I don't know how and I don't know the cause of the problem.
I've update JDK to _076 version and skip the test. It have no sense for me.
But it's done.
Thank you for your time and your help.

Error while running through command line in springs

I have a test class that uses #Autowired annotation and #ContextConfiguration and #Category annotations.
The test tuns fine when its run through eclipse.
But when i try running it through Command line, it is throwing the following error.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.690s
[INFO] Finished at: Wed Jun 12 09:56:48 GMT+05:30 2013
[INFO] Final Memory: 31M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.14.1:integration-test (default) on project OmnitureSeleniumTests: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.14.1:integration-test failed: There was an error in the forked process
[ERROR] java.lang.NoSuchMethodError: org.junit.runner.Request.classes(Lorg/junit/runner/Computer;[Ljava/lang/Class;)Lorg/junit/runner/Request;
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createReqestAndRun(JUnitCoreWrapper.java:128)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:111)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:84)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:138)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
I am using junit 4.8.2 and
maven-failsafe-plugin:2.14.1
There could be many configuration / environmental differences when running maven from Eclipse vs command line:
The maven version / path. In Eclipse the actual maven binary can be default / explicitly set via preferences, whereas in command line your OS will pick the first one available on your PATH env var. Check maven version using mvn -version
Maven user / global settings.xml. When running through command line typically ~/.m2/settings.xml is used but this can be explicitly overridden on Eclipse preferences
Maven local repository cache. If you have discrepancy on 1 and/or 2, you could end up with different local repository cache. Incorrect artifact distribution could cause build to fail if performed against different local repository cache.
Eclipse maven could use different version of JVM than your command line.
i have changed the version of maven-failsafe-plugin to 2.6 and it is running fine thru command line now :)

Resources