Package org.drools.repository

Examples of org.drools.repository.RulesRepositoryException


        }
       
        try {
            addDrl(stringBuilder.toString());
        } catch (IOException e) {
            throw new RulesRepositoryException(
                    "Unexpected error when parsing package.", e);
        } catch (DroolsParserException e) {
            // TODO: Not really a RulesRepositoryException is it? -Rikkola-
            throw new RulesRepositoryException(
                    "Unexpected error when parsing package.", e);
        }

        // If the function part had errors we need to add them one by one to find out which one is bad.
        if ( builder.hasErrors() ) {
View Full Code Here


        RulesRepositoryAdministrator admin = new RulesRepositoryAdministrator(sessionForSetup);
        if (!admin.isRepositoryInitialized()) {
            try {
                configurator.setupRepository(sessionForSetup);
            } catch (RepositoryException e) {
                throw new RulesRepositoryException(e);
            }
        }

        //
        //Migrate v4 ruleflows to v5
        //This section checks if the repository contains drools v4
        //ruleflows that need to be migrated to drools v5
        //
        RulesRepository repo = new RulesRepository(sessionForSetup);
        try {
            if (MigrateRepository.needsRuleflowMigration(repo)) {
                MigrateRepository.migrateRuleflows(repo);
            }
        } catch (RepositoryException e) {
            e.printStackTrace();
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

    public Session newSession(String userName) {
        try {
            return configurator.login(userName);
        } catch (LoginException e) {
            throw new RulesRepositoryException("Unable to login to JCR backend.", e);
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

    public Session newSession(String userName, String password) {
        try {
            return configurator.login(userName, password);
        } catch (LoginException e) {
            throw new RulesRepositoryException("UserName: [ " + userName + "] Unable to login to JCR backend.", e);
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

            out.flush();
            out.close();      
        } catch (IOException e) {
            e.printStackTrace();
            log.error( "An error occurred building the module [" + moduleItem.getName() + "]: " + e.getMessage() );
            throw new RulesRepositoryException( "An error occurred building the module.",
                    e );
        }
        return bout.toByteArray();
    }
View Full Code Here

        log.info( "USER:" + getCurrentUserName() + " export module [name: " + moduleName + "] " );

        try {
            return rulesRepository.dumpModuleFromRepositoryXml( moduleName );
        } catch (PathNotFoundException e) {
            throw new RulesRepositoryException( e );
        } catch (IOException e) {
            throw new RulesRepositoryException( e );
        } catch (RepositoryException e) {
            throw new RulesRepositoryException( e );
        }
    }
View Full Code Here

            out.flush();
            out.close();      
        } catch (IOException e) {
            e.printStackTrace();
            log.error( "An error occurred building the module [" + moduleItem.getName() + "]: " + e.getMessage() );
            throw new RulesRepositoryException( "An error occurred building the module.",
                    e );
        }
        return bout.toByteArray();
    }
View Full Code Here

                compile( asset,
                         (ICompilable) contentHandler );
            } catch ( DroolsParserException e ) {
                errorLogger.addError( asset,
                                      e.getMessage() );
                throw new RulesRepositoryException( e );
            } catch ( IOException e ) {
                errorLogger.addError( asset,
                                      e.getMessage() );
            }
        }
View Full Code Here

        }
       
        try {
            addDrl(stringBuilder.toString());
        } catch (IOException e) {
            throw new RulesRepositoryException(
                    "Unexpected error when parsing package.", e);
        } catch (DroolsParserException e) {
            // TODO: Not really a RulesRepositoryException is it? -Rikkola-
            throw new RulesRepositoryException(
                    "Unexpected error when parsing package.", e);
        }

        // If the function part had errors we need to add them one by one to find out which one is bad.
        if ( builder.hasErrors() ) {
View Full Code Here

                } else {
                    logErrors(dslErrorEvent, assetItem, file);
                }

            } catch (IOException e) {
                throw new RulesRepositoryException(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.repository.RulesRepositoryException

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.