Package org.owasp.dependencycheck.data.update.exception

Examples of org.owasp.dependencycheck.data.update.exception.UpdateException


                } catch (InterruptedException ex) {
                    downloadExecutors.shutdownNow();
                    processExecutor.shutdownNow();

                    LOGGER.log(Level.FINE, "Thread was interrupted during download", ex);
                    throw new UpdateException("The download was interrupted", ex);
                } catch (ExecutionException ex) {
                    downloadExecutors.shutdownNow();
                    processExecutor.shutdownNow();

                    LOGGER.log(Level.FINE, "Thread was interrupted during download execution", ex);
                    throw new UpdateException("The execution of the download was interrupted", ex);
                }
                if (task == null) {
                    downloadExecutors.shutdownNow();
                    processExecutor.shutdownNow();
                    LOGGER.log(Level.FINE, "Thread was interrupted during download");
                    throw new UpdateException("The download was interrupted; unable to complete the update");
                } else {
                    processFutures.add(task);
                }
            }

            for (Future<ProcessTask> future : processFutures) {
                try {
                    final ProcessTask task = future.get();
                    if (task.getException() != null) {
                        throw task.getException();
                    }
                } catch (InterruptedException ex) {
                    processExecutor.shutdownNow();
                    LOGGER.log(Level.FINE, "Thread was interrupted during processing", ex);
                    throw new UpdateException(ex);
                } catch (ExecutionException ex) {
                    processExecutor.shutdownNow();
                    LOGGER.log(Level.FINE, "Execution Exception during process", ex);
                    throw new UpdateException(ex);
                } finally {
                    processExecutor.shutdown();
                }
            }
View Full Code Here


            cveDB = new CveDB();
            cveDB.open();
        } catch (DatabaseException ex) {
            closeDataStores();
            LOGGER.log(Level.FINE, "Database Exception opening databases", ex);
            throw new UpdateException("Error updating the CPE/CVE data, please see the log file for more details.");
        }
    }
View Full Code Here

        try {
            file1 = File.createTempFile("cve" + nvdCveInfo.getId() + "_", ".xml", Settings.getTempDirectory());
            file2 = File.createTempFile("cve_1_2_" + nvdCveInfo.getId() + "_", ".xml", Settings.getTempDirectory());
        } catch (IOException ex) {
            throw new UpdateException("Unable to create temporary files", ex);
        }
        this.first = file1;
        this.second = file2;

    }
View Full Code Here

        try {
            importXML(filePair.getFirst(), filePair.getSecond());
            cveDB.commit();
            properties.save(filePair.getNvdCveInfo());
        } catch (FileNotFoundException ex) {
            throw new UpdateException(ex);
        } catch (ParserConfigurationException ex) {
            throw new UpdateException(ex);
        } catch (SAXException ex) {
            throw new UpdateException(ex);
        } catch (IOException ex) {
            throw new UpdateException(ex);
        } catch (SQLException ex) {
            throw new UpdateException(ex);
        } catch (DatabaseException ex) {
            throw new UpdateException(ex);
        } catch (ClassNotFoundException ex) {
            throw new UpdateException(ex);
        } finally {
            filePair.cleanup();
        }
        msg = String.format("Processing Complete for NVD CVE - %s", filePair.getNvdCveInfo().getId());
        LOGGER.log(Level.INFO, msg);
View Full Code Here

TOP

Related Classes of org.owasp.dependencycheck.data.update.exception.UpdateException

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.