title: Groovy convert String to Long
body: <p>I'm coding a jenkins pipeline and I need to convert a String parameter in a Long value.</p>
  
  <p>I have used Long.valueOf, Long.parseLong. I get this error message :</p>
  
  <blockquote>
    <p>hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: java.lang.Class.parseLong() is applicable for argument types: (java.lang.String) values: [8899986991733205013]</p>
  </blockquote>
  
  <p>or this :</p>
  
  <blockquote>
    <p>hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: java.lang.Class.valueOf() is applicable for argument types: (java.lang.String) values: [8899986991733205013]</p>
  </blockquote>
  
  <p>my code :</p>
  
  <pre><code>    def min = Long.valueOf(params.paymentid) + Integer.valueOf(params.begin)
      def max = Long.valueOf(params.paymentid) + Integer.valueOf(params.end)
  </code></pre>
  
  <p>Any idea ?
  Thanks.</p>