title: Miffed... Simple Code, but ... org.jasypt.exceptions.EncryptionOperationNotPossibleException
body: <p>I have used this code or something similar time and again within the server code on my web apps, but now I am trying to make a command line utility to work with the maintenance backend.</p>
  
  <p>Keep on getting a <code>EncryptionOperationNotPossibleException</code>, but can't see what I'm doing wrong in the code. To test the snippet I've used a real encrypted string to make sure it's not the test input.</p>
  
  <p>Anybody out there see where in the code this exception would come from?</p>
  
  <pre><code>import org.jasypt.exceptions.EncryptionOperationNotPossibleException;
  import org.jasypt.util.text.BasicTextEncryptor;
  
  public class decipher {
  
      /**
       * @param args
       */
      public static void main(String[] args) {
          if (args[0] != null) {
              String encstr = args[0];
              String decstr = "";
  
              if (encstr != null &amp;&amp; !encstr.equals("")) {
                  try {
                      BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
                      textEncryptor.setPassword("1234566789");
                      decstr = textEncryptor.decrypt(encstr);
                      System.out.println(decstr);
                  } catch (EncryptionOperationNotPossibleException e) {
                      System.out.println(e.toString());
                  }
              } else {
                  System.out.println("Passed empty string... not decrypted.");
              }
          } else {
              System.out.println("This program requires and encrypted text input.");
          }
      }
  }
  </code></pre>