Problem I encountered with newest available AEM archetype (May 2023) and running unit tests is the method:
aemContext.load().json("file.json","/path/in/aem")
It gives out the following exception:
java.lang.IllegalStateException: Unable to enable secure processing
This is a very common way to load content on to the test runtime. I'm curious why this doesn't just work on the official maven project.
Solved! Go to Solution.
Views
Replies
Total Likes
I was able to find a solution here: https://binarycipher.dev/java-lang-illegalstateexception-unable-to-enable-secure-processing/
And it just consists on adding the following dependency to the core maven project:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.2</version>
<scope>test</scope>
</dependency>
I hope this gets added to the dependencies for the archetype for future releases
I was able to find a solution here: https://binarycipher.dev/java-lang-illegalstateexception-unable-to-enable-secure-processing/
And it just consists on adding the following dependency to the core maven project:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.2</version>
<scope>test</scope>
</dependency>
I hope this gets added to the dependencies for the archetype for future releases
It would be great if you can create an issue in the official GitHub repository so it can be addressed in future releases of the archetype. https://github.com/adobe/aem-project-archetype/issues