java.lang.IllegalArgumentException: Language choice required

Spring JIRA | Shekhar Gulati | 6 years ago
  1. 0

    I created a roo i18n addon for French language using the following command addon create i18n --topLevelPackage com.shekhar.roo.addon --locale fr --messageBundle messages_fr.properties --language french perform eclipse perform package felix shell start file:///C:/dev/labs/spring-roo/addon-i18n-fr/target/com.shekhar.roo.addon-0.1.0.BUILD-SNAPSHOT.jar The addon got created without any problem. But When I am trying to use this addon in my application I am getting this exception roo> web mvc install language --code fr_fr Language choice required java.lang.IllegalArgumentException: Language choice required at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installI18n(JspOperationsImpl.java:409) at org.springframework.roo.addon.web.mvc.jsp.JspCommands.lang(JspCommands.java:46) 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.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:140) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:162) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:326) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:119) at java.lang.Thread.run(Thread.java:619)

    Spring JIRA | 6 years ago | Shekhar Gulati
    java.lang.IllegalArgumentException: Language choice required
  2. 0

    I created a roo i18n addon for French language using the following command addon create i18n --topLevelPackage com.shekhar.roo.addon --locale fr --messageBundle messages_fr.properties --language french perform eclipse perform package felix shell start file:///C:/dev/labs/spring-roo/addon-i18n-fr/target/com.shekhar.roo.addon-0.1.0.BUILD-SNAPSHOT.jar The addon got created without any problem. But When I am trying to use this addon in my application I am getting this exception roo> web mvc install language --code fr_fr Language choice required java.lang.IllegalArgumentException: Language choice required at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installI18n(JspOperationsImpl.java:409) at org.springframework.roo.addon.web.mvc.jsp.JspCommands.lang(JspCommands.java:46) 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.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:140) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:162) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:326) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:119) at java.lang.Thread.run(Thread.java:619)

    Spring JIRA | 6 years ago | Shekhar Gulati
    java.lang.IllegalArgumentException: Language choice required
  3. 0

    Promoting a build fails to run the promotion job and returns the error below. I have double checked the parameters for the job and everything seems to be in order. There are 8 parameters on the build. 6 are default values and 2 are selected from parameters dropdown before execution of the promotion. The drop down values are determined by Extensible choice, Global Choice Parameters. Started by user ****.****** Building in workspace /usr/share/tomcat7/.jenkins/workspace/svc-auto-build Promoting svc-auto-build #2637 - master FATAL: Illegal choice: java.lang.IllegalArgumentException: Illegal choice: at jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.createValueCommon(ExtensibleChoiceParameterDefinition.java:398) at jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.createValue(ExtensibleChoiceParameterDefinition.java:431) at jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.getDefaultParameterValue(ExtensibleChoiceParameterDefinition.java:451) at hudson.plugins.parameterizedtrigger.DefaultParameterValuesActionsTransform.getDefaultParameters(DefaultParameterValuesActionsTransform.java:28) at hudson.plugins.parameterizedtrigger.DefaultParameterValuesActionsTransform.transformParametersAction(DefaultParameterValuesActionsTransform.java:15) at hudson.plugins.parameterizedtrigger.ProjectSpecificParametersActionFactory.getProjectSpecificBuildActions(ProjectSpecificParametersActionFactory.java:33) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBuildActions(BuildTriggerConfig.java:351) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:419) at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:66) at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:88) at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:345) at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:287) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.Run.run(Run.java:1679) at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:232) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE

    Jenkins JIRA | 11 months ago | Stephen Nichols
    java.lang.IllegalArgumentException: Illegal choice:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    As requested by: ikedam added a comment - 20/Mar/14 2:04 PM @bedge Would you create a new issue and link to this issue? Can the exception be improved to show what the offending parameter is? I'm seeing no information on what caused the problem: FATAL: Illegal choice: java.lang.IllegalArgumentException: Illegal choice: at hudson.model.ChoiceParameterDefinition.checkValue(ChoiceParameterDefinition.java:75) at hudson.model.ChoiceParameterDefinition.createValue(ChoiceParameterDefinition.java:87) at hudson.model.ChoiceParameterDefinition.createValue(ChoiceParameterDefinition.java:19) at hudson.plugins.parameterizedtrigger.ProjectSpecificParameterValuesActionTransform.convertToDefinedType(ProjectSpecificParameterValuesActionTransform.java:67) at hudson.plugins.parameterizedtrigger.ProjectSpecificParameterValuesActionTransform.transformParametersAction(ProjectSpecificParameterValuesActionTransform.java:32) at hudson.plugins.parameterizedtrigger.ProjectSpecificParametersActionFactory.getProjectSpecificBuildActions(ProjectSpecificParametersActionFactory.java:32) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBuildActions(BuildTriggerConfig.java:290) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform2(BuildTriggerConfig.java:336) at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform2(BlockableBuildTriggerConfig.java:57) at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:85) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585) at hudson.model.Run.execute(Run.java:1676) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231)

    Jenkins JIRA | 3 years ago | Bruce Edge
    java.lang.IllegalArgumentException: Illegal choice:

    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.IllegalArgumentException

      Language choice required

      at org.springframework.roo.support.util.Assert.notNull()
    2. org.springframework.roo
      JspCommands.lang
      1. org.springframework.roo.support.util.Assert.notNull(Assert.java:112)
      2. org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installI18n(JspOperationsImpl.java:409)
      3. org.springframework.roo.addon.web.mvc.jsp.JspCommands.lang(JspCommands.java:46)
      3 frames
    3. 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
    4. org.springframework.roo
      JLineShell.run
      1. org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
      2. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
      3. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177)
      4. org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:140)
      5. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
      6. org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:162)
      7. org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:326)
      8. org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:119)
      8 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame