On Wednesday, December 21, 2011 9:58:21 PM Hiranya Jayathilaka wrote:
> Get the same when using PolicyBuilder instead of PolicyEngine:
>
> java.lang.IllegalArgumentException: {
> http://www.wso2.org/products/wso2commons/throttle}ThrottleAssertion is not
> a <wsp:Policy> element.
> at org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)
> at org.apache.neethi.PolicyBuilder.getPolicy(PolicyBuilder.java:109) at
> org.wso2.throttle.ThrottleFactory.createThrottle(ThrottleFactory.java:136)
> at
> org.wso2.throttle.ThrottleFactory.createMediatorThrottle(ThrottleFactory.jav
> a:89)
You are asking to create a Policy object (which represents a "ws:Policy"
element), but you aren't feeding it a ws:Policy document. You are feeding
it an assertion that would likely go in a policy document, but not a policy
document.
With 3.0.1, we tightened up the validation to make sure the inputs are proper
policy documents so potentially important information isn't being lost or
discarded.
Dan
>
> Thanks,
> Hiranya
>
> On Wed, Dec 21, 2011 at 9:54 PM, Hiranya Jayathilaka
>
> <[email protected]>wrote:
> > Hi Folks,
> >
> > I'm trying to get WSO2 Throttling trunk (an open source project
> > dependent
> > on Neethi) working with Neethi 3.0.2. I was able to get it to work with
> > Neethi 3.0.0. But cannot get it to work with 3.0.1 and 3.0.2. Keep
> > getting the following error:
> >
> > java.lang.IllegalArgumentException: {
> > http://www.wso2.org/products/wso2commons/throttle}ThrottleAssertion is
> > not a <wsp:Policy> element.
> >
> > at
> >
> > org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177
> > )
> > at org.apache.neethi.PolicyBuilder.getPolicy(PolicyBuilder.java:125)
> >
> > at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:113)
> >
> > at
> > org.wso2.throttle.ThrottleFactory.createThrottle(ThrottleFactory.java:13
> > 5)>
> > at
> >
> > org.wso2.throttle.ThrottleFactory.createMediatorThrottle(ThrottleFactory
> > .java:89)
> >
> > Any idea what changed in the API for this code to break?
> >
> > Thanks
> > --
> > Hiranya Jayathilaka
> > Associate Technical Lead;
> > WSO2 Inc.; http://wso2.org
> > E-mail: [email protected]; Mobile: +94 77 633 3491
> > Blog: http://techfeast-hiranya.blogspot.com
--
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]