Pessoal estou com o seguinte erro e n�o sei o que esta acontecendo.preciso de ajuda., segue abaixo o m�todo que estou onde este erro aconteceu!
 
 
 
java.lang.ExceptionInInitializerError: java.lang.SecurityException: Cannot
set up certs for trusted CAs: java.security.PrivilegedActionException <<java.security.cert.CertificateException:
X.509 not found>>
at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
at javax.crypto.Cipher.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)
at com.bc.util.encrypt.EncryptUtil.getEncryptedString(EncryptUtil.java:34)
at com.bc.execute.Login.executeSearch(Login.java:69)
at com.bc.execute.Login.execute(Login.java:44)
at com.bc.execute.Login.<init>(Login.java:33)
at com.bc.servlet.LoginServlet.doPost(LoginServlet.java:20)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at com.caucho.server.http.Invocation.service(Invocation.java:278)
at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:344)
at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:251)
at com.bematech.bc.servlet.MainServlet.doPost(MainServlet.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at com.caucho.server.http.Invocation.service(Invocation.java:278)
at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:847)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)

 
c�digo
    public static final String getEncryptedString(String input) throws Exception
    {
        Security.addProvider( new com.sun.crypto.provider.SunJCE() );
        byte[]keyBytes = keyStr.getBytes("UTF8");
        SecretKey key = new SecretKeySpec(keyBytes, "DES");
       
        //a exception estoura nesta linha
        Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
        
        cipher.init(Cipher.ENCRYPT_MODE, key);
        byte[]inputBytes = input.getBytes("UTF8");
        //Encode
        byte[] outputBytes = cipher.doFinal(inputBytes);
        BASE64Encoder encoder = new BASE64Encoder();
        String base64 = encoder.encode(outputBytes);
        return base64;
    }
 
desde j� Obrigado
 
Rodrigo.

Responder a