Package com.sun.faces.config

Examples of com.sun.faces.config.ConfigurationException


            if (clazz != null && returnObject == null) {
                returnObject = clazz.newInstance();
            }
        }
        catch (Exception e) {
            throw new ConfigurationException(
                    buildMessage(MessageFormat.format("Unable to create a new instance of ''{0}'': {1}",
                    clazz.getName(),
                    e.toString())), e);
        }
        return returnObject;
View Full Code Here


                if (clazz != null) {
                    returnObject = decorateInstance(clazz, rootType, root);
                }

            } catch (ClassNotFoundException cnfe) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Unable to find class ''{0}''",
                                                        className)));
            } catch (NoClassDefFoundError ncdfe) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Class ''{0}'' is missing a runtime dependency: {1}",
                                                        className,
                                                        ncdfe.toString())));
            } catch (ClassCastException cce) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Class ''{0}'' is not an instance of ''{1}''",
                                                        className,
                                                        rootType)));
            } catch (Exception e) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Unable to create a new instance of ''{0}'': {1}",
                                                        className,
                                                        e.toString())), e);
            }
        }
View Full Code Here

        // now add the accumulated renderers to the RenderKits
        for (Map.Entry<String,Map<Document,List<Node>>> entry : renderers.entrySet()) {
            RenderKit rk = rkf.getRenderKit(null, entry.getKey());
            if (rk == null) {
                throw new ConfigurationException(
                      MessageUtils.getExceptionMessageString(
                            MessageUtils.RENDERER_CANNOT_BE_REGISTERED_ID,
                            entry.getKey()));
            }
           
            for (Map.Entry<Document,List<Node>> renderEntry : entry.getValue().entrySet()) {
                addRenderers(sc, rk, renderEntry.getKey(), renderEntry.getValue());
            }
        }
        // now add the accumulated behavior renderers to the RenderKits
        for (Map.Entry<String,Map<Document,List<Node>>> entry : behaviorRenderers.entrySet()) {
            RenderKit rk = rkf.getRenderKit(null, entry.getKey());
            if (rk == null) {
                throw new ConfigurationException(
                      MessageUtils.getExceptionMessageString(
                            MessageUtils.RENDERER_CANNOT_BE_REGISTERED_ID,
                            entry.getKey()));
            }
           
View Full Code Here

                if (ReflectionUtils.lookupConstructor(sourceClass, ctorArg) != null) {
                    return ctorArg;
                }
            }
        } catch (ClassNotFoundException cnfe) {
            throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Unable to find class ''{0}''",
                                                        source), sourceNode),
                                                        cnfe);
        }
View Full Code Here

                    }
                   
                }

            } catch (ClassNotFoundException cnfe) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Unable to find class ''{0}''",
                                                        className),
                                   source),
                                   cnfe);
            } catch (NoClassDefFoundError ncdfe) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Class ''{0}'' is missing a runtime dependency: {1}",
                                                        className,
                                                        ncdfe.toString()),
                                   source),
                                   ncdfe);
            } catch (ClassCastException cce) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Class ''{0}'' is not an instance of ''{1}''",
                                                        className,
                                                        rootType),
                                   source),
                                   cce);
            } catch (Exception e) {
                throw new ConfigurationException(
                      buildMessage(MessageFormat.format("Unable to create a new instance of ''{0}'': {1}",
                                                        className,
                                                        e.toString()),
                                   source), e);
            }
View Full Code Here

                                converterClass,
                                Converter.class);
                    }
                    application.addConverter(cfcClass, converterClass);
                } catch (ClassNotFoundException cnfe) {
                    throw new ConfigurationException(cnfe);
                }
            }
        }
    }
View Full Code Here

            if (handlerClass != null) {
                try {
                    Class<?> clazz = loadClass(sc, handlerClass, this, null);
                    taglibrary.putBehavior(tagName, behaviorId, clazz);
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException(e);
                }

            } else {
                taglibrary.putBehavior(tagName, behaviorId);
            }
View Full Code Here

                                     TagLibraryImpl taglibrary,
                                     String name) {

        String className = getNodeText(handlerClass);
        if (className == null) {
            throw new ConfigurationException("The tag named "+name+" from namespace "+taglibrary.getNamespace()+" has a null handler-class defined");
        }
        try {
            Class<?> clazz;
            try {
                clazz = loadClass(sc, className, this, null);
                taglibrary.putTagHandler(name, clazz);
            } catch (NoClassDefFoundError defNotFound) {
                String message = defNotFound.toString();
                if (message.contains("com/sun/facelets/")
                    || message.contains("com.sun.facelets.")) {
                    if (LOGGER.isLoggable(Level.WARNING)) {
                        LOGGER.log(Level.WARNING,
                                   "jsf.config.legacy.facelet.warning",
                                   new Object[]{handlerClass,});
                    }
                } else {
                    throw defNotFound;
                }
            }
        } catch (ClassNotFoundException cnfe) {
            throw new ConfigurationException(cnfe);
        }

    }
View Full Code Here

                        }
                    } else {
                        throw defNotFound;
                    }
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException(e);
                }

            } else {
                taglibrary.putValidator(name, validatorId);
            }
View Full Code Here

                        }
                    } else {
                        throw defNotFound;
                    }
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException(e);
                }

            } else {
                taglibrary.putConverter(name, converterId);
            }
View Full Code Here

TOP

Related Classes of com.sun.faces.config.ConfigurationException

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.