title: insert blob with spring jdbctemplate
body: <p>I am trying to insert blob in table using jdbctemplate by following code</p>
  
  <pre><code>LobHandler handler = new DefaultLobHandler();
  int dbresponse = jdbcTemplate.update(DBConstants.INSERT_INVOICE, new Object[]{invoiceBean.getVendorid(),
          new SqlLobValue(invoiceBean.getInvoiceImage(), invoiceBean.getInvoiveImageLength(), handler), invoiceBean.getInvoiceDate()}, 
          Types.INTEGER,Types.BLOB, Types.VARCHAR);
  </code></pre>
  
  <p>but getting following error </p>
  
  <pre><code>    Caused by: java.sql.SQLException: Invalid argument value: java.io.NotSerializableException
  
  .......
  
      Caused by: java.io.NotSerializableException: org.springframework.jdbc.core.support.SqlLobValue
  </code></pre>
  
  <p>I had made invoiceBean class as Serializable but getting same error. </p>
  
  <p>NOTE: Images with small size are inserted succesfully to database but issue comes with large image size typically greater than 1 MB</p>
  
  <p>Kindly advice !!!</p>