Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 1.6.4
    • Fix Version/s: 1.6.5
    • Component/s: Core
    • Labels:
      None

      Description

      Performing a cargo:run under Java 9 produces a NumberFormatException. The problem is the extra double quote in the string. The problem looks to be in AbstractInstalledLocalContainer around line # 372 where the following call

      jvmVersion = jvmVersion.substring(jvmVersion.indexOf('"') + 1);
      

      returns "9\"" but no subsequent calls yank off the extra \" leading to the number format exception.

      java.lang.NumberFormatException: For input string: "9""
      	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      	at java.base/java.lang.Integer.parseInt(Integer.java:652)
      	at java.base/java.lang.Integer.parseInt(Integer.java:770)
      	at org.codehaus.cargo.container.internal.util.JdkUtils.parseMajorJavaVersion(JdkUtils.java:138)
      	at org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer.createJvmLauncher(AbstractInstalledLocalContainer.java:399)
      	at org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer.startInternal(AbstractInstalledLocalContainer.java:287)
      	at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:226)
      	at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction(ContainerStartMojo.java:84)
      	at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute(ContainerRunMojo.java:96)
      	at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:462)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      

      Operating System: Linux Mint 18.2
      Java: 9+181
      Maven 3.5.0
      Tomcat 8.5.20

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                henrik H
                Reporter:
                mikeggardiner Mike Gardiner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: