cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <>
Subject [jira] [Resolved] (CXF-5317) Policy exception handler throws away useful exception stack trace
Date Thu, 03 Oct 2013 10:39:42 GMT


Colm O hEigeartaigh resolved CXF-5317.

    Resolution: Fixed

> Policy exception handler throws away useful exception stack trace
> -----------------------------------------------------------------
>                 Key: CXF-5317
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.7.6, 2.7.7
>            Reporter: Jesse Pangburn
>            Assignee: Colm O hEigeartaigh
>              Labels: patch, ws-policy, ws-security
>             Fix For: 2.7.8, 2.6.11
>         Attachments: AbstractBindingBuilder.patch
> I had a working WS-Policy which was encrypting the SOAP body with a UsernameToken using
Basic128 encryption, then I modified the policy to use Basic256 encryption instead.  I got
the following stack trace cause:
> Caused by: Cannot encrypt data
> 	at
> Since the exception was short on detail, I went to the source code and found that
was simply throwing away the rest of the Exception object.  There's a method existing already
to take the exception too so I changed that line to call it and now get the following MUCH
more useful error message on the end of the stack trace:
> Caused by: Invalid AES key
length: 20 bytes
> Original Exception was Invalid AES key length: 20
> I chose priority Major because without this user will report the error "cannot encrypt
data" which will give developers very little to go on.  The only way to find the real problem
is to attach a debugger which is not an option for everybody.
> I'll attach a patch to this issue to resolve this.

This message was sent by Atlassian JIRA

View raw message