java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "0-SNAPSHOT"

Spring JIRA | Hendy Irawan | 7 years ago
  1. 0

    When running mvn install on a project generated by spring-osgi-bundle archetype v.1.2.0, I got this: [INFO] Building jar: /home/ceefour/project/x/caterpillar/target/caterpillar-1.0-SNAPSHOT.jar [INFO] [com.springsource.bundlor.:transform {execution: bundle-manifest}] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] java.lang.NumberFormatException: For input string: "0-SNAPSHOT" [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "0-SNAPSHOT" at com.springsource.bundlor.support.StandardBundleTransformer.generateManifest(StandardBundleTransformer.java:220) at com.springsource.bundlor.maven.plugin.AbstractBundlorMojo.execute(AbstractBundlorMojo.java:207) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.NumberFormatException: For input string: "0-SNAPSHOT" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:456) at java.lang.Integer.parseInt(Integer.java:497) at org.osgi.framework.Version.<init>(Version.java:132) at com.springsource.util.osgi.manifest.internal.StandardPackageExport.<init>(StandardPackageExport.java:119) at com.springsource.util.osgi.manifest.internal.ExportPackageDelegate.parseHeaderEntries(ExportPackageDelegate.java:58) at com.springsource.util.osgi.manifest.internal.ListBasedDelegate.<init>(ListBasedDelegate.java:21) at com.springsource.util.osgi.manifest.internal.ExportPackageDelegate.<init>(ExportPackageDelegate.java:48) at com.springsource.util.osgi.manifest.internal.StandardBundleManifest.<init>(StandardBundleManifest.java:164) at com.springsource.util.osgi.manifest.internal.StandardBundleManifest.<init>(StandardBundleManifest.java:118) at com.springsource.util.osgi.manifest.BundleManifestFactory.createBundleManifest(BundleManifestFactory.java:58) at com.springsource.bundlor.support.BundleManifestUtils.createBundleManifest(BundleManifestUtils.java:57) at com.springsource.bundlor.support.BundleManifestMerger.mergeBundleManifests(BundleManifestMerger.java:97) at com.springsource.bundlor.support.BundleManifestMerger.mergeBundleManifests(BundleManifestMerger.java:77) at com.springsource.bundlor.support.ManifestCreator.create(ManifestCreator.java:173) at com.springsource.bundlor.support.StandardBundleTransformer.generateManifest(StandardBundleTransformer.java:217) ... 19 more Looking at the POM, this is what the archetype generated: <manifestHeaders><![CDATA[Bundle-ManifestVersion: 2 Bundle-Name: caterpillar Bundle-Version: 1.0-SNAPSHOT Bundle-SymbolicName: caterpillar Spring-DM-Version: ${pom.version} ]]></manifestHeaders> Which seems not right, manually changing it to: <manifestHeaders><![CDATA[Bundle-ManifestVersion: 2 Bundle-Name: caterpillar Bundle-Version: 1.0.0.SNAPSHOT Bundle-SymbolicName: caterpillar Spring-DM-Version: 1.2.0 ]]></manifestHeaders> works.

    Spring JIRA | 7 years ago | Hendy Irawan
    java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "0-SNAPSHOT"
  2. 0

    When running mvn install on a project generated by spring-osgi-bundle archetype v.1.2.0, I got this: [INFO] Building jar: /home/ceefour/project/x/caterpillar/target/caterpillar-1.0-SNAPSHOT.jar [INFO] [com.springsource.bundlor.:transform {execution: bundle-manifest}] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] java.lang.NumberFormatException: For input string: "0-SNAPSHOT" [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "0-SNAPSHOT" at com.springsource.bundlor.support.StandardBundleTransformer.generateManifest(StandardBundleTransformer.java:220) at com.springsource.bundlor.maven.plugin.AbstractBundlorMojo.execute(AbstractBundlorMojo.java:207) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.NumberFormatException: For input string: "0-SNAPSHOT" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:456) at java.lang.Integer.parseInt(Integer.java:497) at org.osgi.framework.Version.<init>(Version.java:132) at com.springsource.util.osgi.manifest.internal.StandardPackageExport.<init>(StandardPackageExport.java:119) at com.springsource.util.osgi.manifest.internal.ExportPackageDelegate.parseHeaderEntries(ExportPackageDelegate.java:58) at com.springsource.util.osgi.manifest.internal.ListBasedDelegate.<init>(ListBasedDelegate.java:21) at com.springsource.util.osgi.manifest.internal.ExportPackageDelegate.<init>(ExportPackageDelegate.java:48) at com.springsource.util.osgi.manifest.internal.StandardBundleManifest.<init>(StandardBundleManifest.java:164) at com.springsource.util.osgi.manifest.internal.StandardBundleManifest.<init>(StandardBundleManifest.java:118) at com.springsource.util.osgi.manifest.BundleManifestFactory.createBundleManifest(BundleManifestFactory.java:58) at com.springsource.bundlor.support.BundleManifestUtils.createBundleManifest(BundleManifestUtils.java:57) at com.springsource.bundlor.support.BundleManifestMerger.mergeBundleManifests(BundleManifestMerger.java:97) at com.springsource.bundlor.support.BundleManifestMerger.mergeBundleManifests(BundleManifestMerger.java:77) at com.springsource.bundlor.support.ManifestCreator.create(ManifestCreator.java:173) at com.springsource.bundlor.support.StandardBundleTransformer.generateManifest(StandardBundleTransformer.java:217) ... 19 more Looking at the POM, this is what the archetype generated: <manifestHeaders><![CDATA[Bundle-ManifestVersion: 2 Bundle-Name: caterpillar Bundle-Version: 1.0-SNAPSHOT Bundle-SymbolicName: caterpillar Spring-DM-Version: ${pom.version} ]]></manifestHeaders> Which seems not right, manually changing it to: <manifestHeaders><![CDATA[Bundle-ManifestVersion: 2 Bundle-Name: caterpillar Bundle-Version: 1.0.0.SNAPSHOT Bundle-SymbolicName: caterpillar Spring-DM-Version: 1.2.0 ]]></manifestHeaders> works.

    Spring JIRA | 7 years ago | Hendy Irawan
    java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "0-SNAPSHOT"
  3. 0

    Create channel P2 feature could result in ERROR 500

    GitHub | 2 years ago | maggu2810
    java.lang.NumberFormatException: For input string: "201503190807"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.osgi.service.indexer.impl.types.VersionRange fails on "[1,)"

    GitHub | 2 years ago | pdwinkel
    java.lang.NumberFormatException: For input string: "[1,)"
  6. 0

    Workspace Repository View is empty

    GitHub | 5 years ago | hwieder
    java.lang.NumberFormatException: For input string: "Bundle-Version}"

  1. filpgame 4 times, last 2 weeks ago
  2. MoYapro 1 times, last 1 month ago
  3. Handemelindo 1 times, last 1 month ago
  4. silex 6 times, last 1 month ago
  5. ajinkya_w 3 times, last 1 month ago
