I am sorry its typo error. I have used both 2.5 and 2.7 versions both are 
having same issues. i got the same problem


________________________________
 From: Glen Mazza (Talend) [via CXF] <[email protected]>
To: kk31 <[email protected]> 
Sent: Friday, February 1, 2013 2:51 PM
Subject: Re: running samples sts from  cxf 2.5 throwing error
 

Your subject line says CXF 2.5, but I'm assuming you're using 2.7.2 as 
you've written below.  When I followed the sts sample README 
instructions with CXF 2.7.2, namely: 

   mvn install (builds the demo) 
   mvn -Psts  (from one command line window) 
   mvn -Pserver  (from a second command line window) 
   mvn -Pclient  (from a third command line window) 


It worked fine for me (although I use JDK7).  Do an "mvn clean install" 
for subsequent runs. 

If you're using CXF 2.5.x, use the sample provided with that version 
instead (we have an sts sample there too).  We don't/can't guarantee 
backwards compatibility across major versions. 

HTH, 
Glen 

On 02/01/2013 02:25 PM, kk31 wrote: 

> Hi, 
>    I am pretty much new to apache cxf. I am planning to work on STS 
> samplethat was bundled with apache-cxf-2.7.2 
>      I have followed the instructions, and setup maven,jdk 1.6. when 
> following read me instructions and try to run mvn -Pclient, i am getting the 
> following error msg in in the cmd. 
> 
>      I haven't changed anything the sample, simply try to run the sample sts. 
> 
> INFO: Creating Service {http://apache.org/hello_world_soap_http}SOAPService 
> from 
>   WSDL:file:/C:/Documents%20and%20Settings/My%20Documents/Downloads/apa 
> che-cxf-2.7.2/samples/sts/wsdl/hello_world.wsdl 
> Invoking greetMe... 
> Feb 1, 2013 1:18:37 PM org.apache.cxf.phase.PhaseInterceptorChain 
> doDefaultLoggi 
> ng 
> WARNING: Interceptor for 
> {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Secu 
> rityTokenService#{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Issue 
> has th 
> rown exception, unwinding now 
> org.apache.cxf.interceptor.Fault: Cannot encrypt data 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doSignBeforeEncrypt(SymmetricBindingHandler.java:395) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.handleBinding(SymmetricBindingHandler.java:124) 
>          at 
> org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$Polic 
> yBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.j
>  
> ava:162) 
>          at 
> org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$Polic 
> yBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.j
>  
> ava:89) 
>          at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
> orChain.java:271) 
>          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) 
>          at 
> org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSCl 
> ient.java:760) 
>          at 
> org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSCl 
> ient.java:638) 
>          at 
> org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSCl 
> ient.java:630) 
>          at 
> org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptor 
> Provider$IssuedTokenOutInterceptor.getTokenFromSTS(IssuedTokenInterceptorProvide
>  
> r.java:406) 
>          at 
> org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptor 
> Provider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.
>  
> java:189) 
>          at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
> orChain.java:271) 
>          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) 
>          at 
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) 
>          at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:13 
> 3) 
>          at $Proxy38.greetMe(Unknown Source) 
>          at demo.wssec.client.Client.main(Client.java:72) 
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>          at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. 
> java:39) 
>          at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces 
> sorImpl.java:25) 
>          at java.lang.reflect.Method.invoke(Method.java:597) 
>          at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291) 
>          at java.lang.Thread.run(Thread.java:662) 
> Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilde 
> r.policyNotAsserted(AbstractBindingBuilder.java:291) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doEncryptionDerived(SymmetricBindingHandler.java:490) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doEncryption(SymmetricBindingHandler.java:507) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doSignBeforeEncrypt(SymmetricBindingHandler.java:389) 
>          ... 28 more 
> Feb 1, 2013 1:18:37 PM org.apache.cxf.phase.PhaseInterceptorChain 
> doDefaultLoggi 
> ng 
> WARNING: Interceptor for 
> {http://apache.org/hello_world_soap_http}SOAPService#{h 
> ttp://apache.org/hello_world_soap_http}greetMe has thrown exception, 
> unwinding n 
> ow 
> org.apache.cxf.interceptor.Fault: Cannot encrypt data 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doSignBeforeEncrypt(SymmetricBindingHandler.java:395) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.handleBinding(SymmetricBindingHandler.java:124) 
>          at 
> org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$Polic 
> yBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.j
>  
> ava:162) 
>          at 
> org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$Polic 
> yBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.j
>  
> ava:89) 
>          at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
> orChain.java:271) 
>          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) 
>          at 
> org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSCl 
> ient.java:760) 
>          at 
> org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSCl 
> ient.java:638) 
>          at 
> org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSCl 
> ient.java:630) 
>          at 
> org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptor 
> Provider$IssuedTokenOutInterceptor.getTokenFromSTS(IssuedTokenInterceptorProvide
>  
> r.java:406) 
>          at 
> org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptor 
> Provider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.
>  
> java:189) 
>          at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
> orChain.java:271) 
>          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) 
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) 
>          at 
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) 
>          at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:13 
> 3) 
>          at $Proxy38.greetMe(Unknown Source) 
>          at demo.wssec.client.Client.main(Client.java:72) 
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>          at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. 
> java:39) 
>          at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces 
> sorImpl.java:25) 
>          at java.lang.reflect.Method.invoke(Method.java:597) 
>          at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291) 
>          at java.lang.Thread.run(Thread.java:662) 
> Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilde 
> r.policyNotAsserted(AbstractBindingBuilder.java:291) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doEncryptionDerived(SymmetricBindingHandler.java:490) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doEncryption(SymmetricBindingHandler.java:507) 
>          at 
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandl 
> er.doSignBeforeEncrypt(SymmetricBindingHandler.java:389) 
>          ... 28 more 
> Invocation failed with the following: 
> org.apache.cxf.ws.policy.PolicyException: 
> Cannot encrypt data 
> 
> 
>            Can any one help me how to fix this issue 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> View this message in 
> context:http://cxf.547215.n5.nabble.com/running-samples-sts-from-cxf-2-5-throwing-error-tp5722616.html
> Sent from the cxf-user mailing list archive at Nabble.com. 

-- 
Glen Mazza 
Talend Community Coders - coders.talend.com 
blog:www.jroller.com/gmazza 



________________________________
 
If you reply to this email, your message will be added to the discussion 
below:http://cxf.547215.n5.nabble.com/running-samples-sts-from-cxf-2-5-throwing-error-tp5722616p5722619.html
 
To unsubscribe from running samples sts from  cxf 2.5 throwing error, click 
here.
NAML



--
View this message in context: 
http://cxf.547215.n5.nabble.com/running-samples-sts-from-cxf-2-5-throwing-error-tp5722616p5722620.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to