Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » MissingResourceException in PropertyResourceBundle
MissingResourceException in PropertyResourceBundle [message #526407] Sat, 10 April 2010 14:40 Go to next message
Ashish Missing name is currently offline Ashish Missing name
Messages: 4
Registered: July 2009
Junior Member
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.

Re: MissingResourceException in PropertyResourceBundle [message #526439 is a reply to message #526407] Sun, 11 April 2010 02:38 Go to previous message
Ashish Missing name is currently offline Ashish Missing name
Messages: 4
Registered: July 2009
Junior Member
No worries.. I was giving a wrong name for the properties file.
Previous Topic:Any plans on OSGi Monitor Admin?
Next Topic:Updates in an Eclipse Product with p2
Goto Forum:
  


Current Time: Thu Sep 18 19:54:05 GMT 2014

Powered by FUDForum. Page generated in 0.02177 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software