31 more registered users
64 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NumberFormatException

    For input string: "0-SNAPSHOT"

    at java.lang.NumberFormatException.forInputString()
  2. Java RT
    Integer.parseInt
    1. java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    2. java.lang.Integer.parseInt(Integer.java:456)
    3. java.lang.Integer.parseInt(Integer.java:497)
    3 frames
  3. OSGi
    Version.<init>
    1. org.osgi.framework.Version.<init>(Version.java:132)
    1 frame
  4. com.springsource.util
    BundleManifestFactory.createBundleManifest
    1. com.springsource.util.osgi.manifest.internal.StandardPackageExport.<init>(StandardPackageExport.java:119)
    2. com.springsource.util.osgi.manifest.internal.ExportPackageDelegate.parseHeaderEntries(ExportPackageDelegate.java:58)
    3. com.springsource.util.osgi.manifest.internal.ListBasedDelegate.<init>(ListBasedDelegate.java:21)
    4. com.springsource.util.osgi.manifest.internal.ExportPackageDelegate.<init>(ExportPackageDelegate.java:48)
    5. com.springsource.util.osgi.manifest.internal.StandardBundleManifest.<init>(StandardBundleManifest.java:164)
    6. com.springsource.util.osgi.manifest.internal.StandardBundleManifest.<init>(StandardBundleManifest.java:118)
    7. com.springsource.util.osgi.manifest.BundleManifestFactory.createBundleManifest(BundleManifestFactory.java:58)
    7 frames
  5. com.springsource.bundlor
    AbstractBundlorMojo.execute
    1. com.springsource.bundlor.support.BundleManifestUtils.createBundleManifest(BundleManifestUtils.java:57)
    2. com.springsource.bundlor.support.BundleManifestMerger.mergeBundleManifests(BundleManifestMerger.java:97)
    3. com.springsource.bundlor.support.BundleManifestMerger.mergeBundleManifests(BundleManifestMerger.java:77)
    4. com.springsource.bundlor.support.ManifestCreator.create(ManifestCreator.java:173)
    5. com.springsource.bundlor.support.StandardBundleTransformer.generateManifest(StandardBundleTransformer.java:217)
    6. com.springsource.bundlor.maven.plugin.AbstractBundlorMojo.execute(AbstractBundlorMojo.java:207)
    6 frames
  6. Maven Plugin
    DefaultPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
    1 frame
  7. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
    2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
    3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
    4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
    5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
    6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
    7. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
    8. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
    8 frames
  8. M3 Interceptor
    MavenCli.main
    1. org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  10. Plexus
    Launcher.main
    1. org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    2. org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    3. org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    4. org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    4 frames