Package org.drools.guvnor.client.rpc

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


                                         Date modifiedBefore,
                                         boolean seekArchived,
                                         int skip,
                                         int numRows) throws SerializationException {
        if ( numRows == 0 ) {
            throw new DetailedSerializationException( "Unable to return zero results (bug)",
                                                     "probably have the parameters around the wrong way, sigh..." );
        }
        Map<String, String[]> q = new HashMap<String, String[]>() {
            {
                for ( int i = 0; i < qr.length; i++ ) {
View Full Code Here


        try {
            repository.loadState( name ).remove();
            repository.save();

        } catch ( RulesRepositoryException e ) {
            throw new DetailedSerializationException( "Unable to remove status. It is probably still used (even by archived items).",
                                                     e.getMessage() );
        }
    }
View Full Code Here

            repository.loadCategory( categoryPath ).remove();
            repository.save();
        } catch ( RulesRepositoryException e ) {
            log.info( "Unable to remove category [" + categoryPath + "]. It is probably still used: " + e.getMessage() );

            throw new DetailedSerializationException( "Unable to remove category. It is probably still used.",
                                                     e.getMessage() );
        }
    }
View Full Code Here

                                 categoryOperator,
                                 category,
                                 enableCategorySelector,
                                 customSelectorName );
        } catch ( NoClassDefFoundError e ) {
            throw new DetailedSerializationException( "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)." );
        } catch ( UnsupportedClassVersionError e ) {
            throw new DetailedSerializationException( "Can not build the package. One or more of the classes that are needed were compiled with an unsupported Java version.",
                                                     "For example the pojo classes were compiled with Java 1.6 and Guvnor is running on Java 1.5. [" + e.getMessage() + "]" );
        }
    }
View Full Code Here

                                     asm );
                repository.save();
            } catch ( Exception e ) {
                e.printStackTrace();
                log.error( "An error occurred building the package [" + item.getName() + "]: " + e.getMessage() );
                throw new DetailedSerializationException( "An error occurred building the package.",
                                                         e.getMessage() );
            }

            return null;
View Full Code Here

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

                                  cl,
                                  rb,
                                  coverage );
        } catch ( Exception e ) {
            if ( e instanceof DetailedSerializationException ) {
                DetailedSerializationException err = (DetailedSerializationException) e;
                result = new SingleScenarioResult();
                if ( err.getErrs() != null ) {
                    result.result = new ScenarioRunResult( err.getErrs(),
                                                           null );
                } else {
                    throw err;
                }
            }
View Full Code Here

                if ( result == null || result.lines.length == 0 ) {
                    rb = loadRuleBase( item,
                                       buildCl );
                    this.ruleBaseCache.put( item.getUUID(),
                                            rb );
                } else throw new DetailedSerializationException( "Build error",
                                                                result.lines );
            }

        }
        return rb;
View Full Code Here

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

        }
    }
View Full Code Here

            r.result = new ScenarioRunResult( null,
                                              scenario );
            return r;
        } catch ( ClassNotFoundException e ) {
            log.error( "Unable to load a required class: " + e.getMessage() );
            throw new DetailedSerializationException( "Unable to load a required class.",
                                                     e.getMessage() );
        } catch ( ConsequenceException e ) {
            String messageShort = "There was an error executing the consequence of rule [" + e.getRule().getName() + "]";
            String messageLong = e.getMessage();
            if (e.getCause() != null){
                messageLong += "\nCAUSED BY "+e.getCause().getMessage();
            }

            log.error( messageShort+": "+messageLong );
            throw new DetailedSerializationException( messageShort,
                                                     messageLong );
        } catch ( Exception e ) {
            log.error( "Unable to run the scenario: " + e.getMessage() );
            throw new DetailedSerializationException( "Unable to run the scenario.",
                                                     e.getMessage() );
        }
    }
View Full Code Here

TOP

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

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.