Example usage for javax.resource.spi InvalidPropertyException InvalidPropertyException

List of usage examples for javax.resource.spi InvalidPropertyException InvalidPropertyException

Introduction

In this page you can find the example usage for javax.resource.spi InvalidPropertyException InvalidPropertyException.

Prototype

public InvalidPropertyException(Throwable cause) 

Source Link

Document

Constructs a new throwable with the specified cause.

Usage

From source file:org.teiid.resource.adapter.ftp.FtpFileConnectionImpl.java

public FtpFileConnectionImpl(FTPClient client, String pathname, Map<String, String> fileMapping)
        throws ResourceException {
    this.client = client;
    if (fileMapping == null) {
        this.fileMapping = Collections.emptyMap();
    } else {// w w w . j a v a2 s . c  o  m
        this.fileMapping = fileMapping;
    }

    try {
        if (this.client.cwd(pathname) != 250) {
            throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
        }
        this.client.changeWorkingDirectory(pathname);
        this.mountPoint = VFS.getChild(pathname);
        this.closeable = VFS.mount(mountPoint, new FtpFileSystem(this.client));
    } catch (IOException e) {
        throw new ResourceException(UTIL.getString("vfs_mount_error", pathname), e); //$NON-NLS-1$
    }

}