MissingResourceException in PropertyResourceBundle [message #526407] |
Sat, 10 April 2010 10:40  |
Eclipse User |
|
|
|
Hi,
I have an OSGi bundle that I am deploying in equinox. The application has to read a properties file and it uses PropertyResourceBundle.getBundle ("abcd"); When I start the bundle I get:
java.util.MissingResourceException: Can't find bundle for base name abcd, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(Resou rceBundle.java:1521)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1 260)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:715)
I am using Maven and I do have:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName >
<Bundle-Name>${pom.name}</Bundle-Name>
<Bundle-Version>${pom.version}</Bundle-Version>
<Include-Resource>src/main/resources</Include-Resource>
</instructions>
</configuration>
</plugin>
How do I read a ResourceBundle then? I tried to copy the abcd.properties under META-INF/; META-INF/config and also at the classes/ root but it can't seem to find it. Help.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04152 seconds