Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.142
  HXTT Cobol 5.0.142
  HXTT DBF 7.1.143
  HXTT Excel 6.1.146
  HXTT Json 1.0.114
  HXTT Paradox 7.1.142
  HXTT PDF 2.0.142
  HXTT Text(CSV) 7.1.142
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word 1.1.142
  HXTT XML 4.0.143
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT Text(CSV)
FTP connection fails if passing username and password in properties object
Suraj Kudale
2019-10-12 07:04:58.0
I am facing issue while performing FTP connection with following code :


Class.forName("com.hxtt.sql.text.TextDriver").newInstance();
String url = "jdbc:csv:/ftp://www.hxtt.net/testdemo/sample?_CSV_Separator=,";

Properties prperties = new Properties();
prperties.put("user", "ftpdemo1");
prperties.put("password", "ftp12345");
String sql = "select * from Test";



Whereas If pass this username and password in URL it works perfectly fine.

I have tried above programm with following jars
Text_JDBC40
Text_JDBC42

But nothing works

Exception :


java.sql.SQLException: Failed to login ftp server www.hxtt.net:21
at com.caigen.global.ao.a(Unknown Source)
at com.hxtt.concurrent.e.a(Unknown Source)
at com.hxtt.concurrent.e.(Unknown Source)
at com.hxtt.concurrent.ak.aL(Unknown Source)
at com.hxtt.concurrent.ak.if(Unknown Source)
at com.hxtt.concurrent.bm.a(Unknown Source)
at com.hxtt.concurrent.ak.(Unknown Source)
at com.hxtt.concurrent.az.a(Unknown Source)
at com.hxtt.concurrent.a9.a(Unknown Source)
at com.hxtt.concurrent.ak.a(Unknown Source)
at com.hxtt.concurrent.av.hS(Unknown Source)
at com.hxtt.concurrent.i.hU(Unknown Source)
at com.hxtt.sql.b7.a(Unknown Source)
at com.hxtt.sql.text.f.(Unknown Source)
at com.hxtt.sql.text.EmbeddedDriver.connect(Unknown Source)
at com.hxtt.global.g.a(Unknown Source)
at com.hxtt.sql.HxttDriver.if(Unknown Source)


Could you please help ?


Re:FTP connection fails if passing username and password in properties object
HXTT Support
2019-10-12 17:07:08.0
I have replied "Maybe you haven't used the latest package."

According to your report, I have again tested JDBC4.0 package(Text_JDBC40.jar 1,663,901 bytes) and JDBC4.2 package(Text_JDBC42.jar 1,679,622 bytes).

No issue for your HXTTConnectionTest sample.
Re:FTP connection fails if passing username and password in properties object
HXTT Support
2019-10-12 17:08:08.0
BTW, remember
Connection con = DriverManager.getConnection( url,prperties );
or
Connection con = DriverManager.getConnection(url,"ftpdemo1","ftp12345");


Re:Re:Re:FTP connection fails if passing username and password in properties object
Suraj Kudale
2019-10-12 21:52:48.0
I have tries with latest package one by one but got same exception.

Also tried with Connection con = DriverManager.getConnection(url,"ftpdemo1","ftp12345"); this approach but same exception.
Re:Re:Re:Re:FTP connection fails if passing username and password in properties object
HXTT Support
2019-10-13 02:31:25.0
Try to isolate your issue, for instance,

d:\jdk1.8.0\jre\bin\java -classpath Text_JDBC40.jar;. test.jdbc.text.HXTTConnectionTest
Re:Re:Re:Re:Re:FTP connection fails if passing username and password in properties object
Suraj Kudale
2019-10-13 05:10:36.0
Hi I think driver is not supported with username and password approach in properties file.

Could you please look into this issue ? as everything works fine if we provide same things in URL

That means deferentially something is wrong with this getConnection(url,"ftpdemo1","ftp12345"); function.

Re:Re:Re:Re:Re:Re:FTP connection fails if passing username and password in properties object
HXTT Support
2019-10-13 05:32:21.0
Both of them can work:
Class.forName("com.hxtt.sql.text.TextDriver").newInstance();


String url = "jdbc:csv:/ftp://www.hxtt.net/testdemo/sample?_CSV_Separator=,";

//Connection getConnection(String url, String user, String password);
Properties prperties=new Properties();
prperties.put("user","ftpdemo1");
prperties.put("password","ftp12345");
String sql = "select * from Test";


Connection con = DriverManager.getConnection( url,prperties );

//Connection con = DriverManager.getConnection(url,"ftpdemo1","ftp12345");


You should check the date of your Text_JDBC40.jar because that feature was added after recevied your email.
Re:Re:Re:Re:Re:Re:Re:FTP connection fails if passing username and password in properties object
Suraj Kudale
2019-10-13 05:52:55.0
It's working. I was not using latest package. Sorry for all trouble.

Thanks for added support for username and password approach. You guys rocks.

Regards,
Suraj

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap