Hi ,
Just updating the post again on what all outstanding issues we have apart from the below one
1. Open SSO login is not working for us after SP19 upgrade. - We are working with Adobe on this one
2. Our delete functionality is custom to move it to a recycle bin folder, this too not working due to some JavaScript issues. We are on this one too
These are the major ones
We are trying to upgrade our environment to SP19 and seeing lot of issues. Among it, one of it is while updating uber jar to 6.5.19 as below.
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.5.19</version>
<classifier>apis-with-deprecations</classifier>
<scope>provided</scope>
</dependency>
We are using junit version as below
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.4.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.4.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>3.4.6</version>
<scope>test</scope>
</dependency>
The issue is that most of our test class where we use AEMContext
For eg:
Asset asset1 = context.create().asset("/content/dam/asset.jpg", new InputStream() {
@Override
public int read() throws IOException {
return -1;
}
}, "image/jpg", ImmutableMap.<String, Object>builder()
.put("prism:expirationDate", "2020-03-25T11:51:00.000-04:00")
.put(com.day.cq.dam.api.DamConstants.DC_FORMAT, "image/jpeg")
.put(com.day.cq.dam.scene7.api.constants.Scene7Constants.PN_S7_FILE_AVS, "Asset-AVS")
.build()
);
This fails and the error is
java.lang.NoClassDefFoundError: org/apache/commons/io/build/AbstractStreamBuilder
Any thoughts here? Has anyone recently upgraded to SP19 and facing issues with test classes failing?
Also, is it mandatory to update the uber jar when we do Service pack updates?
Update:
We commented the problematic junit classes and did the deployment with uber jar update. Still SSO login issue and other SP19 issues are outstanding.
Solved! Go to Solution.
Views
Replies
Total Likes
I also bumped into the "java.lang.NoClassDefFoundError: org/apache/commons/io/build/AbstractStreamBuilder" unit test error after upgrading to SP19.
I checked in the depfinder for org.apache.commons.io, bundle was found, Maven dependency on the right column:
<dependency>
<artifactId>commons-io</artifactId>
<version>2.13.0</version>
<groupId>commons-io</groupId>
<scope>provided</scope>
</dependency>
Once I added this dependency to my parent pom.xml file, unit tests were no longer broken, all passed.
(I'm running into other issues but not related to unit tests).
Did we try to explicitly download the dependency bundle which is throwing NoClassDefFoundError, include it as part of META-INF and then rerun the entire build to see if error goes away.
Maven Repository: org.apache.commons » commons-io » 1.3.2 (mvnrepository.com)
Can you please let me know which version of dependency are we trying to import for java.lang.NoClassDefFoundError: org/apache/commons/io/build/AbstractStreamBuilder ?
I am assuming this is the error you are still getting right?
I also bumped into the "java.lang.NoClassDefFoundError: org/apache/commons/io/build/AbstractStreamBuilder" unit test error after upgrading to SP19.
I checked in the depfinder for org.apache.commons.io, bundle was found, Maven dependency on the right column:
<dependency>
<artifactId>commons-io</artifactId>
<version>2.13.0</version>
<groupId>commons-io</groupId>
<scope>provided</scope>
</dependency>
Once I added this dependency to my parent pom.xml file, unit tests were no longer broken, all passed.
(I'm running into other issues but not related to unit tests).
@22838leo Thanks for that update Leo. Does that mean you didn't upgrade any of the other maven dependencies as in the above post like mockito or jnuit, than just this one to fix the issue? Let me try that and will update here
Uh, my bad, I forgot to mention those. I did upgrade a couple of testing dependencies: the org.mockito ones (ex: mockito-core) to 5.2.0, io.wcm.testing.aem-mock.junit5 one to 5.1.2.
My ui.apps package had an error:
[INFO] --- filevault-package:1.1.4:validate-files (default-validate-files) @ mymodule.ui.apps.structure ---
[INFO] Using generatedMetaInfRootDirectory: /path/to/project/mymodule/ui.apps.structure/target/vault-work/META-INF and metaInfRootDir: null
[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.4:validate-files (default-validate-files) on project mymodule.ui.apps.structure: Execution default-validate-files of goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.4:validate-files failed: Error loading node types from CND at tccl:aem.cnd: Could not load resource 'aem.cnd' from classLoader 'ClassRealm[project>com.my.project:mymodule.ui.apps.structure:1.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]' -> [Help 1]
I bumped the filevault package maven plugin dependency to 1.1.6 (latest available in my company's repo, and also the version on the latest - 47 - archetype), but now it's showing other errors, in ui.apps package too, most notably:
[ERROR] ValidationViolation: "jackrabbit-accesscontrol: Found no access control list, but there is supposed to be one contained as the property 'acHandling' is set to 'MERGE'!"
(Either way, filevault package plugin at 1.1.4 or 1.1.6, still not out of the woods...)
Nevermind those filevault maven package plugin errors. I'd forgotten to "Invalidate Caches" in IntelliJ. I created a fresh clone of my Git project, changed the uber-jar dependency to 6.5.19 and added the apache commons-io maven dependency in the parent pom.xml file, and the build ended successfully. No other dependencies needed to be updated (mockito-core, aem-mock.junit5, filevault package plugin).
It worked
If you upgrade to 5.x.x version. I assume you are using java 11.
Yes, that's right. I'm on Java 11, jUnit 5.