Hi everyone,
I'm developing a translation connector for AEMaaCS and I'm respecting the package structure for immutable and mutable contents, but I've a problem with the upload via package manager. On the error.log file, I receive this error:
26.01.2024 16:33:10.165 *ERROR* [OsgiInstallerImpl] org.apache.jackrabbit.vault.fs.io.AbstractArchive Detected unclosed archive, it has been opened here:_java.lang.Exception: Open Stack Trace_ at org.h2.util.CloseWatcher.register(CloseWatcher.java:85)_ at org.apache.jackrabbit.vault.fs.io.ZipArchive.open(ZipArchive.java:156)_ at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.getArchive(ZipVaultPackage.java:107)_ at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.getMetaInf(ZipVaultPackage.java:145)_ at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.isValid(ZipVaultPackage.java:119)_ at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:203)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.uninstall(JcrPackageImpl.java:1036)_ at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.uninstall(JcrPackageImpl.java:987)_ at com.adobe.granite.installer.factory.packages.impl.PackageTransformer$UninstallPackageTask.execute(PackageTransformer.java:484)_ at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:918)_ at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:755)_ at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:304)_ at java.base/java.lang.Thread.run(Thread.java:829)_
Strangely, it works when I install it via autoInstallPackage Maven profile, but if I install it via package manager doesn't work. Anyone know how to solve it?
That's the build of pom.xml, about the "all" module.
<build>
<plugins>
<!-- ====================================================================== -->
<!-- V A U L T P A C K A G E P L U G I N S -->
<!-- ====================================================================== -->
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>net.test.connector</group>
<packageType>container</packageType>
<properties>
<cloudManagerTarget>all</cloudManagerTarget>
</properties>
<!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
<skipSubPackageValidation>true</skipSubPackageValidation>
<embeddeds>
<embedded>
<groupId>net.test.connector</groupId>
<artifactId>connector.ui.apps</artifactId>
<type>zip</type>
<target>/apps/connector-packages/application/install</target>
</embedded>
<embedded>
<groupId>net.test.connector</groupId>
<artifactId>connector.core</artifactId>
<target>/apps/connector-packages/application/install</target>
</embedded>
<embedded>
<groupId>net.test.connector</groupId>
<artifactId>connector.ui.content</artifactId>
<type>zip</type>
<target>/apps/connector-packages/content/install</target>
</embedded>
<embedded>
<groupId>net.test.connector</groupId>
<artifactId>connector.ui.config</artifactId>
<type>zip</type>
<target>/apps/connector-packages/application/install</target>
</embedded>
</embeddeds>
</configuration>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<verbose>true</verbose>
<failOnError>true</failOnError>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.adobe.aem</groupId>
<artifactId>aemanalyser-maven-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>analyse-project</id>
<phase>verify</phase>
<goals>
<goal>project-analyse</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Solved! Go to Solution.
Views
Replies
Total Likes
I solved it by fixing filter.xml, the test install of the package manager said that there was a faulty filter, even if it didn't give it to me during compilation
Hi @keviendamico Here is the code in FileVault that checks the zip file if its open and prints that error - https://github.com/apache/jackrabbit-filevault/blob/master/vault-core/src/main/java/org/apache/jackr...
It looks like you might have the file being accessed by some program on your computer. Can you please confirm if you have that zip file opened somewhere.
Thanks
Narendra
I solved this problem but it still doesn't work from package manager, going into debug on the core, it seems like it's in a loop. I reiterate that it works with the Maven Profile "autoInstallPackage".
That's the profile:
<profile>
<id>autoInstallPackage</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
I attach the error.log file. (Logs start at 26.01.2024 17:59:48.414)
UPDATE:
from the "all" module, during the install phase, three other modules are extracted: ui.content, ui.apps and ui.config. After extraction the other modules are installed and in that context it enters an installation and uninstallation loop. I tried three steps: uninstalling the "all" module, installing the other three, and reinstalling the "all" module. And it worked, but it shouldn't work that way. I expect that from installing the "all" module the process will work. Where am I doing wrong?
In comparing to pom.xml for my projects, the only difference I see is that cloudmanagerTarget property is not present.
<properties>
<cloudManagerTarget>all</cloudManagerTarget>
</properties>
Not sure if it matters but that is my observation.
Thanks
Narendra
@keviendamico Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
I solved it by fixing filter.xml, the test install of the package manager said that there was a faulty filter, even if it didn't give it to me during compilation
Views
Likes
Replies
Views
Likes
Replies