Closed antonyh closed 7 years ago
Extended stack trace:
java.lang.VerifyError: (class: com/day/text/Text, method: <init> signature: ()V) Constructor must call super() or this()
at com.day.cq.commons.jcr.JcrUtil.createPath(JcrUtil.java:348)
at com.day.cq.commons.jcr.JcrUtil.createUniqueNode(JcrUtil.java:292)
at com.day.cq.wcm.core.impl.PageManagerImpl.create(PageManagerImpl.java:292)
at com.day.cq.wcm.core.impl.PageManagerImpl.create(PageManagerImpl.java:263)
at project.MySpec.createpage(MySpec.groovy:56)
`
Not sure if this helpful...
Self-closing this issue; it's believed this is caused by the AEM UberJar conflicting with the mocks.
Thank you for the update. I had difficulty getting Prosper to work with the uber jar early on and haven't revisited it. At some point, I'd like to make another attempt to resolve some of those conflicting dependencies, but I'm not sure that will happen anytime soon. Hopefully you were able to find a workaround.
It turns out it wasn't the UberJar.
It could run the tests from IntelliJ without problems, but not from Maven. Updating other dependencies & plugins sorted this out - it seems to work fine with the non-obfuscated version. I ran mvn versions:display-dependency-updates
and mvn versions:display-plugin-updates
and used latest versions for plugins and for test dependencies.
I need to test programmatic page creation, but unfortunately this line is causing problems with Prosper:
pageManager.create("/content/path/to/parent", "pagename", "/apps/example/templates/page", "title");
It triggers a VerifyError:
java.lang.VerifyError: (class: com/day/text/Text, method: <init> signature: ()V) Constructor must call super() or this()
I'm using the AEM6.2 obfuscated Uberjar and Prosper 8.1.1. I've tried moving this line directly from my class into the test case, and still get this error.
Is this fixable in Propser or is it a fault in my project? Information online about this Error is scant, and mostly points to tests where real objects and mocks are interchanged, and as the test now only contains this line I'm not sure if there's anything left for me to remove! Any help would be appreciated.