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 <[email protected]> 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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev