Re: [Dev] [ESB] Illegal key size exception from AxisEngine when sending an encrypted request
Hi, Thank you for the response. Previously I had both java 8 and java 7 in my machine, the problem was solved after making java 7 as the default java version. Thanks! Best Regards, On Fri, Jan 30, 2015 at 9:37 AM, Pavithra Madurangi wrote: > Also please refer ESB Installation Prerequisites for more information > > https://docs.wso2.com/display/ESB481/Installation+Prerequisites > > On Fri, Jan 30, 2015 at 9:33 AM, Pavithra Madurangi > wrote: > >> As per [1], this happens when you've not installed JCE policy files >> properly. So please make sure whether >> >> - You've placed the two jar files @ $JAVA_HOME/jre/lib/security >> - As per the special note in [1], "if you are running your client through >> an IDE - and you still gets the above error after applying the provided >> solution - double check the JAVA_HOME set in the corresponding IDE - and >> need to patch that corresponding JDK" >> Or if you are running curl commands from terminal try reloading .bashrc >> >> [1] >> http://blog.rampartfaq.com/2009/08/faq-001-javasecurityinvalidkeyexception.html >> >> Regards, >> Pavithra >> >> On Wed, Jan 28, 2015 at 10:35 AM, Chathura Priyankara > > wrote: >> >>> Hi, >>> >>> When I'm sending an encrypted request to the proxy service for the >>> sample ESB configuration listed in [1], getting the following error from >>> the AxisEngine. The java version I'm using is 1.7 so I used JCE for Java 7. >>> Is this because of version mismatch of Java ? >>> >>> ERROR engine.AxisEngine: The signature or decryption was invalid; nested >>> exception is: >>> org.apache.xml.security.encryption.XMLEncryptionException: Illegal key >>> size >>> Original Exception was java.security.InvalidKeyException: Illegal key >>> size >>> org.apache.axis2.AxisFault: The signature or decryption was invalid; >>> nested exception is: >>> org.apache.xml.security.encryption.XMLEncryptionException: Illegal key >>> size >>> Original Exception was java.security.InvalidKeyException: Illegal key >>> size >>> 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.runWorker(ThreadPoolExecutor.java:1142) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >>> at java.lang.Thread.run(Thread.java:745) >>> Caused by: org.apache.ws.security.WSSecurityException: The signature or >>> decryption was invalid; nested exception is: >>> org.apache.xml.security.encryption.XMLEncryptionException: Illegal key >>> size >>> Original Exception was java.security.InvalidKeyException: Illegal key >>> size >>> at >>> org.apache.ws.security.processor.ReferenceListProcessor.decryptEncryptedData(ReferenceListProcessor.java:258) >>> at >>> org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:483) >>> at >>> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:421) >>> at >>> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:119) >>> at >>> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:95) >>> 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 >>> >>> [1] >>> https://docs.wso2.com/display/ESB481/Sample+153%3A+Routing+Messages+that+Arrive+to+a+Proxy+Service+without+Processing+Security+Headers >>> -- >>> Chathura Priyankara >>> Software Engineer | WSO2 Inc. >>> Mobile : +94718795340 >>> Blog : www.codeoncloud.blogspot.com >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Pavithra Madurangi* >> Associate Technical Lead - QA. >> WSO2 Inc.: http://wso2.com/ >> Mobile: 0777207357 / 0112747089 >> > > > > -- > *Pavithra Madurangi* > Associate Technical Lead - QA. > WSO2 Inc.: http://
Re: [Dev] [ESB] Illegal key size exception from AxisEngine when sending an encrypted request
Also please refer ESB Installation Prerequisites for more information https://docs.wso2.com/display/ESB481/Installation+Prerequisites On Fri, Jan 30, 2015 at 9:33 AM, Pavithra Madurangi wrote: > As per [1], this happens when you've not installed JCE policy files > properly. So please make sure whether > > - You've placed the two jar files @ $JAVA_HOME/jre/lib/security > - As per the special note in [1], "if you are running your client through > an IDE - and you still gets the above error after applying the provided > solution - double check the JAVA_HOME set in the corresponding IDE - and > need to patch that corresponding JDK" > Or if you are running curl commands from terminal try reloading .bashrc > > [1] > http://blog.rampartfaq.com/2009/08/faq-001-javasecurityinvalidkeyexception.html > > Regards, > Pavithra > > On Wed, Jan 28, 2015 at 10:35 AM, Chathura Priyankara > wrote: > >> Hi, >> >> When I'm sending an encrypted request to the proxy service for the sample >> ESB configuration listed in [1], getting the following error from the >> AxisEngine. The java version I'm using is 1.7 so I used JCE for Java 7. Is >> this because of version mismatch of Java ? >> >> ERROR engine.AxisEngine: The signature or decryption was invalid; nested >> exception is: >> org.apache.xml.security.encryption.XMLEncryptionException: Illegal key >> size >> Original Exception was java.security.InvalidKeyException: Illegal key size >> org.apache.axis2.AxisFault: The signature or decryption was invalid; >> nested exception is: >> org.apache.xml.security.encryption.XMLEncryptionException: Illegal key >> size >> Original Exception was java.security.InvalidKeyException: Illegal key size >> 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.runWorker(ThreadPoolExecutor.java:1142) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: org.apache.ws.security.WSSecurityException: The signature or >> decryption was invalid; nested exception is: >> org.apache.xml.security.encryption.XMLEncryptionException: Illegal key >> size >> Original Exception was java.security.InvalidKeyException: Illegal key size >> at >> org.apache.ws.security.processor.ReferenceListProcessor.decryptEncryptedData(ReferenceListProcessor.java:258) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:483) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:421) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:119) >> at >> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:95) >> 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 >> >> [1] >> https://docs.wso2.com/display/ESB481/Sample+153%3A+Routing+Messages+that+Arrive+to+a+Proxy+Service+without+Processing+Security+Headers >> -- >> Chathura Priyankara >> Software Engineer | WSO2 Inc. >> Mobile : +94718795340 >> Blog : www.codeoncloud.blogspot.com >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Pavithra Madurangi* > Associate Technical Lead - QA. > WSO2 Inc.: http://wso2.com/ > Mobile: 0777207357 / 0112747089 > -- *Pavithra Madurangi* Associate Technical Lead - QA. WSO2 Inc.: http://wso2.com/ Mobile: 0777207357 / 0112747089 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [ESB] Illegal key size exception from AxisEngine when sending an encrypted request
As per [1], this happens when you've not installed JCE policy files properly. So please make sure whether - You've placed the two jar files @ $JAVA_HOME/jre/lib/security - As per the special note in [1], "if you are running your client through an IDE - and you still gets the above error after applying the provided solution - double check the JAVA_HOME set in the corresponding IDE - and need to patch that corresponding JDK" Or if you are running curl commands from terminal try reloading .bashrc [1] http://blog.rampartfaq.com/2009/08/faq-001-javasecurityinvalidkeyexception.html Regards, Pavithra On Wed, Jan 28, 2015 at 10:35 AM, Chathura Priyankara wrote: > Hi, > > When I'm sending an encrypted request to the proxy service for the sample > ESB configuration listed in [1], getting the following error from the > AxisEngine. The java version I'm using is 1.7 so I used JCE for Java 7. Is > this because of version mismatch of Java ? > > ERROR engine.AxisEngine: The signature or decryption was invalid; nested > exception is: > org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size > Original Exception was java.security.InvalidKeyException: Illegal key size > org.apache.axis2.AxisFault: The signature or decryption was invalid; > nested exception is: > org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size > Original Exception was java.security.InvalidKeyException: Illegal key size > 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.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.ws.security.WSSecurityException: The signature or > decryption was invalid; nested exception is: > org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size > Original Exception was java.security.InvalidKeyException: Illegal key size > at > org.apache.ws.security.processor.ReferenceListProcessor.decryptEncryptedData(ReferenceListProcessor.java:258) > at > org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:483) > at > org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:421) > at > org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:119) > at > org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:95) > 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 > > [1] > https://docs.wso2.com/display/ESB481/Sample+153%3A+Routing+Messages+that+Arrive+to+a+Proxy+Service+without+Processing+Security+Headers > -- > Chathura Priyankara > Software Engineer | WSO2 Inc. > Mobile : +94718795340 > Blog : www.codeoncloud.blogspot.com > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Pavithra Madurangi* Associate Technical Lead - QA. WSO2 Inc.: http://wso2.com/ Mobile: 0777207357 / 0112747089 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [ESB] Illegal key size exception from AxisEngine when sending an encrypted request
Hi, When I'm sending an encrypted request to the proxy service for the sample ESB configuration listed in [1], getting the following error from the AxisEngine. The java version I'm using is 1.7 so I used JCE for Java 7. Is this because of version mismatch of Java ? ERROR engine.AxisEngine: The signature or decryption was invalid; nested exception is: org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size Original Exception was java.security.InvalidKeyException: Illegal key size org.apache.axis2.AxisFault: The signature or decryption was invalid; nested exception is: org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size Original Exception was java.security.InvalidKeyException: Illegal key size 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.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.ws.security.WSSecurityException: The signature or decryption was invalid; nested exception is: org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size Original Exception was java.security.InvalidKeyException: Illegal key size at org.apache.ws.security.processor.ReferenceListProcessor.decryptEncryptedData(ReferenceListProcessor.java:258) at org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:483) at org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:421) at org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:119) at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:95) 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 [1] https://docs.wso2.com/display/ESB481/Sample+153%3A+Routing+Messages+that+Arrive+to+a+Proxy+Service+without+Processing+Security+Headers -- Chathura Priyankara Software Engineer | WSO2 Inc. Mobile : +94718795340 Blog : www.codeoncloud.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev