Invalid SQL type: sqlKind = UNINITIALIZED error is shown
<pre><code>    String s1 = PasswordText4.getText();
    String s2 = ConfirmText4.getText();
    String s3 = NameText4.getText();
    String s4 = UsernameText4.getText();
    String s5 = jLabel16.getText();

    if (PasswordText4.getText().equals(ConfirmText4.getText()) &amp;&amp; s1.length() != 0 &amp;&amp; s3.length() != 0 &amp;&amp; s1.length() &gt;= 4 &amp;&amp; s2.length() &gt;= 4) {
        try {
            String sql
                    = "BEGIN"
                    + "UPDATE LOGIN SET USERNAME = ?, PASSWORD = ?, NAME = ?"
                    + "WHERE USERNAME = ?;"
                    + "commit;"
                    + "END;";
            CallableStatement cstmt = conn.prepareCall(sql);
            cstmt.setString(1, UsernameText4.getText());
            cstmt.setString(2, PasswordText4.getText());
            cstmt.setString(3, NameText4.getText());
            cstmt.setString(4, jLabel16.getText());

            //System.out.println(jLabel16.getText());

            int dialogButton = JOptionPane.YES_NO_OPTION;
            int dialogResult = JOptionPane.showConfirmDialog(null, "Are you sure you want to update?", "Warning", dialogButton);
            if (dialogResult == JOptionPane.YES_OPTION) {
                cstmt.execute();
                JOptionPane.showMessageDialog(null, "Information Updated");
                jLabel15.setText(NameText4.getText());
                jLabel16.setText(UsernameText4.getText());
                jLabel17.setText(PasswordText4.getText());
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }
</code></pre>

<p>What's wrong with this code? When I try to update my data, the Invalid SQL type: </p>

<blockquote>
  <p>sqlKind = UNINITIALIZED error is shown.</p>
</blockquote>

<p>Please help me find solution for my problem.</p>

<p>Thank you in advance for answer.</p>