it2be_ftp and headless client?

Questions and answers on developing, deploying and using plugins and JavaBeans

it2be_ftp and headless client?

Postby juan.cristobo » Mon Feb 09, 2015 12:34 pm

Hi all,

Hi, I'm using it2be_ftp plugin with headless client (creating a CronJob) to put files in a FTP Server.
- First, I create a tmp file using plugins.file.createTempFile()
- Then, I fill the file with data using plugins.file.writeTXTFile()
- Finally, I put the file in the FTP Server using ftp.put()

If I execute the method in smart or web client, it works ok, but the HC creates the temp file, fills it with data and creates the remote file in FTP server, but this file has no data.

I don't see any error in the log, and I can't debug the ftp.put() method, because it doesn't return anything. Any ideas?
Juan
Madrid (Spain)

Servoy 7.4.x - MySQL / SQL Server 2008-2016
Windows 10 Pro
juan.cristobo
 
Posts: 186
Joined: Thu Apr 19, 2012 9:12 am

Re: it2be_ftp and headless client?

Postby mboegem » Tue Feb 10, 2015 9:26 am

retry your code after you (re)started the servoy-service using a username/password instead of running it as local system user.
Most logical explanation is that the local system user doesn't have a tmp folder.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1750
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: it2be_ftp and headless client?

Postby juan.cristobo » Tue Feb 10, 2015 10:12 am

The service is running with a user/pwd, the tmp file is created succesfully with data (in application_server/server/work folder) and the remote fil (in FTP server) is created, too, but empty
Juan
Madrid (Spain)

Servoy 7.4.x - MySQL / SQL Server 2008-2016
Windows 10 Pro
juan.cristobo
 
Posts: 186
Joined: Thu Apr 19, 2012 9:12 am

Re: it2be_ftp and headless client?

Postby juan.cristobo » Wed Feb 11, 2015 10:38 am

Solved. In production server I have to establish active mode (ftp.connect(true), or ftp.enterLocalActiveMode = true), but not in developer (I don't know why). Unfortunately, ftp.put() doesn't return anything, so it's very difficult to know what was the problem.
Juan
Madrid (Spain)

Servoy 7.4.x - MySQL / SQL Server 2008-2016
Windows 10 Pro
juan.cristobo
 
Posts: 186
Joined: Thu Apr 19, 2012 9:12 am


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 15 guests

cron