Examples of SyncException


Examples of org.apache.jackrabbit.oak.spi.security.authentication.external.SyncException

    private void syncUser(@Nonnull ExternalUser user) throws SyncException {
        SyncContext context = null;
        try {
            Root root = getRoot();
            if (root == null) {
                throw new SyncException("Cannot synchronize user. root == null");
            }
            UserManager userManager = getUserManager();
            if (userManager == null) {
                throw new SyncException("Cannot synchronize user. userManager == null");
            }
            DebugTimer timer = new DebugTimer();
            context = syncHandler.createContext(idp, userManager, root);
            context.sync(user);
            timer.mark("sync");
            root.commit();
            timer.mark("commit");
            if (log.isDebugEnabled()) {
                log.debug("syncUser({}) {}", user.getId(), timer.getString());
            }
        } catch (CommitFailedException e) {
            throw new SyncException("User synchronization failed during commit.", e);
        } finally {
            if (context != null) {
                context.close();
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authentication.external.SyncException

    private void validateUser(@Nonnull String id) throws SyncException {
        SyncContext context = null;
        try {
            Root root = getRoot();
            if (root == null) {
                throw new SyncException("Cannot synchronize user. root == null");
            }
            UserManager userManager = getUserManager();
            if (userManager == null) {
                throw new SyncException("Cannot synchronize user. userManager == null");
            }
            DebugTimer timer = new DebugTimer();
            context = syncHandler.createContext(idp, userManager, root);
            context.sync(id);
            timer.mark("sync");
            root.commit();
            timer.mark("commit");
            if (log.isDebugEnabled()) {
                log.debug("validateUser({}) {}", id, timer.getString());
            }
        } catch (CommitFailedException e) {
            throw new SyncException("User synchronization failed during commit.", e);
        } finally {
            if (context != null) {
                context.close();
            }
        }
View Full Code Here

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

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

            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

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

        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

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

                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

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

        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

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

                    + "]. 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

Examples of org.sdnplatform.sync.error.SyncException

        logger.warn("[{}->{}] {}",
                    new Object[]{getLocalNodeIdString(),
                                 getRemoteNodeIdString(),
                                 message});
        channel.write(getError(transactionId,
                               new SyncException(message), type));
    }
View Full Code Here

Examples of org.sdnplatform.sync.error.SyncException

                try {
                    Thread.sleep(1000);
                } catch (Exception e) {}
            }
            if (channel == null)
                throw new SyncRuntimeException(new SyncException("Failed to establish connection"));
        }
    }
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.