Package com.impetus.kundera.utils

Examples of com.impetus.kundera.utils.InvalidConfigurationException


    }
   
    @Test
    public void testInvalidConfigurationException()
    {
        InvalidConfigurationException exception = new InvalidConfigurationException("Error with string");
        Assert.assertNotNull(exception);
   

        exception = new InvalidConfigurationException(new RuntimeException());
        Assert.assertNotNull(exception);
       
        exception = new InvalidConfigurationException();
        Assert.assertNotNull(exception);       
       
        exception = new InvalidConfigurationException("Error with string", new RuntimeException());
        Assert.assertNotNull(exception);
    }
View Full Code Here


            xmlRootNode = parseDocument(is);
            validateDocumentAgainstSchema(xmlRootNode);
        }
        catch (IOException e)
        {
            throw new InvalidConfigurationException(e);
        }
        finally
        {
            if (is != null)
            {
View Full Code Here

            log.error("Error during parsing, Caused by: {}.", e);
            throw new PersistenceLoaderException("Error during parsing persistence.xml, caused by: ", e);
        }
        catch (IOException e)
        {
            throw new InvalidConfigurationException("Error reading persistence.xml, caused by: ", e);
        }
        catch (SAXException e)
        {
            throw new InvalidConfigurationException("Error parsing persistence.xml, caused by: ", e);
        }

        if (!parsingErrors.isEmpty())
        {
            throw new InvalidConfigurationException("Invalid persistence.xml", (Throwable) parsingErrors.get(0));
        }

        return persistenceXmlDoc;
    }
View Full Code Here

            schemaValidator.validate(new DOMSource(xmlRootNode));

            if (!validationErrors.isEmpty())
            {
                final String exceptionText = "persistence.xml is not conform against the supported schema definitions.";
                throw new InvalidConfigurationException(exceptionText);
            }
        }
        catch (SAXException e)
        {
            final String exceptionText = "Error validating persistence.xml against schema defintion, caused by: ";
            throw new InvalidConfigurationException(exceptionText, e);
        }
        catch (IOException e)
        {
            final String exceptionText = "Error opening xsd schema file. The given persistence.xml descriptor version "
                    + version + " might not be supported yet.";
            throw new InvalidConfigurationException(exceptionText, e);
        }
    }
View Full Code Here

            catch (Exception e)
            {
                logger.error(
                        "Missing lucene from classpath. Please make sure those are available to load lucene directory {}!",
                        luceneDirectoryPath);
                throw new InvalidConfigurationException(e);
            }

            // indexManager = new IndexManager(LuceneIndexer.getInstance(new
            // StandardAnalyzer(Version.LUCENE_CURRENT),
            // luceneDirectoryPath));
View Full Code Here

        }

        if (xmls == null || !xmls.hasMoreElements())
        {
            log.error("Could not find any META-INF/persistence.xml file in the classpath");
            throw new InvalidConfigurationException("Could not find any META-INF/persistence.xml file in the classpath");
        }

        Set<String> persistenceUnitNames = new HashSet<String>();
        Map<String, PersistenceUnitMetadata> persistenceUnitMap = new HashMap<String, PersistenceUnitMetadata>();
        while (xmls.hasMoreElements())
View Full Code Here

TOP

Related Classes of com.impetus.kundera.utils.InvalidConfigurationException

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.