title: [B cannot be cast to java.sql.Blob
body: <p>This is my domain class</p>
  
  <pre><code>class TimesheetSubmission {
  
      Date submissionDate=new Date()
      String foreman
      String shift
      String jobId
      Date date
      byte[] xmlSubmission
      String xmlResponse
  
      static constraints = {
           submissionDate nullable: false
           foreman nullable: false
           shift nullable: false
           jobId nullable: false
           date nullable: false
           xmlSubmission nullable: true
           xmlResponse nullable: false
      }
      static mapping = {
          xmlSubmission (type: "blob")
      }
  }
  </code></pre>
  
  <p>And following is my code to persist data in database.</p>
  
  <pre><code>TimesheetSubmission timesheetSubmission=new TimesheetSubmission()
  timesheetSubmission.foreman=Party.findById(foremanId)
  timesheetSubmission.shift=shift
  timesheetSubmission.jobId=jobId
  timesheetSubmission.date=Date.parse("yyyy-MM-dd", date)
  timesheetSubmission.xmlSubmission=sTimesheet.getBytes();
  timesheetSubmission.xmlResponse="response"    
  timesheetSubmission.save(flush: true,failOnError: true)
  </code></pre>
  
  <p>I am getting following error when applying save on domain .</p>
  
  <pre><code>[B cannot be cast to java.sql.Blob
  </code></pre>