You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@esme.apache.org by Richard Hirsch <hi...@gmail.com> on 2009/12/04 09:31:07 UTC
Problem with using S.? in RestAPI
I know that David just fixed this error in the test suite but now we
have the same in the RestAPI.
<pre>java.lang.IllegalStateException: Attempted to use resource
bundles outside of an initialized S scope. S only usable when
initialized, such as during request processing. Did you call S.? from
Boot?
net.liftweb.http.S$.resourceBundles(S.scala:612)
net.liftweb.http.S$.$qmark(S.scala:638)
net.liftweb.http.S$.$qmark(S.scala:656)
org.apache.esme.api.RestAPI$.sendMsg(RestAPI.scala:290)
org.apache.esme.api.RestAPI$$anonfun$sendMsgWithToken$1$$anonfun$apply$61$$anonfun$apply$62.apply(RestAPI.scala:285)
Is there a way to fix this problem or should I delete all the S.? from
the Scala files that represent our various APIs?
D.
Re: Problem with using S.? in RestAPI
Posted by David Pollak <fe...@gmail.com>.
Dick & Co.,
Recently, we made it explicitly illegal to access S.? (and associated
methods) outside of the state scope. The reason? Because outside of S, you
don't know the locale and if you don't know the locale, then it's pointless
to try to access localized strings.
But, I can see where localization and "pulling strings out of the Scala" go
hand in hand.
Could one of you open a ticket at
http://github.com/dpp/liftweb/issues#listentitled "Non-scoped
localized strings" and link to this thread.
I (or some other member of the Lift committers) will break out the
localization into a separate module such that you can access to localization
stuff outside of the S scope as long as you present a locale (which is a
no-brainer if you're calling ? from User.
Thanks,
David
On Fri, Dec 4, 2009 at 12:31 AM, Richard Hirsch <hi...@gmail.com>wrote:
> I know that David just fixed this error in the test suite but now we
> have the same in the RestAPI.
>
> <pre>java.lang.IllegalStateException: Attempted to use resource
> bundles outside of an initialized S scope. S only usable when
> initialized, such as during request processing. Did you call S.? from
> Boot?
> net.liftweb.http.S$.resourceBundles(S.scala:612)
> net.liftweb.http.S$.$qmark(S.scala:638)
> net.liftweb.http.S$.$qmark(S.scala:656)
> org.apache.esme.api.RestAPI$.sendMsg(RestAPI.scala:290)
>
> org.apache.esme.api.RestAPI$$anonfun$sendMsgWithToken$1$$anonfun$apply$61$$anonfun$apply$62.apply(RestAPI.scala:285)
>
> Is there a way to fix this problem or should I delete all the S.? from
> the Scala files that represent our various APIs?
>
>
> D.
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
Re: Problem with using S.? in RestAPI
Posted by Ethan Jewett <es...@gmail.com>.
Hi (again) Dick,
The API tests are working fine for me at the moment. It looks to me
like there were changes to the way the API tests are initialized. Are
you on the most up to date revision? ("svn status")
Ethan
On Fri, Dec 4, 2009 at 6:44 AM, Ethan Jewett <es...@gmail.com> wrote:
> No, please don't delete them. They are central to the way the Apis
> work. Either they were introduced in a recent checkin, in which case
> just the offending change should be backed out, or the bug is
> somewhere else.
>
> Ethan
>
> On Friday, December 4, 2009, Richard Hirsch <hi...@gmail.com> wrote:
>> I know that David just fixed this error in the test suite but now we
>> have the same in the RestAPI.
>>
>> <pre>java.lang.IllegalStateException: Attempted to use resource
>> bundles outside of an initialized S scope. S only usable when
>> initialized, such as during request processing. Did you call S.? from
>> Boot?
>> net.liftweb.http.S$.resourceBundles(S.scala:612)
>> net.liftweb.http.S$.$qmark(S.scala:638)
>> net.liftweb.http.S$.$qmark(S.scala:656)
>> org.apache.esme.api.RestAPI$.sendMsg(RestAPI.scala:290)
>> org.apache.esme.api.RestAPI$$anonfun$sendMsgWithToken$1$$anonfun$apply$61$$anonfun$apply$62.apply(RestAPI.scala:285)
>>
>> Is there a way to fix this problem or should I delete all the S.? from
>> the Scala files that represent our various APIs?
>>
>>
>> D.
>>
>
Re: Problem with using S.? in RestAPI
Posted by Ethan Jewett <es...@gmail.com>.
No, please don't delete them. They are central to the way the Apis
work. Either they were introduced in a recent checkin, in which case
just the offending change should be backed out, or the bug is
somewhere else.
Ethan
On Friday, December 4, 2009, Richard Hirsch <hi...@gmail.com> wrote:
> I know that David just fixed this error in the test suite but now we
> have the same in the RestAPI.
>
> <pre>java.lang.IllegalStateException: Attempted to use resource
> bundles outside of an initialized S scope. S only usable when
> initialized, such as during request processing. Did you call S.? from
> Boot?
> net.liftweb.http.S$.resourceBundles(S.scala:612)
> net.liftweb.http.S$.$qmark(S.scala:638)
> net.liftweb.http.S$.$qmark(S.scala:656)
> org.apache.esme.api.RestAPI$.sendMsg(RestAPI.scala:290)
> org.apache.esme.api.RestAPI$$anonfun$sendMsgWithToken$1$$anonfun$apply$61$$anonfun$apply$62.apply(RestAPI.scala:285)
>
> Is there a way to fix this problem or should I delete all the S.? from
> the Scala files that represent our various APIs?
>
>
> D.
>