You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by "Werner Dittmann (JIRA)" <ji...@apache.org> on 2006/02/16 13:44:01 UTC
[jira] Closed: (WSS-30) Improve logging when crypto class
constructor fails
[ http://issues.apache.org/jira/browse/WSS-30?page=all ]
Werner Dittmann closed WSS-30:
------------------------------
Resolution: Fixed
> Improve logging when crypto class constructor fails
> ---------------------------------------------------
>
> Key: WSS-30
> URL: http://issues.apache.org/jira/browse/WSS-30
> Project: WSS4J
> Type: Improvement
> Reporter: Xavier Toth
> Assignee: Davanum Srinivas
>
> if the instantiation of the crypto class fails try and get the real cause and log it so that users will know what to fix.
> Diff of CryptoFactory.java
> 119,130c119
> < } catch (java.lang.reflect.InvocationTargetException e) {
> < Throwable cause = e.getCause();
> < if (cause != null) {
> < cause.printStackTrace();
> < log.error("Unable to instantiate (1): " + cryptoClassName, cause);
> < }
> < else {
> < e.printStackTrace();
> < log.error("Unable to instantiate (1): " + cryptoClassName, e);
> < }
> < }
> < catch (java.lang.Exception e) {
> ---
> > } catch (java.lang.Exception e) {
> 139,148c128,130
> < Throwable cause = e.getCause();
> < if (cause != null) {
> < cause.printStackTrace();
> < log.error("Unable to instantiate (2): " + cryptoClassName, cause);
> < }
> < else {
> < e.printStackTrace();
> < log.error("Unable to instantiate (2): " + cryptoClassName, e);
> < }
> < throw new RuntimeException(cryptoClassName + " cannot create instance");
> ---
> > e.printStackTrace();
> > log.error("Unable to instantiate (2): " + cryptoClassName, e);
> > throw new RuntimeException(cryptoClassName + " cannot create instance");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org