valtech / aem-easy-content-upgrade

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

AEM SP10 - aecu doesn't up without restart #161

Closed rafalc closed 2 years ago

rafalc commented 2 years ago

On AEM 6.5.10 AECU doesn't up while installed. You need to do restart to get it up.

Unic maven plugin reports:

Installable resources [InstallableResource, priority=2000, id=/apps/valtech/aecu/install/aecu.api-3.3.0.jar, InstallableResource, priority=2000, id=/apps/valtech/aecu/install/aecu.core-3.3.0.jar, InstallableResource, priority=2000, id=/apps/valtech/aecu/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-valtechAecuAdminUser.config, InstallableResource, priority=2000, id=/apps/valtech/aecu/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-valtechAecuSystemUser.config, InstallableResource, priority=2000, id=/apps/valtech/aecu/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-valtechAecuContentMigratorUser.config] could not be installed even after waiting 60sec

at osgi de.valtech.aecu.core bundle is in installed state due to lack of dependencies:

com.icfolson.aem.groovy.console,version=[13.0,15) -- Cannot be resolved
com.icfolson.aem.groovy.console.api,version=[13.0,15) -- Cannot be resolved
com.icfolson.aem.groovy.console.response,version=[13.0,15) -- Cannot be resolved

error.log


08.10.2021 10:09:00.059 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.tasks.BundleStartTask Could not start bundle de.valtech.aecu.core [607]. Reason: {}. Will retry.
org.osgi.framework.BundleException: Unable to resolve de.valtech.aecu.core [607](R 607.0): missing requirement [de.valtech.aecu.core [607](R 607.0)] osgi.wiring.package; (&(osgi.wiring.package=com.icfolson.aem.groovy.console)(version>=13.0.0)(!(version>=15.0.0))) Unresolved requirements: [[de.valtech.aecu.core [607](R 607.0)] osgi.wiring.package; (&(osgi.wiring.package=com.icfolson.aem.groovy.console)(version>=13.0.0)(!(version>=15.0.0)))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2281)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
        at org.apache.sling.installer.core.impl.tasks.BundleStartTask.execute(BundleStartTask.java:97) [org.apache.sling.installer.core:3.9.0.B002]
        at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:914) [org.apache.sling.installer.core:3.9.0.B002]
        at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:749) [org.apache.sling.installer.core:3.9.0.B002]
        at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:298) [org.apache.sling.installer.core:3.9.0.B002]

How to reproduce it: get bare AEM install SP10 restart install aggregated thirdparty package build with pom via curl (build package and then install via curl command)

curl -u "admin:admin" -F file=@"thirdparty-1.0.0-SNAPSHOT.zip" -F name="thirdparty-1.0.0-SNAPSHOT" -F force=true -F recurse=true -F install=true http://localhost:4502/crx/packmgr/service.jsp
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.rca.test</groupId>
    <artifactId>thirdparty</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>content-package</packaging>

    <build>
        <plugins>
            <plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <properties>
                        <acHandling>Overwrite</acHandling>
                    </properties>
                    <subPackages>
                        <subPackage>
                            <groupId>io.neba</groupId>
                            <artifactId>io.neba.neba-delivery-aem</artifactId>
                            <type>zip</type>
                            <filter>true</filter>
                        </subPackage>
                        <subPackage>
                            <groupId>com.adobe.cq</groupId>
                            <artifactId>core.wcm.components.all</artifactId>
                            <type>zip</type>
                            <filter>true</filter>
                        </subPackage>
                        <subPackage>
                            <groupId>com.adobe.cq</groupId>
                            <artifactId>core.wcm.components.extension</artifactId>
                            <type>zip</type>
                            <filter>true</filter>
                        </subPackage>
                        <subPackage>
                            <groupId>com.adobe.acs</groupId>
                            <artifactId>acs-aem-commons-content</artifactId>
                            <type>zip</type>
                            <filter>true</filter>
                        </subPackage>
                            <subPackage>
                                <groupId>de.valtech.aecu</groupId>
                                <artifactId>aecu.bundle</artifactId>
                                <filter>true</filter>
                            </subPackage>
                    </subPackages>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.unic.maven.plugins</groupId>
                <artifactId>aem-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <deployFiles>
                        <file>target/${project.build.finalName}.zip</file>
                    </deployFiles>
                </configuration>
                <executions>
                    <execution>
                        <id>validate-content</id>
                        <goals>
                            <goal>validate-content</goal>
                        </goals>
                        <phase>prepare-package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- AEM Core Components -->
        <dependency>
            <groupId>com.adobe.cq</groupId>
            <artifactId>core.wcm.components.all</artifactId>
            <type>zip</type>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.cq</groupId>
            <artifactId>core.wcm.components.extension</artifactId>
            <type>zip</type>
            <version>1.0.12</version>
        </dependency>
        <!-- Extension Packages -->
        <dependency>
            <groupId>com.adobe.acs</groupId>
            <artifactId>acs-aem-commons-content</artifactId>
            <type>zip</type>
            <version>5.0.6</version>
            <classifier>min</classifier>
        </dependency>
        <!-- Neba.io -->
        <dependency>
            <groupId>io.neba</groupId>
            <artifactId>io.neba.neba-delivery-aem</artifactId>
            <version>5.1.5</version>
            <classifier>spring</classifier>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>de.valtech.aecu</groupId>
            <artifactId>aecu.bundle</artifactId>
            <version>3.3.0</version>
            <type>zip</type>
        </dependency>
    </dependencies>
</project>
gruberrolandvaltech commented 2 years ago

Which base version is your AEMSP10? Is this AEM 6.5? If yes, please try the latest release.

rafalc commented 2 years ago

We install the package on AEM 6.5.10

gruberrolandvaltech commented 2 years ago

Please install AECU 5.1.0 then. This requires no more separate installation of Groovy Console (it is always part of the package).

rafalc commented 2 years ago

I'm quite confused by your response. That should mean that after restart it should be in the same state (missing dependency) but IT ISN'T. After restart, it works just fine. In the sake of completeness of CI process, I would like to have it working without restart. Anyway I will try with newest version.