Package org.drools.guvnor.client.rpc

Examples of org.drools.guvnor.client.rpc.DetailedSerializableException


        try {
            return buildPackage( selectorConfigName,
                                 force,
                                 item );
        } catch ( NoClassDefFoundError e ) {
            throw new DetailedSerializableException( "Unable to find a class that was needed when building the package  [" + e.getMessage() + "]",
                                                     "Perhaps you are missing them from the model jars, or from the BRMS itself (lib directory)." );
        }
    }
View Full Code Here


                                     asm );
                repository.save();
            } catch ( Exception e ) {
                e.printStackTrace();
                log.error( e );
                throw new DetailedSerializableException( "An error occurred building the package.",
                                                         e.getMessage() );
            }

            return null;
View Full Code Here

                    StringBuffer buf = new StringBuffer();
                    for ( int i = 0; i < res.length; i++ ) {
                        buf.append( res[i].toString() );
                        buf.append( '\n' );
                    }
                    throw new DetailedSerializableException( "Unable to rebuild snapshot [" + snapName,
                                                             buf.toString() + "]" );
                }
            }
        }
    }
View Full Code Here

        try {
            return deserKnowledgebase( item,
                                       cl );
        } catch ( ClassNotFoundException e ) {
            log.error( e );
            throw new DetailedSerializableException( "A required class was not found.",
                                                     e.getMessage() );
        } catch ( Exception e ) {
            log.error( e );
            log.info( "...but trying to rebuild binaries..." );
            try {
                BuilderResult[] res = this.buildPackage( "",
                                                         true,
                                                         item );
                if ( res != null && res.length > 0 ) {
                    throw new DetailedSerializableException( "There were errors when rebuilding the knowledgebase.",
                                                             "" );
                }
                try {
                    return deserKnowledgebase( item,
                                               cl );
                } catch ( Exception e2 ) {
                    throw new DetailedSerializableException( "Unable to reload knowledgebase.",
                                                             e.getMessage() );
                }
            } catch ( SerializableException e1 ) {
                throw new DetailedSerializableException( "Unable to rebuild the rulebase.",
                                                         "" );
            }

        }
    }
View Full Code Here

            r.result = new ScenarioRunResult( null,
                                              scenario );
            return r;
        } catch ( ClassNotFoundException e ) {
            log.error( e );
            throw new DetailedSerializableException( "Unable to load a required class.",
                                                     e.getMessage() );
        } catch ( ConsequenceException e ) {
            log.info( e );
            throw new DetailedSerializableException( "There was an error executing the consequence of rule [" + e.getRule().getName() + "]",
                                                     e.getMessage() );
        } catch (Exception e) {
            log.error(e);           
            throw new DetailedSerializableException("Unable to run the scenario.", e.getMessage());
        }
    }
View Full Code Here

        VerifierRunner runner = new VerifierRunner();
        try {
            return runner.analyse( drl );
        } catch ( DroolsParserException e ) {
            log.error( e );
            throw new DetailedSerializableException( "Unable to parse the rules.",
                                                     e.getMessage() );
        }
    }
View Full Code Here

                }
            }
            return res.toArray( new String[res.size()] );
        } catch ( IOException e ) {
            log.error( e );
            throw new DetailedSerializableException( "Unable to read the jar files in the package.",
                                                     e.getMessage() );
        } finally {
            IOUtils.closeQuietly( jis );
        }
View Full Code Here

                errs.append( "An error occurred building package [" + pkg.getName() + "]\n" );
            }
        }

        if ( errs.toString().length() > 0 ) {
            throw new DetailedSerializableException( "Unable to rebuild all packages.",
                                                     errs.toString() );
        }
    }
View Full Code Here

  public AnalysisReport analyse(String drl) throws DroolsParserException, SerializableException {
    DrlParser p = new DrlParser();
    PackageDescr pkg = p.parse(drl);
    if (p.hasErrors()) {
      throw new DetailedSerializableException(
        "Unable to verify rules due to syntax errors in the rules.",
        "Please correct syntax errors - build the package before trying the verifier again.");
    }
    Verifier a = new Verifier();
    a.addPackageDescr(pkg);
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.rpc.DetailedSerializableException

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.