You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by yannick <ya...@gmail.com> on 2011/09/06 11:22:59 UTC

None of the policy alternatives can be satisfied

Hi,

I already found this topic but didn't help me:
http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-satisfied-td4346996.html#a4347102
. 

I'm trying to create a client - server with ws-securitypolicy. 

At the moment I receive:

Caused by: org.apache.cxf.ws.policy.PolicyException: None of the policy
alternatives can be satisfied.
	at
org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicyImpl.java:165)
	at
org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.java:145)
	at
org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:141)
	at
org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:555)
	at
org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:301)
	at
org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngineImpl.java:283)
	at
org.apache.cxf.transport.http.policy.PolicyUtils.getClient(PolicyUtils.java:150)
	at org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:304)
	at
org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:246)
	at
org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:233)
	at
org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:228)
	at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:88)
	at
org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:61)
	at
org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:818)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
	... 27 more


*Application context*

 <import resource="classpath:META-INF/cxf/cxf-all.xml" />


   <jaxws:client name="{http://test/trbo}bridgePort" createdFromAPI="true">
      <jaxws:properties>
         <entry key="ws-security.callback-handler"
value="eu.trbo.ClientKeystorePasswordCallback"/>        
         <entry key="ws-security.encryption.properties"
value="etc/clientKeystore.properties"/>
         <entry key="ws-security.signature.properties"
value="etc/clientKeystore.properties"/>
         <entry key="ws-security.encryption.username" value="myservicekey"/>
      </jaxws:properties>
   </jaxws:client>


I'm using the cxf-bundle 2.4.2.

I based my self on the example of the cxf website but for the moment I
receive always this exception.

Thanks for the help,


Yannick
   

--
View this message in context: http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-satisfied-tp4773774p4773774.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: None of the policy alternatives can be satisfied

Posted by yannick <ya...@gmail.com>.
Dan thanks for your reply.

I solved the problem by checking the jar files of the example source and my
own. I didn't get any exceptions about conflicts our what ever but just by
comparing I noticed that I didn't had all the jars... So I added the missing
onces and didn't receive the exception anymore. 

Now searching how to solve the next problem.



--
View this message in context: http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-satisfied-tp4773774p4775054.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: None of the policy alternatives can be satisfied

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, September 06, 2011 2:22:59 AM yannick wrote:
> Hi,
> 
> I already found this topic but didn't help me:
> http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-satis
> fied-td4346996.html#a4347102 .
> 

We'd likely need to see the full policy.   A testcase would be useful as well.


You may also be able to turn up the log level.   In the logs, it may describe 
which policy elements it could not meet.   That may help.

Dan


> I'm trying to create a client - server with ws-securitypolicy.
> 
> At the moment I receive:
> 
> Caused by: org.apache.cxf.ws.policy.PolicyException: None of the policy
> alternatives can be satisfied.
> 	at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicy
> Impl.java:165) at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImp
> l.java:145) at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.ja
> va:141) at
> org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEng
> ineImpl.java:555) at
> org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl
> .java:301) at
> org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngi
> neImpl.java:283) at
> org.apache.cxf.transport.http.policy.PolicyUtils.getClient(PolicyUtils.java:
> 150) at
> org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:304) at
> org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportF
> actory.java:246) at
> org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportF
> actory.java:233) at
> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFac
> tory.java:228) at
> org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractC
> onduitSelector.java:88) at
> org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelecto
> r.java:61) at
> org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:81
> 8) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88) at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) ...
> 27 more
> 
> 
> *Application context*
> 
>  <import resource="classpath:META-INF/cxf/cxf-all.xml" />
> 
> 
>    <jaxws:client name="{http://test/trbo}bridgePort" createdFromAPI="true">
>       <jaxws:properties>
>          <entry key="ws-security.callback-handler"
> value="eu.trbo.ClientKeystorePasswordCallback"/>
>          <entry key="ws-security.encryption.properties"
> value="etc/clientKeystore.properties"/>
>          <entry key="ws-security.signature.properties"
> value="etc/clientKeystore.properties"/>
>          <entry key="ws-security.encryption.username" value="myservicekey"/>
> </jaxws:properties>
>    </jaxws:client>
> 
> 
> I'm using the cxf-bundle 2.4.2.
> 
> I based my self on the example of the cxf website but for the moment I
> receive always this exception.
> 
> Thanks for the help,
> 
> 
> Yannick
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-sati
> sfied-tp4773774p4773774.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com