Examples of ArchiveException


Examples of com.alibaba.otter.node.etl.common.pipe.impl.http.archive.ArchiveException

        String ip = node.getIp();
        if (pipeline.getParameters().getUseExternalIp()) {
            ip = node.getParameters().getExternalIp();

            if (StringUtils.isEmpty(ip)) {
                throw new ArchiveException(String.format("pipelineId:%s useExternalIp by nid[%s] has no external ip",
                                                         String.valueOf(pipelineId), String.valueOf(node.getId())));
            }
        }

        Integer port = node.getParameters().getDownloadPort();// 注意为其下载端口
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.pipe.impl.http.archive.ArchiveException

        String ip = node.getIp();
        if (node.getParameters().getUseExternalIp() || pipeline.getParameters().getUseExternalIp()) {
            ip = node.getParameters().getExternalIp();

            if (StringUtils.isEmpty(ip)) {
                throw new ArchiveException(String.format("pipelineId:%s useExternalIp by nid[%s] has no external ip",
                    String.valueOf(pipelineId),
                    String.valueOf(node.getId())));
            }
        }
View Full Code Here

Examples of com.stimulus.archiva.exception.ArchiveException

              int maxSizeInMB = Config.getConfig().getMaxMessageSize();
              in = new SMTPInputStream(isr,maxSizeInMB);
            } catch (SMTPEndStreamException smtpse) {
              return;
            } catch (IOException io) {
              throw new ArchiveException(io.getMessage(), io, logger, ArchiveException.RecoveryDirective.RETRYLATER);
            }
            callback.store(in,socket.getInetAddress().getHostAddress());
         
          } catch ( ArchiveException se ) {
            error = true;
View Full Code Here

Examples of com.stimulus.archiva.exception.ArchiveException

  public static void storeMessage(Principal principal, InputStream compressedStream, MessageState compressed) throws ArchiveException
  {
   
     
            if (compressedStream == null)
                throw new ArchiveException("assertion failure: null message,username or remoteIP",logger,ArchiveException.RecoveryDirective.RETRYLATER);
 
            logger.debug("message received for archival (via smtp service) {"+principal+"'}");
 
            Config config = ConfigurationService.getConfig();
           
   
            /*
          try {
            File faultyFile = new File("c:\\temp.tmp");
            FileOutputStream fos = new FileOutputStream(faultyFile);
            byte[] buf = new byte[1024];
            int numRead = 0;
            while ((numRead = compressedStream.read(buf)) >= 0) {
            fos.write(buf, 0, numRead);
            }
            fos.close();
          } catch (Exception e) {
            logger.error(e);
            return;
          } 
          return;*/
         
            Email message =  null;
           
            try {
             
              if (compressed==MessageState.COMPRESSED)
                message = new Email(null,new GZIPInputStream(compressedStream));
              else
                message = new Email(null,compressedStream);
            } catch (Exception io) {
              if (io.getCause() instanceof MaxMessageSizeException) {
                logger.error("cannot process message. max message size is exceeded.",io.getCause());
                throw new ArchiveException("cannot process message. max message size is exceeded.",(MaxMessageSizeException)io.getCause(),logger,ArchiveException.RecoveryDirective.REJECT);
              }
                logger.error("archive message is corrupted. unable to parse it.",io);
               try {
                messageStore.copyEmailToNoArchiveQueue(message);
            } catch (Exception e2) {
              throw new ArchiveException("failed to copy message to the no archive queue.",e2,logger,ArchiveException.RecoveryDirective.RETRYLATER);
            }
            }
           
            if (!config.isDefaultPassPhraseModified()) {
              try {
                messageStore.copyEmailToNoArchiveQueue(message);
            } catch (Exception e2) {
              throw new ArchiveException("failed to copy message to the no archive queue.",e2,logger,ArchiveException.RecoveryDirective.RETRYLATER);
            }
            logger.error("failed to archive message. encryption password is not set.");
            }
           
           
            if (config.getArchiveRules().shouldArchive(message,ConfigurationService.getConfig().getDomains())==ArchiveRules.Action.ARCHIVE) {
             
              try {
                archive(principal,message,false);
              } catch (Exception e) {
                logger.error("error occurred while archiving message. message will be reprocessed on server restart",e);
                try {
                  messageStore.copyEmailToNoArchiveQueue(message);
              } catch (Exception e2) {
                throw new ArchiveException("failed to copy message to the no archive queue.",e2,logger,ArchiveException.RecoveryDirective.RETRYLATER);
              }
              }
          
            } else {
              audit.info("skip email {"+message+", "+principal+"}");
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveException

            // skip past CLRI and BITS segments since we don't handle them yet.
            readCLRI();
            readBITS();
        } catch (IOException ex) {
            throw new ArchiveException(ex.getMessage(), ex);
        }

        // put in a dummy record for the root node.
        Dirent root = new Dirent(2, 2, 4, ".");
        names.put(Integer.valueOf(2), root);
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveException

        in = new DataInputStream(inputStream);
        this.charsetName = charsetName;
        try {
            mainHeader = readMainHeader();
            if ((mainHeader.arjFlags & MainHeader.Flags.GARBLED) != 0) {
                throw new ArchiveException("Encrypted ARJ files are unsupported");
            }
            if ((mainHeader.arjFlags & MainHeader.Flags.VOLUME) != 0) {
                throw new ArchiveException("Multi-volume ARJ files are unsupported");
            }
        } catch (IOException ioException) {
            throw new ArchiveException(ioException.getMessage(), ioException);
        }
    }
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveException

            // skip past CLRI and BITS segments since we don't handle them yet.
            readCLRI();
            readBITS();
        } catch (IOException ex) {
            throw new ArchiveException(ex.getMessage(), ex);
        }

        // put in a dummy record for the root node.
        Dirent root = new Dirent(2, 2, 4, ".");
        names.put(Integer.valueOf(2), root);
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveException

        in = new DataInputStream(inputStream);
        this.charsetName = charsetName;
        try {
            mainHeader = readMainHeader();
            if ((mainHeader.arjFlags & MainHeader.Flags.GARBLED) != 0) {
                throw new ArchiveException("Encrypted ARJ files are unsupported");
            }
            if ((mainHeader.arjFlags & MainHeader.Flags.VOLUME) != 0) {
                throw new ArchiveException("Multi-volume ARJ files are unsupported");
            }
        } catch (IOException ioException) {
            throw new ArchiveException(ioException.getMessage(), ioException);
        }
    }
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveException

            // skip past CLRI and BITS segments since we don't handle them yet.
            readCLRI();
            readBITS();
        } catch (IOException ex) {
            throw new ArchiveException(ex.getMessage(), ex);
        }

        // put in a dummy record for the root node.
        Dirent root = new Dirent(2, 2, 4, ".");
        names.put(Integer.valueOf(2), root);
View Full Code Here

Examples of org.apache.commons.compress.archivers.ArchiveException

            // skip past CLRI and BITS segments since we don't handle them yet.
            readCLRI();
            readBITS();
        } catch (IOException ex) {
            throw new ArchiveException(ex.getMessage(), ex);
        }

        // put in a dummy record for the root node.
        Dirent root = new Dirent(2, 2, 4, ".");
        names.put(2, root);
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.