[jira] [Commented] (NET-607) Apache FTPS Client 3.3 storeFile to windows FTPS server from Unix/Linux/Max issue

2017-01-02 Thread Barak Kedem (JIRA)

[ 
https://issues.apache.org/jira/browse/NET-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15794190#comment-15794190
 ] 

Barak Kedem commented on NET-607:
-



Took me some time to find it, and the reason for that 
Windows nt server not dosnt support  block transfer mode


String res = client.getSystemType();
if (res.equals(WINDOWS_NT_SYTEM_TYPE)) {
client.setFileTransferMode(FTP.STREAM_TRANSFER_MODE);
} else {
client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
}

> Apache FTPS Client 3.3 storeFile to windows FTPS server from Unix/Linux/Max 
> issue
> -
>
> Key: NET-607
> URL: https://issues.apache.org/jira/browse/NET-607
> Project: Commons Net
>  Issue Type: Bug
>Reporter: Barak Kedem
>Priority: Minor
>
> i have an issue transferring files to Windows FTP server from Unix/Mac/Linux 
> env.
> while the exact same java code works from windows pc. from *Nix/Mac the 
> transfer only worked with this commands on the ftp session
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}
> while on my windows machine i didnt need them - i assume it relates to system 
> variable.
> This is my java code
> {code}
> protected FTPClient getClient(DeliveryDetails details) {
> return new FTPSClient(false); // the connection is Explicit
> }
> public void setClient(FTPClient client, DeliveryDetails details) throws 
> Exception {
> client.setConnectTimeout(1);
> client.setDefaultTimeout(1000 * 60 * 2);
> client.setControlKeepAliveTimeout(300);
> client.setDataTimeout(15000);
> client.connect(ftpDetails.host, ftpDetails.port);
> client.setBufferSize(1024 * 1024);
> client.login(ftpDetails.username, ftpDetails.getSensitiveData());
> client.setControlEncoding("UTF-8");
> client.setFileType(FTP.BINARY_FILE_TYPE);
> client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
> FTPSClient ftpsClient = (FTPSClient) client;
> ftpsClient.execPBSZ(0);
> ftpsClient.execPROT("P");
> // both with it and without it didnt work 
> ftpsClient.setWantClientAuth(false);
> }
> public void saveToServer(FTPClient client, File fileName, InputStream stream){
> BufferedInputStream bis = new BufferedInputStream(stream);
> boolean isSaved = client.storeFile(filename, bis);
> client.logout();
> }
> {code}
> ‌What is equivalent of this parameters in the FTPS Apache class ?
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (NET-607) Apache FTPS Client 3.3 storeFile to windows FTPS server from Unix/Linux/Max issue

2017-01-01 Thread Barak Kedem (JIRA)

 [ 
https://issues.apache.org/jira/browse/NET-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Barak Kedem updated NET-607:

Summary: Apache FTPS Client 3.3 storeFile to windows FTPS server from 
Unix/Linux/Max issue  (was: Apache FTPS Client storeFile to windows FTPS server 
from Unix/Linux/Max issue)

> Apache FTPS Client 3.3 storeFile to windows FTPS server from Unix/Linux/Max 
> issue
> -
>
> Key: NET-607
> URL: https://issues.apache.org/jira/browse/NET-607
> Project: Commons Net
>  Issue Type: Bug
>Reporter: Barak Kedem
>Priority: Critical
>
> i have an issue transferring files to Windows FTP server from Unix/Mac/Linux 
> env.
> while the exact same java code works from windows pc. from *Nix/Mac the 
> transfer only worked with this commands on the ftp session
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}
> while on my windows machine i didnt need them - i assume it relates to system 
> variable.
> This is my java code
> {code}
> protected FTPClient getClient(DeliveryDetails details) {
> return new FTPSClient(false); // the connection is Explicit
> }
> public void setClient(FTPClient client, DeliveryDetails details) throws 
> Exception {
> client.setConnectTimeout(1);
> client.setDefaultTimeout(1000 * 60 * 2);
> client.setControlKeepAliveTimeout(300);
> client.setDataTimeout(15000);
> client.connect(ftpDetails.host, ftpDetails.port);
> client.setBufferSize(1024 * 1024);
> client.login(ftpDetails.username, ftpDetails.getSensitiveData());
> client.setControlEncoding("UTF-8");
> client.setFileType(FTP.BINARY_FILE_TYPE);
> client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
> FTPSClient ftpsClient = (FTPSClient) client;
> ftpsClient.execPBSZ(0);
> ftpsClient.execPROT("P");
> // both with it and without it didnt work 
> ftpsClient.setWantClientAuth(false);
> }
> public void saveToServer(FTPClient client, File fileName, InputStream stream){
> BufferedInputStream bis = new BufferedInputStream(stream);
> boolean isSaved = client.storeFile(filename, bis);
> client.logout();
> }
> {code}
> ‌What is equivalent of this parameters in the FTPS Apache class ?
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (NET-607) Apache FTPS Client storeFile to windows FTPS server from Unix/Linux/Max issue

