title: My application encrypts pdf files OK with itext on local server but fails on QA server
body: <p>I 'm using the library itext version 5.5.4 and bounce castle 1.49. My application works fine on my local server and server development . The following statement is used to encrypt :</p>
  
  <pre><code>String userPassord = "4888";
  String OwnerPassword = "4850";
  
  writer.setEncryption ( getBytes ( userPassword ) , getBytes ( OwnerPassword ) ,   PdfWriter.ALLOW_PRINTING, PdfWriter.ENCRYPTION_AES_128) ;
  
  private byte[] getBytes(String str){
      return str.getBytes(Charset.forName("UTF-8"));
  }
  </code></pre>
  
  <p>The weblogic server (QA environment) returns a 500 error but in the log files no trace that an exception has occurred.</p>
  
  <p>I think the error may be occurring when the instruction " writer.setEncryption " runs because when the application generates PDF files without encryption keys , this works correctly in all environments.</p>
  
  <p>We are using WebLogic 12.1.3 servers in all environments and Java version 1.7</p>
  
  <p>Any idea what may be breaking my application in other environments ? java configuration ? configuration in weblogic servers?</p>