ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: FW: CryptoFactory.getInstance("wss40.properties"); - in Wss4J 2.0.2
Date Mon, 14 Jul 2014 10:06:21 GMT
What does your code snippet look like?

Colm.


On Mon, Jul 14, 2014 at 9:35 AM, Adrian Williamson <aw@octavo2.demon.co.uk>
wrote:

> Can anyone shed some light on this?
>
> Thanks
>
> Adrian
>
> -----Original Message-----
> From: Adrian Williamson [mailto:aw@octavo2.demon.co.uk]
> Sent: 11 July 2014 16:06
> To: users@ws.apache.org
> Subject: CryptoFactory.getInstance("wss40.properties"); - in Wss4J 2.0.2
>
> Hi,
>
> NetBeans/JDK1.7 is telling me that I need to handle "unreported exception
> WSSecurityException; must be caught or declared to be thrown" for this
> invocation of CryptoFactory.getInstance.
>
> However I can't make it go away by blindly wrapping it in a try-catch or by
> throwing the exception as in the examples:
>
> 81      public EncryptionTest() throws Exception {
> 82              crypto = CryptoFactory.getInstance("wss40.properties");
> 83      }
>
> If I try to reference WSSecurityException in the catch block it maintains
> that it cannot be converted to throwable due to incompatible types.
>
> java.lang.Object
>   java.lang.Throwable
>     java.lang.Exception
>       org.apache.xml.security.exceptions.XMLSecurityException
>         org.apache.wss4j.common.ext.WSSecurityException
>
> Forgive me for what might seem like a very basic java question but why is
> it
> complaining?
>
> Thanks
>
> Adrian
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
View raw message