Usually this exception comes when BouncyCastle jar is not in the classpath. (bcprov-jdk15.jar)
By default the BouncyCastle jar file is in ESB_HOME/repository/axis2/client/lib folder. But when it is their, looks like that file is not loaded in to axis2Client. But when I copy the BouncyCastle jar file into ESB_HOME/repository/components/plugins folder, issue get resolved. The issue is resolved. However I am not sure whether this is the correct resolution for this issue? Best Regards, Malaka On Wed, Dec 11, 2013 at 11:06 AM, Sajith Ravindra <saji...@wso2.com> wrote: > Hi, > > I'm a new joinee whose under going the training. I'm trying to run sample > 200 of ESB ( > http://docs.wso2.org/display/ESB480/Sample+200%3A+Using+WS-Security+with+policy+attachments+for+proxy+services > ) > When i'm running the client of it gives an exception with following > stack trace. > > [java] Using WS-Security > [java] org.apache.axis2.AxisFault: Error in encryption > [java] at org.apache.rampart.handler. > RampartSender.invoke(RampartSender.java:76) > [java] at > org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340) > [java] at org.apache.axis2.engine.Phase.invoke(Phase.java:313) > [java] at > org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) > [java] at > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) > [java] at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) > [java] at > org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:554) > [java] at > org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:530) > [java] at > samples.userguide.StockQuoteClient.executeClient(Unknown Source) > [java] at samples.userguide.StockQuoteClient.main(Unknown Source) > [java] Caused by: org.apache.rampart.RampartException: Error in > encryption > [java] at > org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:612) > [java] at > org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:97) > [java] at > org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147) > [java] at > org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65) > [java] ... 11 more > [java] Caused by: org.apache.ws.security.WSSecurityException: An > unsupported signature or encryption algorithm was used (unsupported key > transport encryption algorithm: No such algorithm: > http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p); nested exception is: > [java] java.security.NoSuchAlgorithmException: Cannot find any > provider supporting RSA/ECB/OAEPPadding > [java] at > org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:785) > [java] at > org.apache.ws.security.message.WSSecEncryptedKey.prepareInternal(WSSecEncryptedKey.java:205) > [java] at > org.apache.ws.security.message.WSSecEncrypt.prepare(WSSecEncrypt.java:259) > [java] at > org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:578) > [java] ... 14 more > [java] Caused by: java.security.NoSuchAlgorithmException: Cannot find > any provider supporting RSA/ECB/OAEPPadding > [java] at javax.crypto.Cipher.getInstance(DashoA13*..) > [java] at > org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:777) > [java] ... 17 more > > I tired what's being explain in > http://blog.rampartfaq.com/2009/08/faq-001-javasecurityinvalidkeyexception.htmlbut > it didn't work. > > Can someone please explain the cause of this problem > -- > Thanks > *,Sajith Ravindra* > Senior Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: +94 77 2273550 > <http://lk.linkedin.com/pub/shani-ranasinghe/34/111/ab> > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Best Regards, Malaka Silva Senior Tech Lead M: +94 777 219 791 Tel : 94 11 214 5345 Fax :94 11 2145300 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 Blog : http://mrmalakasilva.blogspot.com/ WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/ http://www.wso2.com/about/team/malaka-silva/<http://wso2.com/about/team/malaka-silva/> Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev