Package org.rhq.enterprise.server.plugin.pc.content

Examples of org.rhq.enterprise.server.plugin.pc.content.SyncException


                tracker.setRepoSyncResults(repoManager.mergeRepoSyncResults(tracker.getRepoSyncResults()));
            } catch (Exception e) {
                String errorMsg = "Failed to load package bits for package version [" + pk.getPackageVersion()
                    + "] from content source [" + pk.getContentSource() + "] at location [" + item.getLocation() + "]."
                    + "No more packages will be downloaded for this content source.";
                throw new SyncException(errorMsg, e);
            }
        }

        log.info("All package bits for content source [" + source.getName() + "] have been downloaded."
            + "The downloads started at [" + new Date(start) + "] and ended at [" + new Date() + "]");
View Full Code Here


            Map<String, RemotePackageInfo> locationList = getRemotePackageInfosFromIndex();
            for (RemotePackageInfo rpi : locationList.values()) {
                syncPackage(report, deletedPackages, rpi);
            }
        } catch (Exception e) {
            throw new SyncException("error synching packages", e);
        }

        long elapsed = System.currentTimeMillis() - before;

        // if there are packages that weren't found on the remote system, tell server to remove them from inventory
View Full Code Here

        ContentFileInfo fileInfo = ContentFileInfoFactory.createContentFileInfo(file);
        String sha256;
        try {
            sha256 = new MessageDigestGenerator(MessageDigestGenerator.SHA_256).calcDigestString(file);
        } catch (IOException e) {
            throw new SyncException("Error digesting file", e);
        }
        String name = file.getName();
        String version = "[sha256=" + sha256 + "]";
        String displayVersion = fileInfo.getVersion(null);
        String packageTypeName = supportedPackageType.packageTypeName;
View Full Code Here

                report.addDeletePackage(p);
                summary.deleted++;
            }
        } catch (Exception e) {
            summary.errors.add(e.toString());
            throw new SyncException("error synching synchronizePackages", e);
        } finally {
            repo.disconnect();
            summary.markEnded();
            report.setSummary(summary.toString());
            log.info("synchronizing with repository: " + reader + " finished\n" + summary);
View Full Code Here

        RssDocument rssDocument;
        try {
            rssDocument = retrieveRssDocument();
        } catch (Exception e) {
            throw new SyncException("Error retrieving RSS document.", e);
        }

        if (rssDocument == null) {
            throw new SyncException("Null RSS document received from adapter: " + this);
        }

        try {
            parser.parseResults(rssDocument, report, existingPackages);
        } catch (Exception e) {
            throw new SyncException("Error parsing RSS document.", e);
        }
    }
View Full Code Here

                    + "]. You may need to update your feed URL if redirect is permanent.");
                status = client.executeMethod(method);
            }

            if (status == 404) {
                throw new SyncException("Could not find the feed at URL [" + url
                    + "]. Make sure the URL field correctly refers to the CSP feed location.");
            }

            if (status == 401 || status == 403) {
                throw new SyncException("Invalid login credentials specified for user [" + username + "]. Make sure "
                    + "this user has an active account at the CSP and that the password is correct.");
            }

            if (status != 200) {
                throw new SyncException("The call to retrieve the RSS feed failed with status code: " + status);
            }

            rawFeed = method.getResponseBodyAsString();
        } finally {
            method.releaseConnection();
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.plugin.pc.content.SyncException

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.