Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.67.x-blue] RHPAM-3709: upgrade maven dependencies to address CVE-2021-26291 #298

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

baldimir
Copy link
Member

Replaces #297

@baldimir
Copy link
Member Author

jenkins retest this

@mareknovotny
Copy link
Member

All 4 Kafka related tests failed due

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
	at org.springframework.test.context.junit4.rules.SpringClassRule.<clinit>(SpringClassRule.java:87)
	at org.jbpm.workitem.springboot.samples.KafkaProxyBase.<clinit>(KafkaProxyBase.java:60)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
	at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:186)
	at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1105)
	at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1086)
	at java.base/java.lang.reflect.Field.get(Field.java:418)
	at org.junit.runners.model.FrameworkField.get(FrameworkField.java:93)
	at org.junit.runners.model.TestClass.collectAnnotatedFieldValues(TestClass.java:249)
	at org.junit.runners.ParentRunner.classRules(ParentRunner.java:280)
	at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:217)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:412)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 23 more

@gitgabrio
Copy link

All 4 Kafka related tests failed due

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
	at org.springframework.test.context.junit4.rules.SpringClassRule.<clinit>(SpringClassRule.java:87)
	at org.jbpm.workitem.springboot.samples.KafkaProxyBase.<clinit>(KafkaProxyBase.java:60)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
	at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:186)
	at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1105)
	at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1086)
	at java.base/java.lang.reflect.Field.get(Field.java:418)
	at org.junit.runners.model.FrameworkField.get(FrameworkField.java:93)
	at org.junit.runners.model.TestClass.collectAnnotatedFieldValues(TestClass.java:249)
	at org.junit.runners.ParentRunner.classRules(ParentRunner.java:280)
	at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:217)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:412)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 23 more

Exception due to that modification

@baldimir
Copy link
Member Author

I pushed a potential fix for the failing tests. 🤞

Copy link

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@gitgabrio
Copy link

@baldimir
This is the current dependency tree related to loggin issue:

[INFO] --- dependency:3.6.1:tree (default-cli) @ jbpm-workitem-itests ---
[INFO] org.jbpm.contrib:jbpm-workitem-itests:jar:7.67.2-SNAPSHOT
[INFO] +- org.kie:jbpm-spring-boot-starter-basic:jar:7.67.2-SNAPSHOT:compile
[INFO] |  \- org.springframework.boot:spring-boot-starter:jar:2.5.15:compile
[INFO] |     \- org.springframework.boot:spring-boot-starter-logging:jar:2.5.15:compile
[INFO] |        \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] \- org.jbpm.contrib:kafka-workitem:jar:7.67.2-SNAPSHOT:test
[INFO]    \- org.slf4j:slf4j-api:jar:1.7.30:compile

As it is, the build works because org.slf4j:jul-to-slf4j:jar:1.7.30:compile is bringed in transitively.
I think it is fine to rely on org.springframework.boot:spring-boot-starter.

@mareknovotny mareknovotny merged commit b42c593 into kiegroup:7.67.x-blue Apr 3, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants