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

GitHub | lasercar | 3 months ago
  1. 0

    GitHub comment 1321#242670371

    GitHub | 3 months ago | lasercar
    java.lang.NumberFormatException: For input string: "0-SNAPSHOT"
  2. 0

    BigInteger NumberFormatException on valid big binary string

    Stack Overflow | 4 years ago | jmissao
    java.lang.NumberFormatException: For input string: "1001110000000100"
  3. 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"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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"
  6. 0

    Missing Try/Catch loop

    GitHub | 2 years ago | jztech101
    java.lang.NumberFormatException: For input string: "weather"
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:65)[?:1.8.0_92-internal]
    2. java.lang.Integer.parseInt(Integer.java:580)[?:1.8.0_92-internal]
    3. java.lang.Integer.parseInt(Integer.java:615)[?:1.8.0_92-internal]
    3 frames
  3. com.plotsquared.sponge
    SpongeMain.getPluginVersion
    1. com.plotsquared.sponge.SpongeMain.getPluginVersion(SpongeMain.java:175)[SpongeMain.class:?]
    1 frame
  4. com.intellectualcrafters.plot
    PS.<init>
    1. com.intellectualcrafters.plot.PS.<init>(PS.java:138)[PS.class:?]
    1 frame
  5. com.plotsquared.sponge
    SpongeMain.onServerAboutToStart
    1. com.plotsquared.sponge.SpongeMain.onServerAboutToStart(SpongeMain.java:137)[SpongeMain.class:?]
    1 frame
  6. org.spongepowered.common
    RegisteredListener.handle
    1. org.spongepowered.common.event.listener.GameAboutToStartServerEventListener_SpongeMain_onServerAboutToStart23.handle(Unknown Source)[?:?]
    2. org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)[RegisteredListener.class:1.10.2-2052-5.0.0-BETA-1680]
    2 frames
  7. org.spongepowered.mod
    SpongeMod.onStateEvent
    1. org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:349)[SpongeModEventManager.class:1.10.2-2052-5.0.0-BETA-1680]
    2. org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:390)[SpongeModEventManager.class:1.10.2-2052-5.0.0-BETA-1680]
    3. org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:215)[SpongeMod.class:1.10.2-2052-5.0.0-BETA-1680]
    3 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0_92-internal]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0_92-internal]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_92-internal]
    4. java.lang.reflect.Method.invoke(Method.java:498)[?:1.8.0_92-internal]
    4 frames
  9. Guava
    EventBus.post
    1. com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)[minecraft_server.1.10.2.jar:?]
    2. com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)[minecraft_server.1.10.2.jar:?]
    3. com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)[minecraft_server.1.10.2.jar:?]
    4. com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)[minecraft_server.1.10.2.jar:?]
    5. com.google.common.eventbus.EventBus.post(EventBus.java:275)[minecraft_server.1.10.2.jar:?]
    5 frames
  10. MC Forge
    LoadController.propogateStateMessage
    1. net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)[LoadController.class:?]
    2. net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)[LoadController.class:?]
    2 frames
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0_92-internal]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0_92-internal]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_92-internal]
    4. java.lang.reflect.Method.invoke(Method.java:498)[?:1.8.0_92-internal]
    4 frames
  12. Guava
    EventBus.post
    1. com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)[minecraft_server.1.10.2.jar:?]
    2. com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)[minecraft_server.1.10.2.jar:?]
    3. com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)[minecraft_server.1.10.2.jar:?]
    4. com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)[minecraft_server.1.10.2.jar:?]
    5. com.google.common.eventbus.EventBus.post(EventBus.java:275)[minecraft_server.1.10.2.jar:?]
    5 frames
  13. MC Forge
    FMLCommonHandler.handleServerAboutToStart
    1. net.minecraftforge.fml.common.LoadController.redirect$onPost$0(LoadController.java:53)[LoadController.class:?]
    2. net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)[LoadController.class:?]
    3. net.minecraftforge.fml.common.Loader.serverAboutToStart(Loader.java:908)[Loader.class:?]
    4. net.minecraftforge.fml.common.FMLCommonHandler.handleServerAboutToStart(FMLCommonHandler.java:287)[FMLCommonHandler.class:?]
    4 frames
  14. MC Server
    MinecraftServer.run
    1. net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:264)[ld.class:?]
    2. net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)[MinecraftServer.class:?]
    2 frames
  15. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[?:1.8.0_92-internal]
    1 frame