valtech / aem-easy-content-upgrade

AEM Easy Content Upgrade simplifies content migrations in AEM projects
Other
61 stars 27 forks source link

Does not work on 6.5.6.0 #219

Closed krystian-panek-vmltech closed 1 year ago

krystian-panek-vmltech commented 1 year ago

Hey! ;)

Tried to install recent AECU complete 6.4.0 on AEM 6.5.6.0 but having the following issues:

image

Basing on the table available here:

image

I suppose it should work but it does not :/ Any help appreciated ;)

Greetings, Krystian

nhirrle commented 1 year ago

Hi @krystian-panek-wttech

Thanks for the bug report. Indeed, 6.5.3 is not supported anymore by AECU, I will go ahead and update the Readme.md.

AEM 6.5.13 is required as a a minimum https://github.com/valtech/aem-easy-content-upgrade/blob/develop/pom.xml#L493-L497 or AEM Cloud Servcie.

If you need older support you could use an old version https://github.com/valtech/aem-easy-content-upgrade/releases/tag/3.1.1 but we won't provide further updates on this one.

krystian-panek-vmltech commented 1 year ago

Thanks for quick clarification.

I suppose because AECU depends on uber jar pointing to some specific version? Or maybe it is using some meaningful Sling API avaliable only in more recent AEM? I am asking to identify potential challenges when making it compatible with older versions of AEM...

So for now I rather need to fork AECU and build it on my own.. :/

nhirrle commented 1 year ago

I'll need to cross check again but it's likely to reuse the same codebase for AEM on prem and cloud and not dealing with seperate branches. I cannot make promises right now. SP6 is quite old, actually not even supported anymore by Adobe - 17 is the latest one. Any chance to upgrade ?

Or if not, use an old aecu version instead until AEM got upgraded?

krystian-panek-vmltech commented 1 year ago

Before doing upgrades and installing SPs we wanted to improve a few things at first, do repo restructuring usingAECU/Groovy Scripts :)

krystian-panek-vmltech commented 1 year ago

ok fine enough, closing

krystian-panek-vmltech commented 1 year ago

hmm interesting @nhirrle you suggested 3.1.1 ... but I spotted that uber-jar dependency upgrade was done after 6.0.1 ... so I tried with 6.0.1 and it seems to work on 6.5.6 :)

nhirrle commented 1 year ago

hi @krystian-panek-wttech Oh indeed, I made a mistake here (checked the commit date instead of comparing tags). Good that you spotted.

krystian-panek-vmltech commented 1 year ago

almost work... I have a problem with hook:

AECU InstallHook: Executed script /conf/groovyconsole/scripts/aecu/foo/hello-world.groovy, output:

 java.lang.NoClassDefFoundError: jdk/internal/reflect/ConstructorAccessorImpl
 at java.base/jdk.internal.misc.Unsafe.defineClass0(Native Method)
 at java.base/jdk.internal.misc.Unsafe.defineClass(Unsafe.java:1192)
 at java.base/jdk.internal.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
  at java.base/jdk.internal.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:400)
   at java.base/jdk.internal.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:394)
   at java.base/java.security.AccessController.doPrivileged(Native Method)
...

 Caused by: java.lang.ClassNotFoundException: Unable to load class 'jdk.internal.reflect.ConstructorAccessorImpl'
                            at org.apache.felix.framework.BundleWiringImpl$1.loadClass(BundleWiringImpl.java:91)
                            at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
                            at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1463)
                            at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
                            at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
                            at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 122 more
Error during processing:
...

any clue?

image image
subiron commented 1 year ago

@krystian-panek-wttech

Hi again ;) see: https://issues.apache.org/jira/browse/FELIX-6184 tl;dr check if org.osgi.framework.bootdelegation exposes: jdk.internal.reflect in your AEM instance sling.properties BR

krystian-panek-vmltech commented 1 year ago

no no, groovy console never needed this. it is more like classloader issue; I just restarted instance totally and it started working without doing this ;) so I can confirm it that AECU 6.0.1 works on AEM 6.5.6

krystian-panek-vmltech commented 1 year ago

yes, you are right @subiron ;) I missed your comment but finally found https://issues.apache.org/jira/browse/FELIX-6184 I see that @nhirrle was also struggling with that issue ;)

pretty nasty one; thanks, guys! :)

PS. In return for your help... and if you still need to manage on-prem AEMs you could consider using the tool that I recently created - https://github.com/wttech/aemc

krystian-panek-vmltech commented 1 year ago

how about documenting the need for a workaround mentioned in FELIX-6184 being a prerequisite for using AEM Groovy Console and AECU on 6.5.x and Java 11? :) I was bleeding here for a moment because of that thing. It would be nice to prevent wasting it by anyone else no more. I could update the readme if you wish/agree.

nhirrle commented 1 year ago

Hi @krystian-panek-wttech

Thanks for the link to the aemc tool, I will check it out further, didn't knew it yet :)

The issue in FELIX-6184 is in general with AEM 6.5 and Java 11, not related to AECU or Groovy. If you work with java 8 you don't have the issue. Did a quick Google search and Adobe Documentation is somehow pretty hidden https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/troubleshooting.html?lang=en But looks like it's mentioned as well within your company blog. https://wttech.blog/blog/2020/aem-on-java-11-with-gradle/#3-bypass-known-felix-6184-issue

Anyhow, will update docs with the Version Infos and a hint for the sling property adoption.

krystian-panek-vmltech commented 1 year ago

Thanks! Greetings