Package org.drools.core

Examples of org.drools.core.RuntimeDroolsException


            } else if ( leftVal != null && rightVal != null ) {
                if ( override ) {
                    newValue = rightVal;
                } else {
                    if ( errorOnDiff ) {
                        throw new RuntimeDroolsException( errorMsg + " '" + typeClass + "'" );
                    } else {
                        // do nothing, just use the left value
                    }
                }
            }
View Full Code Here


                                          this.rootClassLoader.loadClass( type ) );
                    }
                }
            }
        } catch (ClassNotFoundException e) {
            throw new RuntimeDroolsException( "Unable to resolve class '" + lastType +
                                              "' for global '" + lastIdent + "'" );
        }

        // merge entry point declarations
        if (newPkg.getEntryPointIds() != null) {
            for (String ep : newPkg.getEntryPointIds()) {
                pkg.addEntryPointId( ep );

            }
        }

        // merge the type declarations
        if (newPkg.getTypeDeclarations() != null) {
            // add type declarations
            for (TypeDeclaration type : newPkg.getTypeDeclarations().values()) {
                // @TODO should we allow overrides? only if the class is not in use.
                if (!pkg.getTypeDeclarations().containsKey( type.getTypeName() )) {
                    // add to package list of type declarations
                    pkg.addTypeDeclaration( type );
                }
            }
        }

        // merge window declarations
        if ( newPkg.getWindowDeclarations() != null ) {
            // add window declarations
            for ( WindowDeclaration window : newPkg.getWindowDeclarations().values() ) {
                if ( !pkg.getWindowDeclarations().containsKey( window.getName() ) ||
                     pkg.getWindowDeclarations().get( window.getName() ).equals( window ) ) {
                    pkg.addWindowDeclaration( window );
                } else {
                    throw new RuntimeDroolsException( "Unable to merge two conflicting window declarations for window named: "+window.getName() );
                }
            }
        }

        //Merge rules into the RuleBase package
View Full Code Here

                                 1024 )) > -1 )
            {
                bos.write(data, 0, byteCount);
            }
        } catch ( java.io.IOException e ) {
            throw new RuntimeDroolsException("Unable getResourceAsStream for Class '" + ruleClassName+ "' ");
        }

        org.mvel2.asm.ClassReader classReader = new org.mvel2.asm.ClassReader( bos.toByteArray() );
        classReader.accept( visit, org.mvel2.asm.ClassReader.SKIP_DEBUG  );
        org.mvel2.asm.util.TraceMethodVisitor trace = visit.getTrace();
View Full Code Here

    public ClassTypeResolver(final Set<String> imports,
                             final ClassLoader classLoader) {
        this.imports = imports;

        if ( classLoader == null ) {
            throw new RuntimeDroolsException( "ClassTypeResolver cannot have a null parent ClassLoader" );
        }

        this.classLoader = classLoader;
    }
View Full Code Here

                        while ( (action = actionQueue.poll()) != null ) {
                            try {
                                action.execute( this );
                            } catch ( Exception e ) {
                                throw new RuntimeDroolsException( "Unexpected exception executing action " + action.toString(),
                                                                  e );
                            }
                        }
                    }
                } finally {
View Full Code Here

            return this.expression.evaluate( tuple,
                                             this.requiredDeclarations,
                                             workingMemory,
                                             context );
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( this.getEvalExpression() + " : " + e,
                                              e );
        }
    }
View Full Code Here

                if ( isNegative && context.getRuleBase().getConfiguration().getEventProcessingMode() == EventProcessingOption.STREAM && pattern.getObjectType().isEvent() && constraint.isTemporal() ) {
                    checkDelaying( context,
                            constraint );
                }
            } else {
                throw new RuntimeDroolsException( "Unknown constraint type: " + constraint.getType() + ". This is a bug. Please contact development team." );
            }

        }
    }
View Full Code Here

                                                                      this.previousDeclarations,
                                                                      this.localDeclarations,
                                                                      workingMemory,
                                                                      ((ReturnValueContextEntry) context).dialectContext ) );
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( e );
        }
    }
View Full Code Here

            return this.evaluator.evaluate( workingMemory,
                                            this.readAccessor,
                                            handle,
                                            value );
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( e );
        }           
    }
View Full Code Here

            return this.evaluator.evaluate( ctx.workingMemory,
                                            this.readAccessor,
                                            handle,
                                            value );
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( e );
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.core.RuntimeDroolsException

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.