Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10385

make exception include the name of the variable if FormFieldHandler.createFormField fails

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Fixed
    • L3 - Default
    • 7.12.0, 7.12.0-alpha1
    • 7.10.0
    • engine
    • None
    • Tomcat, Debian Linux

    Description

      With the released version of Camunda, I get an exception like this:

      01-Jun-2019 12:22:15.393 SEVERE [http-nio-8080-exec-9] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: failed to convert '
      arrayAzimuthDegrees' caused by java.lang.NumberFormatException: For input string: ""
       org.camunda.bpm.engine.impl.form.validator.FormFieldValidationException: failed to convert 'arrayAzimuthDegrees' caused by java.lang.NumberFormatException: For input string: "
      "
              at org.camunda.bpm.engine.impl.form.handler.FormFieldHandler.createFormField(FormFieldHandler.java:91)
              at org.camunda.bpm.engine.impl.form.handler.DefaultFormHandler.initializeFormFields(DefaultFormHandler.java:278)
              at org.camunda.bpm.engine.impl.form.handler.DefaultTaskFormHandler.createTaskForm(DefaultTaskFormHandler.java:44)
              at org.camunda.bpm.engine.impl.form.handler.CreateTaskFormInvocation.invoke(CreateTaskFormInvocation.java:37)
              at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:57)
              at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:90)
              at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:62)
              at org.camunda.bpm.engine.impl.form.handler.DelegateTaskFormHandler$1.call(DelegateTaskFormHandler.java:41)
              at org.camunda.bpm.engine.impl.form.handler.DelegateTaskFormHandler$1.call(DelegateTaskFormHandler.java:36)
              at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler.doCall(DelegateFormHandler.java:69)
              at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler$1.call(DelegateFormHandler.java:57)
              at org.camunda.bpm.engine.impl.context.ProcessApplicationClassloaderInterceptor.call(ProcessApplicationClassloaderInterceptor.java:47)
              at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:117)
              at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:128)
              at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:194)
              at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:181)
              at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler.performContextSwitch(DelegateFormHandler.java:55)
              at org.camunda.bpm.engine.impl.form.handler.DelegateTaskFormHandler.createTaskForm(DelegateTaskFormHandler.java:36)
              at org.camunda.bpm.engine.impl.cmd.GetTaskFormCmd.execute(GetTaskFormCmd.java:56)
              at org.camunda.bpm.engine.impl.cmd.GetTaskFormCmd.execute(GetTaskFormCmd.java:34)
              at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:27)
              at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:106)
              at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:69)
              at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
              at org.camunda.bpm.engine.impl.FormServiceImpl.getTaskFormData(FormServiceImpl.java:66)
              at org.camunda.bpm.engine.rest.sub.task.impl.TaskResourceImpl.getForm(TaskResourceImpl.java:186)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
              at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
              at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:159)
              at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:107)
              at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:154)
              at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:92)
              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
      

      which doesn't tell me which form field caused the problem.

      It would be nice to catch the exception in FormFieldHandler.createField and rethrow it as a FormFieldValidationException so that we can include the name of the offending variable.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              miklas.boskamp Miklas Boskamp
              DavidHodges David Hodges
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce