0

I put some properties files (resources.propperties for instance) that I put in the

src/main/resources/com/ebiznext/agregation/service/payment/sips

directory and I tried to retrieve them in my code like this :

ResourceBundle resource = ResourceBundle.getBundle("com.ebiznext.aggregation.service.paiement.sips.resources", Locale.getDefault())

But I got the exception :

Caused by MissingResourceException: Can't find bundle for base name com.ebiznext.aggregation.service.paiement.sips.resources, locale fr_FR
->> 1499 | throwMissingResourceException in java.util.ResourceBundle
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1322 | getBundleImpl    in     ''
|   1028 | getBundle . . .  in     ''

So my question is what is the correct wat to retrieve a resource bundle in Grails?

Dimitri
  • 8,122
  • 19
  • 71
  • 128
  • There's a typo in the path: "agregation" and in your bundle path: "paiement". – heikkim Feb 01 '13 at 13:14
  • Corrected, but I still have the same error. – Dimitri Feb 01 '13 at 13:21
  • 1
    Are these files even included in the .war? Have you checked that? As far as I know grails only uses `src/java` and `src/groovy`. The properties files usually go into the i18n folder. – hsan Feb 01 '13 at 13:37

0 Answers0