Examples of InitializationException


Examples of com.thoughtworks.xstream.InitializationException

        while (declaredIn != Object.class && definedIn != null) {
            try {
                field = declaredIn.getDeclaredField(fieldName);
                break;
            } catch (final SecurityException e) {
                throw new InitializationException("Access denied for field with implicit collection", e);
            } catch (final NoSuchFieldException e) {
                declaredIn = declaredIn.getSuperclass();
            }
        }
        if (field == null) {
            throw new InitializationException("No field \"" + fieldName + "\" for implicit collection");
        } else if (Map.class.isAssignableFrom(field.getType())) {
            if (itemFieldName == null && keyFieldName == null) {
                itemType = Map.Entry.class;
            }
        } else if (!Collection.class.isAssignableFrom(field.getType())) {
            final Class<?> fieldType = field.getType();
            if (!fieldType.isArray()) {
                throw new InitializationException("Field \"" + fieldName + "\" declares no collection or array");
            } else {
                Class<?> componentType = fieldType.getComponentType();
                componentType = componentType.isPrimitive() ? Primitives.box(componentType) : componentType;
                if (itemType == null) {
                    itemType = componentType;
                } else {
                    itemType = itemType.isPrimitive() ? Primitives.box(itemType) : itemType;
                    if (!componentType.isAssignableFrom(itemType)) {
                        throw new InitializationException("Field \""
                            + fieldName
                            + "\" declares an array, but the array type is not compatible with "
                            + itemType.getName());

                    }
View Full Code Here

Examples of com.thoughtworks.xstream.InitializationException

                final Converter converter = cacheConverter(annotation, converterAnnotation != null ? type : null);
                if (converter != null) {
                    if (converterAnnotation != null || converter.canConvert(type)) {
                        converterRegistry.registerConverter(converter, annotation.priority());
                    } else {
                        throw new InitializationException("Converter "
                            + annotation.value().getName()
                            + " cannot handle annotated class "
                            + type.getName());
                    }
                }
View Full Code Here

Examples of com.thoughtworks.xstream.InitializationException

    private void processAliasAnnotation(final Class<?> type, final Set<Class<?>> types) {
        final XStreamAlias aliasAnnotation = type.getAnnotation(XStreamAlias.class);
        if (aliasAnnotation != null) {
            if (classAliasingMapper == null) {
                throw new InitializationException("No " + ClassAliasingMapper.class.getName() + " available");
            }
            classAliasingMapper.addClassAlias(aliasAnnotation.value(), type);
            if (aliasAnnotation.impl() != Void.class) {
                // Alias for Interface/Class with an impl
                defaultImplementationsMapper.addDefaultImplementation(aliasAnnotation.impl(), type);
View Full Code Here

Examples of exceptions.InitializationException

    try {
      builder = builderFactory.newDocumentBuilder();
      //Handle normal errors the same as fatal errors
      builder.setErrorHandler(new XmlErrorHandler());
    } catch (ParserConfigurationException e) {
      throw new InitializationException("Could not create XML parser: " + e.getMessage());
    }
  }
View Full Code Here

Examples of main.InitializationException

    Network network;
   
    if (obj instanceof Network)
      network = (Network) obj;
    else
      throw new InitializationException("Paramater not of type Network: Aborting Column initialization");
   
   
    //Initialize mitral cells
    this.mitralCell.setParentIndex(network.indexOf(this));
    this.mitralCell.initialize(network);
View Full Code Here

Examples of net.sourceforge.clownfish.core.InitializationException

                properties.load(new FileInputStream(
                        abstractBaseMojo.getConfigurationFile()));
            }
        } catch (IOException e)  {
            log.error("unable to load configuration file", e);
            throw new InitializationException(
                    "Unable to load configuration file ["
                    + abstractBaseMojo.getConfigurationFile() + "]", e);
        }
       
        return properties;
View Full Code Here

Examples of npanday.InitializationException

    {
        this.mavenProject = mavenProject;
        repository = (AssemblyPluginsRepository) repositoryRegistry.find( "assembly-plugins" );
        if ( repository == null )
        {
            throw new InitializationException( "NPANDAY-020-005: Unable to find the assembly-plugins.xml file" );
        }
    }
View Full Code Here

Examples of org.apache.avalon.fortress.InitializationException

        super( name );
    }

    public void testRegularCreation()
    {
        InitializationException exc = new InitializationException( "Message" );
        assertNotNull( exc );
        assertNotNull( exc.getMessage() );
        assertNotNull( exc.getLocalizedMessage() );
        assertEquals( "Message", exc.getMessage() );
        assertTrue( null == exc.getCause() );
    }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.exception.InitializationException

        {
            init();
        }
        catch ( IOException ioe )
        {
            throw new InitializationException( ioe.getMessage() );
        }
    }
View Full Code Here

Examples of org.apache.maven.dotnet.InitializationException

                        }
                    }
                }
                catch ( ClassNotFoundException e )
                {
                    throw new InitializationException(
                        "NMAVEN-061-007: Unable to create AssemblyInfoMarshaller: Class Name = " + className, e );
                }
                catch ( InstantiationException e )
                {
                    throw new InitializationException(
                        "NMAVEN-020-003: Unable to create AssemblyInfoMarshaller: Class Name = " + className, e );
                }
                catch ( IllegalAccessException e )
                {
                    throw new InitializationException(
                        "NMAVEN-020-004: Unable to create AssemblyInfoMarshaller: Class Name = " + className, e );
                }
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.