Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.5
-
None
-
None
Description
i got the following feature repository definition, which i copy to the data/tmp folder
<?xml version="1.0" encoding="UTF-8"?> <features name="portrix-vgm-dependencies" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"> <feature name="vgm-core" version="1.0.0" description="Oracle driver and other dependencies combined"> <details> Feature definition to combine different bundles needed to run the VGM messaging platform </details> <!-- a version can only consist of 3 parts seperated by dots --> <bundle>wrap:file:data/tmp/ojdbc7.jar$Bundle-SymbolicName=Oracle-JDBC&Bundle-Version=12.1.0</bundle> <bundle>mvn:org.apache.commons/commons-lang3/3.5</bundle> <bundle>mvn:org.glassfish/javax.json/1.1</bundle> <bundle>mvn:com.googlecode.java-diff-utils/diffutils/1.3.0</bundle> </feature> </features>
The repository is added to the featuresRepositories inside the org.apache.karaf.features.cfg file and the feature itself is added to featuresBoot. Since my feature relies on the wrap feature, I surrounded the default boot features in brackets.
featuresRepositories = \
mvn:org.apache.karaf.features/framework/4.1.5/xml/features, \
mvn:org.apache.karaf.features/spring/4.1.5/xml/features, \
mvn:org.apache.karaf.features/standard/4.1.5/xml/features, \
mvn:org.apache.karaf.features/enterprise/4.1.5/xml/features, \
file:data/tmp/vgm-karaf-dependencies.xml
featuresBoot = \
(instance, \
package, \
log, \
ssh, \
aries-blueprint, \
framework, \
system, \
eventadmin, \
feature, \
shell, \
management, \
service, \
jaas, \
shell-compat, \
deployer, \
diagnostic, \
wrap, \
bundle, \
config, \
kar), \
vgm-core
When i start Karaf afterwards, i get the following exception:
2018-04-18T13:05:29,863 | INFO | pool-1-thread-2 | FeaturesServiceImpl | 10 - org.apache.karaf.features.core - 4.1.5 | Adding features: vgm-core/[1.0.0,1.0.0] 2018-04-18T13:05:29,958 | ERROR | pool-1-thread-2 | BootFeaturesInstaller | 10 - org.apache.karaf.features.core - 4.1.5 | Error installing boot features org.apache.karaf.features.internal.util.MultiException: Error: Unable to create resource for bundle wrap:file:data/tmp/ojdbc7.jar$Bundle-SymbolicName=Oracle-JDBC&Bundle-Version=12.1.0 at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84) ~[?:?] at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72) ~[?:?] at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:375) ~[?:?] at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:372) ~[?:?] at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:187) ~[?:?] at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:291) ~[?:?] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248) ~[?:?] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Suppressed: java.lang.Exception: Unable to create resource for bundle wrap:file:data/tmp/ojdbc7.jar$Bundle-SymbolicName=Oracle-JDBC&Bundle-Version=12.1.0 at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:612) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.region.Subsystem$1.downloaded(Subsystem.java:402) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:350) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:335) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:259) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61) [10:org.apache.karaf.features.core:4.1.5] at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:61) [10:org.apache.karaf.features.core:4.1.5] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: org.osgi.framework.BundleException: Unable to build resource for wrap:file:data/tmp/ojdbc7.jar$Bundle-SymbolicName=Oracle-JDBC&Bundle-Version=12.1.0: Unsupported 'Bundle-ManifestVersion' value: 1 at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:80) ~[?:?] at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:69) ~[?:?] at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:610) ~[?:?] ... 15 more Caused by: org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1 at org.apache.karaf.features.internal.resolver.ResourceBuilder.doBuild(ResourceBuilder.java:88) ~[?:?] at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:78) ~[?:?] at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:69) ~[?:?] at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:610) ~[?:?] ... 15 more
This only happens , if the wrapped jar file is located inside the data/tmp folder.
Putting it anywhere else, Karaf starts without any errors.