Hi Mohan, Thanks a lot for pointing that out. Hi all, Created a Doc-JIRA at [1] so the sample-153 document [2] will be updated accordingly.
[1] https://wso2.org/jira/browse/DOCUMENTATION-663 [2] http://docs.wso2.org/display/ESB481/Sample+153:+Routing+the+Messages+Arrived+to+a+Proxy+Service+without+Processing+the+Security+Headers Thanks & Regards, Dilini On Thu, Feb 20, 2014 at 9:16 AM, Mohanadarshan Vivekanandalingam < [email protected]> wrote: > Hi Dilini, > > If you found any issues or bugs in documentation or products please raise > them through a jira then it will be easy for product team or documentation > team to track.. I think you can raise a doc jirs for above issue through > link [1].. > > [1] https://wso2.org/jira/browse/DOCUMENTATION > > > Thanks, > Mohan > > > > On Thu, Feb 20, 2014 at 9:05 AM, Dilini Muthumala <[email protected]> wrote: > >> Hi Madhawa and Nalin, >> >> This is the same fix which Chanaka has mentioned, but thought of sending >> this because I've faced the same two errors; after fixing one error the >> other one popped out. >> >> This happened when running ESB sample 153, referring to [1]. >> >> Firstly, I encountered the same error as Nalin. The discussion at [2] >> helped me to clear it out *from the client side*. That's, adding BouncyCastle >> jar file into ESB_HOME/repository/components/plugins folder solved the >> issue. >> >> Then, I got the same error as Madhawa. However, it can be noticed that >> the error thrown by back-end service this time is the same error (AFAIU) >> that the client previously threw, due to missing BouncyCastle jar file. >> So I added the same jar file to the classpath when running the back-end >> service. >> Then the sample got executed successfully. >> >> BTW, shouldn't we update the ESB documentation [1] specifying this? >> >> Regards, >> Dilini >> >> [1] >> http://docs.wso2.org/display/ESB481/Sample+153:+Routing+the+Messages+Arrived+to+a+Proxy+Service+without+Processing+the+Security+Headers >> >> [2] >> http://wso2-oxygen-tank.10903.n7.nabble.com/Dev-Exception-occurs-when-running-ESB-sample-200-td89572.html >> >> >> On Wed, Feb 19, 2014 at 8:29 PM, Nalin Chandraratne <[email protected]>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 <[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 >>> >> >> >> >> -- >> *Dilini Muthumala* >> Software Engineer, >> WSO2 Inc. >> >> *E-mail:* [email protected] >> *Mobile: *+94713 400 029 >> > > > > -- > *V. Mohanadarshan* > *Software Engineer,* > *Data Technologies Team,* > *WSO2, Inc. http://wso2.com <http://wso2.com> * > *lean.enterprise.middleware.* > > email: [email protected] > phone:(+94) 771117673 > -- *Dilini Muthumala* Software Engineer, WSO2 Inc. *E-mail :* [email protected] *Mobile: *+94713 400 029
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
