karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Achim Nierbeck (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-3328) NumberFormatException: For input string: "SNAPSHOT" when trying to install blueprint as bundle
Date Tue, 21 Oct 2014 06:12:33 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14178015#comment-14178015
] 

Achim Nierbeck commented on KARAF-3328:
---------------------------------------

Well for the manifest it needs to be a "." 
For the maven coordinate it is OK to use the dash. But for the OSGi bundle version its a requirement
to only use dots

> NumberFormatException: For input string: "SNAPSHOT" when trying to install blueprint
as bundle
> ----------------------------------------------------------------------------------------------
>
>                 Key: KARAF-3328
>                 URL: https://issues.apache.org/jira/browse/KARAF-3328
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 3.0.1
>            Reporter: Xilai Dai
>
> karaf@root()>install -s blueprint:mvn:flows/flow_id/6.8/xml/blueprint
> it works fine when install release version blueprint xml as bundle.
> karaf@root()>install -s blueprint:mvn:flows/flow_id/6.9-SNAPSHOT/xml/blueprint
> it will failed when install snapshot version blueprint xml as bundle.
> {code}
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
>     <manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
>        Bundle-Name = flow_name
>        Bundle-Version = 6.9.SNAPSHOT
>     </manifest>
>     ......
> </blueprint>
> {code}
> {code}
> 2014-10-21 12:26:24,980 | ERROR | Local user karaf | ShellUtil                      
 | 37 - org.apache.karaf.shell.console - 3.0.1 | Exception caught while executing command
> org.apache.karaf.shell.console.MultiException: Error installing bundles:
> 	Unable to install bundle blueprint:mvn:flows/flow_id/6.9-SNAPSHOT/xml/blueprint
> 	at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:92)
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:69)
> 	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
> 	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
> 	at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
> 	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
> 	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
> 	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
> 	at org.apache.karaf.shell.console.commands.$BlueprintCommand678402633.execute(Unknown
Source)[37:org.apache.karaf.shell.console:3.0.1]
> 	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
> 	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
> 	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
> 	at org.apache.karaf.shell.console.commands.$BlueprintCommand678402633.execute(Unknown
Source)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:521)
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:212)
> 	at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:126)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:117)
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
> 	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[38:org.apache.karaf.jaas.modules:3.0.1]
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:115)[37:org.apache.karaf.shell.console:3.0.1]
> Caused by: java.lang.Exception: Unable to install bundle blueprint:mvn:flows/flow_id/6.9-SNAPSHOT/xml/blueprint
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:45)
> 	... 30 more
> Caused by: org.osgi.framework.BundleException: Invalid manifest header Bundle-Version:
"6.9.SNAPSHOT" : invalid version "6.9.SNAPSHOT": non-numeric "SNAPSHOT"
> 	at org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(StateBuilder.java:98)
> 	at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createBundleDescription(StateObjectFactoryImpl.java:33)
> 	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.updateState(BaseStorage.java:1208)
> 	at org.eclipse.osgi.internal.baseadaptor.BundleInstall.commit(BundleInstall.java:123)
> 	at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:970)
> 	at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:845)
> 	at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:1)
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
> 	at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:904)
> 	at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:840)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:137)
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
> 	... 30 more
> Caused by: java.lang.IllegalArgumentException: invalid version "6.9.SNAPSHOT": non-numeric
"SNAPSHOT"
> 	at org.osgi.framework.Version.parseInt(Version.java:170)[karaf-org.osgi.core.jar:]
> 	at org.osgi.framework.Version.<init>(Version.java:134)[karaf-org.osgi.core.jar:]
> 	at org.osgi.framework.Version.parseVersion(Version.java:233)[karaf-org.osgi.core.jar:]
> 	at org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(StateBuilder.java:94)
> 	... 41 more
> Caused by: java.lang.NumberFormatException: For input string: "SNAPSHOT"
> 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.7.0_51]
> 	at java.lang.Integer.parseInt(Integer.java:492)[:1.7.0_51]
> 	at java.lang.Integer.parseInt(Integer.java:527)[:1.7.0_51]
> 	at org.osgi.framework.Version.parseInt(Version.java:168)[karaf-org.osgi.core.jar:]
> 	... 44 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message