Package org.drools.guvnor.client.rpc

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


        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( item,
                                                       true );
                if ( res != null && res.lines.length > 0 ) {
                    log.error( "There were errors when rebuilding the knowledgebase." );
                    throw new DetailedSerializableException( "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 DetailedSerializableException( "Unable to reload knowledgebase.",
                                                             e.getMessage() );
                }
            } catch ( Exception e1 ) {
                log.error( "Unable to rebuild the rulebase: " + e.getMessage() );
                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( "Unable to load a required class: " + e.getMessage() );
            throw new DetailedSerializableException( "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 DetailedSerializableException( messageShort,
                                                     messageLong );
        } catch ( Exception e ) {
            log.error( "Unable to run the scenario: " + e.getMessage() );
            throw new DetailedSerializableException( "Unable to run the scenario.",
                                                     e.getMessage() );
        }
    }
View Full Code Here

                }
            }
            return res.toArray( new String[res.size()] );
        } catch ( IOException e ) {
            log.error( "Unable to read the jar files in the package: " + e.getMessage() );
            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

                return UserInbox.toTable( ib.loadIncoming(),
                                          true );
            }
        } catch ( Exception e ) {
            log.error( "Unable to load Inbox: " + e.getMessage() );
            throw new DetailedSerializableException( "Unable to load Inbox",
                                                     e.getMessage() );
        }
    }
View Full Code Here

                                      int skip,
                                      int numRows,
                                      String tableConfig) throws SerializableException {
        log.debug( "Loading asset list for [" + uuid + "]" );
        if ( numRows == 0 ) {
            throw new DetailedSerializableException( "Unable to return zero results (bug)",
                                                     "probably have the parameters around the wrong way, sigh..." );
        }
        long start = System.currentTimeMillis();
        PackageItem pkg = repository.loadPackageByUUID( uuid );
        AssetItemIterator it;
View Full Code Here

    public TableDataResult queryFullText(String text,
                                         boolean seekArchived,
                                         int skip,
                                         int numRows) throws SerializableException {
        if ( numRows == 0 ) {
            throw new DetailedSerializableException( "Unable to return zero results (bug)",
                                                     "probably have the parameters around the wrong way, sigh..." );
        }
        AssetItemIterator it = repository.queryFullText( text,
                                                         seekArchived );
View Full Code Here

                                         Date modifiedBefore,
                                         boolean seekArchived,
                                         int skip,
                                         int numRows) throws SerializableException {
        if ( numRows == 0 ) {
            throw new DetailedSerializableException( "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 DetailedSerializableException( "Unable to remove status. It is probably still used (even by archived items).",
                                                     e.getMessage() );
        }
    }
View Full Code Here

        try {
            repository.loadCategory( categoryPath ).remove();
            repository.save();
        } catch ( RulesRepositoryException e ) {
            throw new DetailedSerializableException( "Unable to remove category. It is probably still used (even by archived items).",
                                                     e.getMessage() );
        }
    }
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.