Package org.apache.ftpserver

Examples of org.apache.ftpserver.FtpServerConfigurationException


                            userDataProp.load(is);
                        } finally {
                            IoUtils.close(is);
                        }
                    } else {
                        throw new FtpServerConfigurationException(
                                "User data file specified but could not be located, "
                                        + "neither on the file system or in the classpath: "
                                        + userDataFile.getPath());
                    }
                }
            }
        } catch (IOException e) {
            throw new FtpServerConfigurationException(
                    "Error loading user data file : " + userDataFile, e);
        }
    }
View Full Code Here


                } finally {
                    IoUtils.close(is);
                }
            }
        } catch (IOException e) {
            throw new FtpServerConfigurationException(
                    "Error loading user data resource : " + userDataPath, e);
        }
    }
View Full Code Here

        }

        File dir = userDataFile.getAbsoluteFile().getParentFile();
        if (dir != null && !dir.exists() && !dir.mkdirs()) {
            String dirName = dir.getAbsolutePath();
            throw new FtpServerConfigurationException(
                    "Cannot create directory for user data file : " + dirName);
        }

        // save user data
        FileOutputStream fos = null;
View Full Code Here

            createConnection();

            LOG.info("Database connection opened.");
        } catch (SQLException ex) {
            LOG.error("Failed to open connection to user database", ex);
            throw new FtpServerConfigurationException(
                    "Failed to open connection to user database", ex);
        }
    }
View Full Code Here

                MessageResource mr = parseMessageResource(childElm,
                        parserContext, builder);
                factoryBuilder.addPropertyValue("messageResource", mr);

            } else {
                throw new FtpServerConfigurationException(
                        "Unknown configuration name: " + childName);
            }
        }

        // Configure login limits
View Full Code Here

                        listenerElm, builder.getBeanDefinition());
            } else if ("listener".equals(ln)) {
                listener = SpringUtil.parseSpringChildElement(listenerElm,
                        parserContext, builder);
            } else {
                throw new FtpServerConfigurationException(
                        "Unknown listener element " + ln);
            }

            String name = listenerElm.getAttribute("name");
View Full Code Here

     */
    public Listener createListener() {
      try{
        InetAddress.getByName(serverAddress);
      }catch(UnknownHostException e){
        throw new FtpServerConfigurationException("Unknown host",e);
      }
        return new NioListener(serverAddress, port, implicitSsl, ssl,
                dataConnectionConfig, idleTimeout, blockedAddresses,
                blockedSubnets);
    }
View Full Code Here

                con = createConnection();
               
                LOG.info("Database connection opened.");
        } catch (SQLException ex) {
                LOG.error("Failed to open connection to user database", ex);
                throw new FtpServerConfigurationException(
                "Failed to open connection to user database", ex);
        } finally{
                closeQuitely(con);
        }
    }
View Full Code Here

            createConnection();

            LOG.info("Database connection opened.");
        } catch (SQLException ex) {
            LOG.error("Failed to open connection to user database", ex);
            throw new FtpServerConfigurationException(
                    "Failed to open connection to user database", ex);
        }
    }
View Full Code Here

                } finally {
                    IoUtils.close(fis);
                }
            }
        } catch (IOException e) {
            throw new FtpServerConfigurationException(
                    "Error loading user data file : "
                            + userDataFile.getAbsolutePath(), e);
        }

        convertDeprecatedPropertyNames();
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.FtpServerConfigurationException

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.