Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-2236

Cannot send null values as job parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.0.1
    • Fix Version/s: Waiting for Triage
    • Component/s: Batch
    • Labels:
      None
    • Story Points:
      0
    • Rank (Obsolete):
      46151

      Description

      Cannot use a JSON null value as job paramter value, e.g.

      job launch --params {"name":null}
      

      The problem seems to be the usage of a HashTable, which does not allow null values.

      Caused by: java.lang.NullPointerException
      	at java.util.Hashtable.put(Hashtable.java:459)
      	at java.util.Hashtable.putAll(Hashtable.java:523)
      	at org.springframework.xd.dirt.plugins.job.ExpandedJobParametersConverter.getJobParametersForMap(ExpandedJobParametersConverter.java:191)
      	at org.springframework.xd.dirt.plugins.job.ExpandedJobParametersConverter.getJobParametersForJsonString(ExpandedJobParametersConverter.java:177)
      	at org.springframework.xd.dirt.plugins.job.JobLaunchRequestTransformer.toJobLaunchRequest(JobLaunchRequestTransformer.java:128)
      	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:483)
      	at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:63)
      	at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:122)
      	at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:44)
      	at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:258)
      	at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:84)
      	at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:114)
      	at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:111)
      	at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:159)
      	at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:268)
      	at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:142)
      	at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:75)
      	... 62 more 
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            prietzler Peter Rietzler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: