Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
Cannot create FileTransferManager object

I am trying to implement file transfer in my project but cannot create FileTransferManager object it says:

FileTransferManager (org.jivesoftware.smack.Connection) in FileTransferManager cannot be applied to (org.jivesoftware.smack.tcp.XMPPTCPConnection)

Here is my code:

 FileTransferManager manager = new FileTransferManager(connection);
            // Where connection is an object of XMPPTCPConnection

Using Smack 4.2.0 and Openfire server

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

The problem could be the version of the smack jar. With a recent version, such as 3.2.1 it should work.

over 4 years ago · Santiago Trujillo Report

0

If we are talking about the class org.jivesoftware.smackx.filetransfer.FileTransferManager it has no public constructor however it has a static factory method:

public static synchronized FileTransferManager getInstanceFor(XMPPConnection connection)

so i would try the following:

FileTransferManager manager = FileTransferManager.getInstanceFor(connection);

Are you sure that you imported a right class? Because you shouldn't be able to call its constructor at all.

over 4 years ago · Santiago Trujillo Report

0

You may use getDefaultFileTransferManager to achieve it :

public static FileTransferManager getDefaultFileTransferManager(FileTransferAuth fileTransferAuth)
                                                     throws ClientException,
                                                            ServiceException

reference:official doc for Class FileTransferManager

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!