Hi, This issue has been reported in ESB 4.8.1 release as well. There are separate mail threads for this issue. The reason for this issue is the bouncyCastle jar file which we are using for encryption is not available for axis2 client
I am using the default bcprov-jdk15.jar which comes with the ESB inside the repository/axis2/client/lib/ directory. Actually this jar file is included in the MANIFEST file of the pathing.jar file which is located at samples/axis2Client/ directory. Which means this jar file should be available to the axis2Client when we issue the ant command. But for some reason, this jar file is not getting loaded.* It worked when I put that file inside the repository/components/plugins directory.* Thank you, Chanaka On Wed, Feb 19, 2014 at 8:29 PM, Nalin Chandraratne <na...@wso2.com> wrote: > Hi Madhawa, > > I also had an exception as follows when running the sample 153 with ESB > 4.8.0. The exception was thrown at the axis2Client side. > > [java] 14/02/19 20:18:42 INFO jms.JMSSender: JMS Sender started > [java] 14/02/19 20:18:42 INFO jms.JMSSender: JMS Transport Sender > initialized... > [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:398) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224) > [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 > > When checked with TCPMon, client doesn't send any messages out (The > exception may occur while generating the message from the client). > > So I used a different client (The axis2Client shipped with ESB 4.7.0) and > the sample executed successfully. AFAIU there is an issue with the > axis2Client shipping with the ESB 4.8.0. > > > > > On Wed, Feb 19, 2014 at 8:12 PM, Madhawa Bandara <madh...@wso2.com> wrote: > >> I was running the following sample. >> >> >> http://docs.wso2.org/display/ESB481/Sample+250%3A+Introduction+to+Switching+Transports >> >> In the *client* I got the following exception. >> >> [java] 14/02/19 17:57:43 INFO mail.MailTransportSender: MAILTO Sender >> started >> [java] 14/02/19 17:57:43 INFO jms.JMSSender: JMS Sender started >> [java] 14/02/19 17:57:43 INFO jms.JMSSender: JMS Transport Sender >> initialized... >> [java] Using WS-Security >> [java] 14/02/19 17:57:44 ERROR engine.AxisEngine: Must Understand >> check failed for header >> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd: >> Security >> [java] org.apache.axis2.AxisFault: Must Understand check failed for >> header >> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd: >> Security >> [java] at >> org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:104) >> [java] at >> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:170) >> [java] at >> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:356) >> [java] at >> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:413) >> [java] at >> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224) >> [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] org.apache.axis2.AxisFault: Must Understand check failed for >> header >> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd: >> Security >> [java] at >> org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:104) >> [java] at >> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:170) >> [java] at >> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:356) >> [java] at >> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:413) >> [java] at >> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224) >> [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) >> >> >> In the back-end *server* I got the exceptions with the following error >> messages: >> >> 14/02/19 17:57:34 INFO nhttp.HttpCoreNIOListener: HTTPS Listener >> started on 0:0:0:0:0:0:0:0:9002 >> 14/02/19 17:57:34 INFO nhttp.HttpCoreNIOListener: HTTP Listener started >> on 0:0:0:0:0:0:0:0:9000 >> 14/02/19 17:57:34 INFO util.SampleAxis2ServerManager: [SimpleAxisServer] >> Started >> 14/02/19 17:57:44 ERROR engine.AxisEngine: 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.security.NoSuchAlgorithmException: Cannot find any provider >> supporting RSA/ECB/OAEPPadding >> org.apache.axis2.AxisFault: 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.security.NoSuchAlgorithmException: Cannot find any provider >> supporting RSA/ECB/OAEPPadding >> at >> org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:180) >> at >> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:95) >> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340) >> at org.apache.axis2.engine.Phase.invoke(Phase.java:313) >> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) >> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167) >> at >> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) >> at >> org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:459) >> at >> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:279) >> at >> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) >> at java.lang.Thread.run(Thread.java:662) >> 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.security.NoSuchAlgorithmException: Cannot find any provider >> supporting RSA/ECB/OAEPPadding >> at >> org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:785) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:154) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:117) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:93) >> at >> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:332) >> at >> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249) >> at org.apache.rampart.RampartEngine.process(RampartEngine.java:214) >> at >> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92) >> ... 11 more >> Caused by: java.security.NoSuchAlgorithmException: Cannot find any >> provider supporting RSA/ECB/OAEPPadding >> at javax.crypto.Cipher.getInstance(DashoA13*..) >> at >> org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:777) >> ... 18 more >> 14/02/19 17:57:44 ERROR nhttp.ServerWorker: Error processing POST request >> org.apache.axis2.AxisFault: 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.security.NoSuchAlgorithmException: Cannot find any provider >> supporting RSA/ECB/OAEPPadding >> at >> org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:180) >> at >> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:95) >> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340) >> at org.apache.axis2.engine.Phase.invoke(Phase.java:313) >> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) >> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167) >> at >> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) >> at >> org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:459) >> at >> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:279) >> at >> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) >> at java.lang.Thread.run(Thread.java:662) >> 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.security.NoSuchAlgorithmException: Cannot find any provider >> supporting RSA/ECB/OAEPPadding >> at >> org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:785) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:154) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:117) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:93) >> at >> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:332) >> at >> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249) >> at org.apache.rampart.RampartEngine.process(RampartEngine.java:214) >> at >> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92) >> ... 11 more >> Caused by: java.security.NoSuchAlgorithmException: Cannot find any >> provider supporting RSA/ECB/OAEPPadding >> at javax.crypto.Cipher.getInstance(DashoA13*..) >> at >> org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:777) >> ... 18 more >> >> I followed the steps mentioned in the sample (added the required JCE >> files) and updated the axis2.xml file of the server to work with Apache >> Rampart. I tried using ESB 4.8 and 4.8.1. but got the same result. >> >> -- >> Regards, >> >> *Madhawa Bandara* >> Software Engineer >> WSO2, Inc. >> lean.enterprise.middleware >> >> Mobile - *+94777487726* >> > > > > -- > Nalin Chamara > Software Engineer > 071-56-147-56 > -- -- Chanaka Fernando Technical Lead WSO2, Inc.; http://wso2.com lean.enterprise.middleware mobile: +94 773337238 Blog : http://soatutorials.blogspot.com LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0 Twitter:https://twitter.com/chanakaudaya Wordpress:http://chanakaudaya.wordpress.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev