stataru8 commented on issue #287: URL: https://github.com/apache/camel-karaf/issues/287#issuecomment-2117360790
The version needs to start with an integer: https://github.com/osgi/osgi/blob/6eee417af367c749a6f84a11239d94cc63f6bdcb/org.osgi.framework/src/org/osgi/framework/Version.java#L126 There are bundles in which the version starts with a string: `<bundle dependency='true'>wrap:mvn:com.google.apis/google-api-services-drive/${google-api-services-drive-version}</bundle>` `<google-api-services-drive-version>v3-rev20240123-2.0.0</google-api-services-drive-version>` Test in which I've purposefully modified `camel-gson`: ``` karaf@root()> feature:info camel-gson Feature camel-gson 4.5.0.SNAPSHOT Feature has no configuration Feature has no configuration files Feature depends on: camel-core [4.5,4.6) Feature contains followed bundles: mvn:com.google.code.gson/gson/2.10.1 wrap:mvn:com.google.apis/google-api-services-drive/v3-rev20240123-2.0.0$Bundle-Version=v3-rev20240123-2.0.0 mvn:org.apache.camel.karaf/camel-gson/4.5.0-SNAPSHOT Feature has no conditionals. ``` `feature:install camel-gson` will result in exception ``` org.osgi.framework.BundleException: Could not create bundle object. at org.apache.felix.framework.Felix.installBundle(Felix.java:3339) at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:147) at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:120) at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:100) at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installBundle(BundleInstallSupportImpl.java:135) at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installBundle(FeaturesServiceImpl.java:1145) at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:906) at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.IllegalArgumentException: invalid version "v3-rev20240123-2.0.0": non-numeric "v3-rev20240123-2" at org.osgi.framework.Version.parseInt(Version.java:169) at org.osgi.framework.Version.<init>(Version.java:126) at org.osgi.framework.Version.valueOf(Version.java:255) at org.osgi.framework.Version.parseVersion(Version.java:226) at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:129) at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1290) at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:114) at org.apache.felix.framework.Felix.installBundle(Felix.java:3287) ... 12 more Caused by: java.lang.NumberFormatException: For input string: "v3-rev20240123-2" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) at java.base/java.lang.Integer.parseInt(Integer.java:668) at java.base/java.lang.Integer.parseInt(Integer.java:786) at org.osgi.framework.Version.parseInt(Version.java:167) ... 20 more ``` How should we proceed in these situations? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
