[ 
https://issues.apache.org/jira/browse/SLING-10223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Pauls closed SLING-10223.
------------------------------

> org.osgi.framework.Version not contained in lib folder generated from 
> appassembly
> ---------------------------------------------------------------------------------
>
>                 Key: SLING-10223
>                 URL: https://issues.apache.org/jira/browse/SLING-10223
>             Project: Sling
>          Issue Type: Bug
>          Components: Content-Package to Feature Model Converter
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: Content-Package to Feature Model Converter 1.1.0
>
>
> The application generated by {{appassembler-maven-plugin}} 
> (https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/1b7f2e900f1474809b66b57c0564e1727ff8c8de/pom.xml#L291)
>  only includes dependencies of scope "provided" 
> (https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/1b7f2e900f1474809b66b57c0564e1727ff8c8de/src/main/assembly/bin.xml#L65).
> But the class {{org.osgi.framework.Version}} used in 
> https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/1b7f2e900f1474809b66b57c0564e1727ff8c8de/src/main/java/org/apache/sling/feature/cpconverter/handlers/BundleEntryHandler.java#L99
>  is only provided via the dependency {{org.osgi:osgi.core:7.0.0}} in scope 
> {{compile}} in 
> https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/1b7f2e900f1474809b66b57c0564e1727ff8c8de/pom.xml#L170.
> That leads to exceptions like these
> {code}
> java.lang.NoClassDefFoundError: org/osgi/framework/Version
>       at 
> org.apache.sling.feature.cpconverter.handlers.BundleEntryHandler.handle(BundleEntryHandler.java:99)
>       at 
> org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.onFile(ContentPackage2FeatureModelConverter.java:401)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:110)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:102)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:102)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:102)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:102)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:102)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:102)
>       at 
> org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse(BaseVaultPackageScanner.java:89)
>       at 
> org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.secondPass(ContentPackage2FeatureModelConverter.java:246)
>       at 
> org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.convert(ContentPackage2FeatureModelConverter.java:194)
>       at 
> org.apache.sling.feature.cpconverter.cli.ContentPackage2FeatureModelConverterLauncher.run(ContentPackage2FeatureModelConverterLauncher.java:184)
>       at picocli.CommandLine.execute(CommandLine.java:996)
>       at picocli.CommandLine.access$900(CommandLine.java:142)
>       at picocli.CommandLine$RunLast.handle(CommandLine.java:1199)
>       at picocli.CommandLine$RunLast.handle(CommandLine.java:1167)
>       at 
> picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1075)
>       at picocli.CommandLine.parseWithHandlers(CommandLine.java:1358)
>       at picocli.CommandLine.run(CommandLine.java:1817)
>       at picocli.CommandLine.run(CommandLine.java:1747)
>       at 
> org.apache.sling.feature.cpconverter.cli.ContentPackage2FeatureModelConverterLauncher.main(ContentPackage2FeatureModelConverterLauncher.java:308)
> Caused by: java.lang.ClassNotFoundException: org.osgi.framework.Version
>       at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
>       at 
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
>       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
>       ... 22 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to