title: What is the error in blob submission to DB?
body: <p>I'm trying to make insertions and updates of an image in DB, already in blob format.</p>
  
  <pre><code>public static boolean alterarLogo(int id, Blob logo) {
              String sql = "update conta set conta_logo = " + logo + " where conta_id = " + id;
              try (Connection conn = ConexaoDBGeral.abre()) {
                  if (conn != null) {
                      try (Statement ps = conn.createStatement()) {
                          ps.executeUpdate(sql);
                          return true;
                      }
                  }
              } catch (SQLException ex) {
                  Logger.getLogger(ContaDAO.class.getName())
                          .log(Level.SEVERE, null, ex);
              }
              return false;
          }
  </code></pre>
  
  <p>The code above throws as an exception: "improper qualified name (too many dotted names) :javax.sql.rowset.serialblob".In Db the column in question is of the type "oid".</p>
  
  <p>The code where I get the blob:</p>
  
  <pre><code>        int idEmpresa=-1;
          SerialBlob blob = null;
          byte[] contents;
          try {
              List&lt;FileItem&gt; items = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);
              for (FileItem item : items) {
                  if (!item.isFormField()) {
                      // Process form file field (input type="file").
                      String fieldName = item.getFieldName();
                      String fileName = FilenameUtils.getName(item.getName());
                      InputStream file = item.getInputStream();
                      contents = IOUtils.toByteArray(file);
                      try {
                          blob = new SerialBlob(contents);
                      } catch (SQLException ex) {
                          Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);
                      }
  
                      ContaDAO.alterarLogo(idEmpresa, blob);
                  }
              }
          } catch (FileUploadException e) {
  </code></pre>
  
  <p>I am using Java, Servlets and JSPs, and PostGres. Where is the error?</p>