2017-01-01 Thread Barak Kedem (JIRA)

 [ 
https://issues.apache.org/jira/browse/NET-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Barak Kedem updated NET-607:

Description: 
i have an issue transferring files to Windows FTP server from Unix/Mac/Linux 
env.

while the exact same java code works from windows pc. from *Nix/Mac the 
transfer only worked with this commands on the ftp session
{code}
set ftps:initial-prot 
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no
{code}
while on my windows machine i didnt need them - i assume it relates to system 
variable.

This is my java code
{code}
protected FTPClient getClient(DeliveryDetails details) {
return new FTPSClient(false); // the connection is Explicit
}

public void setClient(FTPClient client, DeliveryDetails details) throws 
Exception {
client.setConnectTimeout(1);
client.setDefaultTimeout(1000 * 60 * 2);
client.setControlKeepAliveTimeout(300);
client.setDataTimeout(15000);
client.connect(ftpDetails.host, ftpDetails.port);
client.setBufferSize(1024 * 1024);
client.login(ftpDetails.username, ftpDetails.getSensitiveData());
client.setControlEncoding("UTF-8");
client.setFileType(FTP.BINARY_FILE_TYPE);
client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
FTPSClient ftpsClient = (FTPSClient) client;
ftpsClient.execPBSZ(0);
ftpsClient.execPROT("P");
// both with it and without it didnt work 
ftpsClient.setWantClientAuth(false);
}

public void saveToServer(FTPClient client, File fileName, InputStream stream){
BufferedInputStream bis = new BufferedInputStream(stream);
boolean isSaved = client.storeFile(filename, bis);
client.logout();
}
{code}
‌What is equivalent of this parameters in the FTPS Apache class ?
{code}
set ftps:initial-prot 
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no
{code}

  was:
i have an issue transferring files to Windows FTP server from Unix/Mac/Linux 
env.

while the exact same java code works from windows pc. from *Nix/Mac the 
transfer only worked with this commands on the ftp session

set ftps:initial-prot 
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no
while on my windows machine i didnt need them - i assume it relates to system 
variable.

This is my java code

protected FTPClient getClient(DeliveryDetails details) {
return new FTPSClient(false); // the connection is Explicit
}

public void setClient(FTPClient client, DeliveryDetails details) throws 
Exception {
client.setConnectTimeout(1);
client.setDefaultTimeout(1000 * 60 * 2);
client.setControlKeepAliveTimeout(300);
client.setDataTimeout(15000);
client.connect(ftpDetails.host, ftpDetails.port);
client.setBufferSize(1024 * 1024);
client.login(ftpDetails.username, ftpDetails.getSensitiveData());
client.setControlEncoding("UTF-8");
client.setFileType(FTP.BINARY_FILE_TYPE);
client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
FTPSClient ftpsClient = (FTPSClient) client;
ftpsClient.execPBSZ(0);
ftpsClient.execPROT("P");
// both with it and without it didnt work 
ftpsClient.setWantClientAuth(false);
}

public void saveToServer(FTPClient client, File fileName, InputStream stream){
BufferedInputStream bis = new BufferedInputStream(stream);
boolean isSaved = client.storeFile(filename, bis);
client.logout();
}
‌What is equivalent of this parameters in the FTPS Apache class ?

set ftps:initial-prot 
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no



> Apache FTPS Client storeFile to windows FTPS server from Unix/Linux/Max issue
> -
>
> Key: NET-607
> URL: https://issues.apache.org/jira/browse/NET-607
> Project: Commons Net
>  Issue Type: Bug
>Reporter: Barak Kedem
>Priority: Critical
>
> i have an issue transferring files to Windows FTP server from Unix/Mac/Linux 
> env.
> while the exact same java code works from windows pc. from *Nix/Mac the 
> transfer only worked with this commands on the ftp session
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}
> while on my windows machine i didnt need them - i assume it relates to system 
> variable.
> This is my java code
> {code}
> protected FTPClient getClient(DeliveryDetails details) {
> return new FTPSClient(false); // the connection is Explicit
> }
> public void setClient(FTPClient client, DeliveryDetails details) throws 
> Exception {
> client.setConnectTimeout(1);
> client.setDefaultTimeout(1000 * 60 * 2);
> client.setControlKeepAliveTimeout(300);
> client.setDataTimeout(15000);
> client.connect(ftpDetails.host, ftpDetails.port);
> client.setBufferSize(1024 * 1024)

[jira] [Created] (NET-607) Apache FTPS Client storeFile to windows FTPS server from Unix/Linux/Max issue

2017-01-01 Thread Barak Kedem (JIRA)
Barak Kedem created NET-607:
---

 Summary: Apache FTPS Client storeFile to windows FTPS server from 
Unix/Linux/Max issue
 Key: NET-607
 URL: https://issues.apache.org/jira/browse/NET-607
 Project: Commons Net
  Issue Type: Bug
Reporter: Barak Kedem
Priority: Critical


i have an issue transferring files to Windows FTP server from Unix/Mac/Linux 
env.

while the exact same java code works from windows pc. from *Nix/Mac the 
transfer only worked with this commands on the ftp session

set ftps:initial-prot 
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no
while on my windows machine i didnt need them - i assume it relates to system 
variable.

This is my java code

protected FTPClient getClient(DeliveryDetails details) {
return new FTPSClient(false); // the connection is Explicit
}

public void setClient(FTPClient client, DeliveryDetails details) throws 
Exception {
client.setConnectTimeout(1);
client.setDefaultTimeout(1000 * 60 * 2);
client.setControlKeepAliveTimeout(300);
client.setDataTimeout(15000);
client.connect(ftpDetails.host, ftpDetails.port);
client.setBufferSize(1024 * 1024);
client.login(ftpDetails.username, ftpDetails.getSensitiveData());
client.setControlEncoding("UTF-8");
client.setFileType(FTP.BINARY_FILE_TYPE);
client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
FTPSClient ftpsClient = (FTPSClient) client;
ftpsClient.execPBSZ(0);
ftpsClient.execPROT("P");
// both with it and without it didnt work 
ftpsClient.setWantClientAuth(false);
}

public void saveToServer(FTPClient client, File fileName, InputStream stream){
BufferedInputStream bis = new BufferedInputStream(stream);
boolean isSaved = client.storeFile(filename, bis);
client.logout();
}
‌What is equivalent of this parameters in the FTPS Apache class ?

set ftps:initial-prot 
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (VFS-424) VFS 2.0 class loading breaks in OSGi, regression from 1.0

2016-08-11 Thread Barak Kedem (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417073#comment-15417073
 ] 

Barak Kedem commented on VFS-424:
-

[~b.eckenfels]
I am facing the same error even on version 2.1 

org.apache.commons.vfs2.FileSystemException: Could not load VFS configuration 
from 
"jar:file:/C:/Users/User/.m2/repository/org/apache/commons/commons-vfs2/2.1/commons-vfs2-2.1.jar!/org/apache/commons/vfs2/impl/providers.xml".
java.util.concurrent.ExecutionException: 
org.apache.commons.vfs2.FileSystemException: Could not load VFS configuration 
from 
"jar:file:/C:/Users/User/.m2/repository/org/apache/commons/commons-vfs2/2.1/commons-vfs2-2.1.jar!/org/apache/commons/vfs2/impl/providers.xml".
 
at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
at java.util.concurrent.FutureTask.get(FutureTask.java:206) 


> VFS 2.0 class loading breaks in OSGi, regression from 1.0
> -
>
> Key: VFS-424
> URL: https://issues.apache.org/jira/browse/VFS-424
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
> Maven home: C:\Java\apache-maven-3.0.4\bin\..
> Java version: 1.6.0_31, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_31\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>Reporter: Gary Gregory
>Assignee: Bernd Eckenfels
> Fix For: 2.1
>
>
> Class loading changed between version 1.0 and 2.0 in 
> org.apache.commons.vfs2.impl.StandardFileSystemManager.init()
> This breaks our app server running under OSGi (Equinox) like this:
> {noformat}
> org.apache.commons.vfs2.FileSystemException: Could not create a file system 
> manager of class "org.apache.commons.vfs2.impl.StandardFileSystemManager".
> at org.apache.commons.vfs2.VFS.createManager(VFS.java:99)
> at org.apache.commons.vfs2.VFS.getManager(VFS.java:50)
> at 
> com.seagullsw.toolbox.config.ConfigurationDirectory.resolveFileObject(ConfigurationDirectory.java:315)
> at 
> com.seagullsw.toolbox.config.Configuration.resolveFileObject(Configuration.java:135)
> 
> at 
> com.seagullsw.appinterface.server.osgi.JCicsOsgiTestCase.testJcicsOsgiRoundtrip(JCicsOsgiTestCase.java:226)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:307)
> at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
> at 
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:94)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:294)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:112)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:73)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282)
> at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
> at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:207)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
> at 
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
> at 
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
> at 
> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:118)
> at 
> org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:102)
> at 
> o