esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Pollak <>
Subject Re: Problem with using S.? in RestAPI
Date Fri, 04 Dec 2009 16:52:13 GMT
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 "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.



On Fri, Dec 4, 2009 at 12:31 AM, Richard Hirsch <>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
Beginning Scala
Follow me:
Surf the harmonics

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message