title: JMeter JDBC stored Procedure invocation with BLOB parameter
body: <p>For testing purpose I need to invoke a DB2 Stored Procedure via JMeter.</p>
  
  <p>I set up a <strong>JDBC connection</strong>, then add the <strong>JDBC Request</strong> step, but I have problem when populating the parameters.</p>
  
  <p>The problem is that one of the parameters is a BLOB taken from a .bin file, and I can't find a way to insert it. The parameter are read from a CSV file.</p>
  
  <p>What I did was:</p>
  
  <pre><code>Query Type: Callable statement
  CALL MY.STOREDPROCEDURE(?,?,?)
  
  Parameter values: ${par1},FROM_FILE('${par2}'),'a'
  Parameter types: IN VARCHAR, INOUT BLOB, OUT VARCHAR
  </code></pre>
  
  <p>The error I get is that it can't convert String to Blob (</p>
  
  <blockquote>
    <p>Illegal conversion: can not convert from "java.lang.String" to
    "java.sql.Blob" ERRORCODE=-4474 SQLSTAT=null.).</p>
  </blockquote>
  
  <p>I think that the problem is that the FROM_FILE function return a String with the content of the file. 
  Following an idea I found on-line I set up a <strong>JSR233 Sampler</strong> to load the file with a Groovy script, I saved the file as an Object, but when i read it it still seems to be read as a String, even with a groovy script (${__groovy()}).</p>
  
  <p>I tried to do add a cast in the invocation but then I will get an error about the  "Literal replacement parsing failed for procedure call".</p>
  
  <p>How can I pass a Blob to the invocation?</p>