Package org.drools

Examples of org.drools.ProviderInitializationException


    private static void loadProvider() {
        try {
            Class<BatchExecutionHelperProvider> cls = (Class<BatchExecutionHelperProvider>) Class.forName( "org.drools.runtime.help.impl.BatchExecutionHelperProviderImpl" );
            setBatchExecutionHelperProvider( cls.newInstance() );
        } catch ( Exception e2 ) {
            throw new ProviderInitializationException( "Provider org.drools.runtime.help.impl.BatchExecutionHelperProviderImpl could not be set.",
                                                       e2 );
        }
    }
View Full Code Here


    private static void loadProvider() {
        try {
            Class<CommandFactoryProvider> cls = (Class<CommandFactoryProvider>) Class.forName( "org.drools.command.impl.CommandFactoryProviderImpl" );
            setCommandFactoryProvider( cls.newInstance() );
        } catch ( Exception e2 ) {
            throw new ProviderInitializationException( "Provider org.drools.command.impl.CommandFactoryProviderImpl could not be set.",
                                                       e2 );
        }
    }
View Full Code Here

        try {
            // we didn't find anything in properties so lets try and us reflection
            Class<JPAKnowledgeServiceProvider> cls = (Class<JPAKnowledgeServiceProvider>) Class.forName( "org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl" );
            setJPAKnowledgeServiceProvider( cls.newInstance() );
        } catch ( Exception e ) {
            throw new ProviderInitializationException( "Provider org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl could not be set.",
                                                       e );
        }
    }
View Full Code Here

        try {
            // we didn't find anything in properties so lets try and us reflection
            Class<KnowledgeAgentProvider> cls = (Class<KnowledgeAgentProvider>) Class.forName( "org.drools.agent.impl.KnowledgeAgentProviderImpl" );
            setKnowledgeAgentProvider( cls.newInstance() );
        } catch ( Exception e ) {
            throw new ProviderInitializationException( "Provider org.drools.agent.KnowledgeAgentProvider could not be set." );
        }
    }
View Full Code Here

    private static void loadProvider() {
        try {
            Class<MarshallerProvider> cls = (Class<MarshallerProvider>) Class.forName( "org.drools.marshalling.impl.MarshallerProviderImpl" );
            setMarshallerProvider( cls.newInstance() );
        } catch ( Exception e2 ) {
            throw new ProviderInitializationException( "Provider org.drools.marshalling.impl.MarshallerProviderImpl could not be set.",
                                                       e2 );
        }
    }
View Full Code Here

    private static void loadProvider() {
        try {
            Class<KnowledgeRuntimeLoggerProvider> cls = (Class<KnowledgeRuntimeLoggerProvider>) Class.forName( "org.drools.audit.KnowledgeRuntimeLoggerProviderImpl" );
            setKnowledgeRuntimeLoggerProvider( cls.newInstance() );
        } catch ( Exception e ) {
            throw new ProviderInitializationException( "Provider org.drools.audit.KnowledgeRuntimeLoggerProviderImpl could not be set.",
                                                       e );
        }
    }
View Full Code Here

    private static void loadProvider() {
        try {
            Class<DroolsJaxbHelperProvider> cls = (Class<DroolsJaxbHelperProvider>) Class.forName( "org.drools.runtime.pipeline.impl.DroolsJaxbHelperProviderImpl" );
            setDroolsJaxbHelperProvider( cls.newInstance() );
        } catch ( Exception e2 ) {
            throw new ProviderInitializationException( "Provider org.drools.runtime.pipeline.impl.DroolsJaxbHelperProviderImpl could not be set.",
                                                       e2 );
        }
    }
View Full Code Here

    private static void loadProvider() {
        try {
            Class<KnowledgeBuilderProvider> cls = (Class<KnowledgeBuilderProvider>) Class.forName( "org.drools.builder.impl.KnowledgeBuilderProviderImpl" );
            setKnowledgeBuilderProvider( cls.newInstance() );
        } catch ( Exception e2 ) {
            throw new ProviderInitializationException( "Provider org.drools.builder.impl.KnowledgeBuilderProviderImpl could not be set.",
                                                       e2 );
        }
    }
View Full Code Here

                                        classLoader );
                }
            } catch ( IOException e ) {
                final String msg = MessageFormat.format( ERR_FILE_READ,
                                                         serviceClass.getName() );
                throw new ProviderInitializationException( msg,
                                                           e );
            } finally {
                try {
                    providerConfigFile.close();
                } catch ( IOException e ) {
                    // FIXME: This should use the Drools logging mechanism.
                    e.printStackTrace();
                }
            }
        }

        // did not find an implementation anywhere
        final String msg = MessageFormat.format( ERR_NOT_FOUND,
                                                 serviceClass.getName() );
        throw new ProviderInitializationException( msg );
    }
View Full Code Here

            return newInstance( serviceClass,
                                providerClass );
        } catch ( ClassNotFoundException e ) {
            final String msg = MessageFormat.format( ERR_NOT_FOUND,
                                                     serviceClass.getName() );
            throw new ProviderInitializationException( msg,
                                                       e );
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.ProviderInitializationException

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.