Hello Paul and Daniele,

I've opened an issue for that (
http://restlet.tigris.org/issues/show_bug.cgi?id=1288).
The current trunk provides a fix for that, since there is no need to provide
a context when attaching an application. This behaviour is actually a
reproduction of when happens when attaching an application by code.
This may introduce a small change in the 2.0 API which need to be discussed
with Jérôme. Unfortunately, he will be back from vacations on august 1st.

Best regards,
Thierry Boileau

Have a look at how I create the child context here:
>
>
> https://github.com/apius/apius-core/blob/master/projects/identity/src/identity-context-common.xml
>
> Do this and you should be able to pass the child context into the
> Application constructor without an error.
>
> Paul Morris
>
> On Jul 14, 2011, at 4:12 AM, "Daniele Dellafiore" <[email protected]>
> wrote:
>
> > I am having the same error but I've no reason to believe is related to
> > a classpath issue. I'm using Restlet 2.0.8
> >
> > I fall into this problem trying to add HTTP client protocol to my
> > applicaiton to allow a new client resource to contact a third web
> > service from inside my application context.
> >
> > Here's how I configure the protocols:
> >
> > <bean id="component" class="org.restlet.ext.spring.SpringComponent">
> >   <property name="client">
> >     <util:constant static-field="org.restlet.data.Protocol.HTTP" />
> >   </property>
> > </bean>
> >
> > <bean id="application" class="com.app.MyApplication">
> >   <constructor-arg>
> >     <util:property-path path="component.context" />
> >   </constructor-arg>
> >
> >
> > And I get:
> >
> > SEVERE: For security reasons, don't pass the component context to
> > child Restlets anymore. Use the Context#createChildContext() method
> > instead.class com.app.MyApplication
> >
> > Anyone understand why does this happen or at least, what's the proper
> > way to add protocols to the application ChildContext?
> >
> > On Tue, Jun 28, 2011 at 4:50 AM, Paul Morris <[email protected]> wrote:
> >> I think I had some classpath problems or perhaps even a mixture of
> different release version jars. I deleted all jars from WEB-INF/lib and
> replaced the restlet and other dependent jars with those packaged in the
> 2.0.8 release and everything started behaving as expected. (Shaking my
> head).
> >>
> >> ------------------------------------------------------
> >>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2778874
> >>
> >
> >
> >
> > --
> > Daniele Dellafiore
> > http://danieledellafiore.net
> >
> > ------------------------------------------------------
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2790401
> This message and any included attachments are intended only for the
> addressee. The information contained in this message is confidential and may
> constitute proprietary or non-public information under international,
> federal, or state laws. Unauthorized forwarding, printing, copying,
> distribution, or use of such information is strictly prohibited and may be
> unlawful. If you are not the addressee, please promptly delete this message
> and notify the sender of the delivery error by e-mail.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2793007
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2794052

Reply via email to