0

What am i doing wrong? This code:

def messages = ResourceBundle.getBundle('messages') 

is giving this error. I am trying to get internationalization working in my application:

2014-06-01 10:10:14,330 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver  -     MissingResourceException occurred when processing request: [POST] /FatcaOne_0/customer/authenticate -     parameters: 
username: 
password: *** 
Can't find bundle for base name com.fatcaone.i18n.messages, locale en_US. Stacktrace follows: 
Message: Can't find bundle for base name com.fatcaone.i18n.messages, locale en_US 
Line | Method 
->> 1499 | throwMissingResourceException in java.util.ResourceBundle 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1322 | getBundleImpl                 in     '' 
|   1028 | getBundle . . . . . . . . . . in     '' 
|     33 | doCall                        in com.twc.fatcaone.CustomerController$_closure2$$EOfwWAnt 
|    198 | doFilter . . . . . . . . . .  in     grails.plugin.cache.web.filter.PageFragmentCachingFilter 
|     63 | doFilter                      in grails.plugin.cache.web.filter.AbstractFilter 
|   1145 | runWorker . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor 
|    615 | run                           in java.util.concurrent.ThreadPoolExecutor$Worker 
^    745 | run . . . . . . . . . . . . . in java.lang.Thread 
Anonymous Human
  • 1,858
  • 1
  • 21
  • 47
  • this might be of help last answer on page http://stackoverflow.com/questions/12986234/cant-find-bundle-for-base-name-bundle-locale-en-us – V H Jun 01 '14 at 15:32
  • 1
    Where are you calling this from? Getting message bundles differs for Controllers/Services and plain Groovy source code... EDIT: looks like `CustomerController` – nickdos Jun 02 '14 at 04:21
  • @nickdos Yes Im calling it from a controller. Any ideas? – Anonymous Human Jun 02 '14 at 16:46
  • It looks like you might have some custom i18n code, as the basename is unusual. Do you have a `messageSource` declaration in your `conf/spring/resources.groovy` file? – nickdos Jun 03 '14 at 01:37

0 Answers0