Package java.util

Examples of java.util.MissingResourceException


        message.append(" for component: ");
        message.append(component.getPageRelativePath());
        message.append(" [class=").append(component.getClass().getName()).append("]");
      }

      throw new MissingResourceException(message.toString(), (component != null
        ? component.getClass().getName() : ""), key);
    }

    return "[Warning: Property for '" + key + "' not found]";
  }
View Full Code Here


    private JcrResourceBundle createResourceBundle(String baseName, Locale locale) {

        ResourceResolver resolver = getResourceResolver();
        if (resolver == null) {
            log.info("createResourceBundle: Missing Resource Resolver, cannot create Resource Bundle");
            throw new MissingResourceException(
                "ResourceResolver not available", getClass().getName(), "");
        }

        final JcrResourceBundle bundle = new JcrResourceBundle(locale, baseName, resolver);
View Full Code Here

        } else {
            i = root.getResourceAsStream(resourceName);
        }

        if (i == null && required) {
            throw new MissingResourceException("could not locate data", root.getPackage().getName(), resourceName);
        }
        return i;
    }
View Full Code Here

    public ResourceBundle getApplicationBundle(FacesContext facesContext, Enum<?> messageKey, Locale locale)
        throws MissingResourceException {

        if (facesContext == null) {
            throw new MissingResourceException("FacesContext is null", getClass().getName(), messageKey.toString());
        }

        Application application = facesContext.getApplication();

        if (application == null || application.getMessageBundle() == null) {
            throw new MissingResourceException("Cannot read message bundle name from application", getClass().getName(),
                messageKey.toString());
        }

        return ResourceBundle.getBundle(application.getMessageBundle(), locale, getClassLoader());
    }
View Full Code Here

        private final String _localizedMessage;

        private Message(String packageName, ResourceBundle bundle, String key,
            Object[] subs, boolean fatal) {
            if (bundle == null && fatal)
                throw new MissingResourceException(key, key, key);

            _pkg = packageName;
            _key = key;
            _subs = subs;
            if (bundle == null) {
View Full Code Here

            } catch (MissingResourceException mse) {
            }
        }

        if (fatal)
            throw new MissingResourceException(key, getClass().getName(), key);
        return null;
    }
View Full Code Here

                errs = (errs == null) ? new StringBuffer() : errs.append("\n");
                errs.append(_derivations[i].getClass().getName() + ":" + t);
            }
        }
        reportErrors(errs, resource);
        throw new MissingResourceException(resource,
            ProductDerivations.class.getName(), resource);
    }
View Full Code Here

            }
        }
        String aPath = (String) AccessController.doPrivileged(
            J2DoPrivHelper.getAbsolutePathAction(file));
        reportErrors(errs, aPath);
        throw new MissingResourceException(aPath,
            ProductDerivations.class.getName(), aPath);
    }
View Full Code Here

     * Thrown proper exception for given errors.
     */
    private static void reportErrors(StringBuffer errs, String resource) {
        if (errs == null)
            return;
        throw new MissingResourceException(errs.toString(),
            ProductDerivations.class.getName(), resource);
    }
View Full Code Here

            if (idx != -1) {
                if (idx < path.length() - 1)
                    anchor = path.substring(idx + 1);
                path = path.substring(0, idx);
                if (path.length() == 0)
                    throw new MissingResourceException(_loc.get("anchor-only",
                        props).getMessage(), Configurations.class.getName(),
                        props);
            }

            File file = new File(path);
            if (((Boolean) AccessController.doPrivileged(J2DoPrivHelper
                .isFileAction(file))).booleanValue())
                provider = ProductDerivations.load(file, anchor, null);
            else {
                file = new File("META-INF" + File.separatorChar + path);
                if (((Boolean) AccessController.doPrivileged(J2DoPrivHelper
                    .isFileAction(file))).booleanValue())
                    provider = ProductDerivations.load(file, anchor, null);
                else
                    provider = ProductDerivations.load(path, anchor, null);
            }
            if (provider != null)
                provider.setInto(conf);
            else
                throw new MissingResourceException(_loc.get("no-provider",
                    props).getMessage(), Configurations.class.getName(),
                    props);
        } else {
            provider = ProductDerivations.loadDefaults(null);
            if (provider != null)
View Full Code Here

TOP

Related Classes of java.util.MissingResourceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.