5 Replies Latest reply on Jun 24, 2005 9:57 AM by Viet

    NullPointerException in ResourceBundles

    jamie mccrindle Newbie

      Hi,

      I'm getting a null pointer exception while trying to get my portlet ResourceBundle in my init method:

      Caused by: java.lang.NullPointerException
      at org.jboss.portal.portlet.plugins.language.ResourceBundles.get(ResourceBundles.java:107)
      at org.jboss.portal.portlet.impl.PortletConfigImpl.getResourceBundle(PortletConfigImpl.java:61)
      at org.portletbridge.portlet.PortletBridgePortlet.init(PortletBridgePortlet.java:104)
      at org.jboss.portal.portlet.PortletContainer.initPortlet(PortletContainer.java:221)
      at org.jboss.portal.portlet.PortletContainer.start(PortletContainer.java:129)

      The code in question looks like this:

      public void init(PortletConfig config) throws PortletException {
      this.config = config
      ResourceBundle resourceBundle = config.getResourceBundle(Locale
      .getDefault());

      This is so that I can internationalize any exceptions I get during initialization (localised to the VM).

      Any suggestions?