Examples of TaskExecutionException


Examples of br.com.caelum.vraptor.tasks.jobs.TaskExecutionException

    try {
      URL url = new URL(urlString(context));
      task.setup(url, context.getMergedJobDataMap());
      task.execute();
    } catch (Exception e) {
      throw new TaskExecutionException(e);
    }
  }
View Full Code Here

Examples of io.crate.exceptions.TaskExecutionException

            createTable();
        }

        @Override
        public void onFailure(Throwable e) {
            throw new TaskExecutionException(CreateTableTask.this, e);
        }
View Full Code Here

Examples of org.apache.archiva.redback.components.taskqueue.execution.TaskExecutionException

            this.task = task;

            String repoId = task.getRepositoryId();
            if ( StringUtils.isBlank( repoId ) )
            {
                throw new TaskExecutionException( "Unable to execute RepositoryTask with blank repository Id." );
            }

            ManagedRepository arepo = managedRepositoryAdmin.getManagedRepository( repoId );

            // execute consumers on resource file if set
            if ( task.getResourceFile() != null )
            {
                log.debug( "Executing task from queue with job name: {}", task );
                consumers.executeConsumers( arepo, task.getResourceFile(), task.isUpdateRelatedArtifacts() );
            }
            else
            {
                log.info( "Executing task from queue with job name: {}", task );

                // otherwise, execute consumers on whole repository
                if ( arepo == null )
                {
                    throw new TaskExecutionException(
                        "Unable to execute RepositoryTask with invalid repository id: " + repoId );
                }

                long sinceWhen = RepositoryScanner.FRESH_SCAN;
                long previousFileCount = 0;

                RepositorySession repositorySession = repositorySessionFactory.createSession();
                MetadataRepository metadataRepository = repositorySession.getRepository();
                try
                {
                    if ( !task.isScanAll() )
                    {
                        RepositoryStatistics previousStats =
                            repositoryStatisticsManager.getLastStatistics( metadataRepository, repoId );
                        if ( previousStats != null )
                        {
                            sinceWhen = previousStats.getScanStartTime().getTime();
                            previousFileCount = previousStats.getTotalFileCount();
                        }
                    }

                    RepositoryScanStatistics stats;
                    try
                    {
                        stats = repoScanner.scan( arepo, sinceWhen );
                    }
                    catch ( RepositoryScannerException e )
                    {
                        throw new TaskExecutionException( "Repository error when executing repository job.", e );
                    }

                    log.info( "Finished first scan: {}", stats.toDump( arepo ) );

                    // further statistics will be populated by the following method
                    Date endTime = new Date( stats.getWhenGathered().getTime() + stats.getDuration() );

                    log.info( "Gathering repository statistics" );

                    repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, repoId,
                                                                        stats.getWhenGathered(), endTime,
                                                                        stats.getTotalFileCount(),
                                                                        stats.getTotalFileCount() - previousFileCount );
                    repositorySession.save();
                }
                catch ( MetadataRepositoryException e )
                {
                    throw new TaskExecutionException( "Unable to store updated statistics: " + e.getMessage(), e );
                }
                finally
                {
                    repositorySession.close();
                }

//                log.info( "Scanning for removed repository content" );

//                metadataRepository.findAllProjects();
                // FIXME: do something

                log.info( "Finished repository task: {}", task );

                this.task = null;
            }
        }
        catch ( RepositoryAdminException e )
        {
            log.error( e.getMessage(), e );
            throw new TaskExecutionException( e.getMessage(), e );
        }
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.TaskExecutionException

        forwardMapObj[1] = r.getValue();
        forward(forwardMapObj);
      }
      break;
    default:
      throw new TaskExecutionException("explode() can only operate on an array or a map");
    }
  }
View Full Code Here

Examples of org.apache.pivot.util.concurrent.TaskExecutionException

                        ((List<Artist>) artistResultsTableView.getTableData()).add(artist);
                    }
                    return null;
                } catch (Throwable t) {
                    t.printStackTrace();
                    throw new TaskExecutionException(t);
                }
            }
        });
        executeAndCleanupSearch(name, "artist");
    }
View Full Code Here

Examples of org.apache.pivot.util.concurrent.TaskExecutionException

                        ((List<Release>) releaseResultsTableView.getTableData()).add(release);
                    }
                    return null;
                } catch (Throwable t) {
                    t.printStackTrace();
                    throw new TaskExecutionException(t);
                }
            }
        });
        executeAndCleanupSearch(name, "release");
    }
View Full Code Here

Examples of org.apache.pivot.util.concurrent.TaskExecutionException

                        ((List<Work>) workResultsTableView.getTableData()).add(work);
                    }
                    return null;
                } catch (Throwable t) {
                    t.printStackTrace();
                    throw new TaskExecutionException(t);
                }
            }
        });
        executeAndCleanupSearch(name, "work");
    }
View Full Code Here

Examples of org.apache.pivot.util.concurrent.TaskExecutionException

                                importButton.setEnabled(false);
                            }
                            try {
                                Thread.sleep(1000);
                            } catch (InterruptedException e) {
                                throw new TaskExecutionException(e);
                            }
                            status = Client.create(config).resource(HOSTURL + "/mediaimportmodules/" + selectedImporterButton.getSelectedItem().toString()).accept(MediaType.APPLICATION_JSON).get(MediaImportStatus.class);
                        }
                        if(status != null && status.getStatus()==MediaImportStatus.Status.Failed) {
                            if (status.getTotalNumber() > 0) {
View Full Code Here

Examples of org.apache.pivot.util.concurrent.TaskExecutionException

                            }
                        }
                        return null;
                    } catch (Throwable t) {
                        t.printStackTrace();
                        throw new TaskExecutionException(t);
                    }
                }
            };
            return task;
        }
View Full Code Here

Examples of org.codehaus.plexus.taskqueue.execution.TaskExecutionException

            endTime = System.currentTimeMillis();
        }
        catch ( MalformedURLException e )
        {
            log.error( "Invalid URL " + buildAgentUrl + ", not building" );
            throw new TaskExecutionException( "Invalid URL " + buildAgentUrl, e );
        }
        catch ( Exception e )
        {
            log.error( "Error occurred while building task", e );
            endTime = System.currentTimeMillis();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.