Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
matiasdesousa
Contributor
Contributor

Upload zip file

Hi everyone!

 

I have been trying to upload a 44 MB zip file using tFileFetch, tRest and tHttpRequest but untill now no success.

 

Here is my settings for tFileFetch:

 

0683p000009M5Wx.png0683p000009M5X7.png

 

It's throwing the following error:

java.io.FileNotFoundException:File is not a normal file.
Labels (4)
8 Replies
Anonymous
Not applicable

Hello,

 

Try once by setting the filename in a tJava before the tFileFetch as : String fileName = <Your FileName context>, then, in tJava only context.setProperty("FILE_NAME",fileName);

 

use the fileName context in tFileFetch : context.getProperty("FILE_NAME").

 

Thanks,

Subhadip

matiasdesousa
Contributor
Contributor
Author

Now it's throwing the error:

java.lang.NullPointerException:null
nfz11
Creator III
Creator III

You can try globalMap.put and globalMap.get instead of context.setProperty and context.getProperty.  Also, your schema values are not passed through the tJava* components so they will come out null the other end.

matiasdesousa
Contributor
Contributor
Author

@nfz11 i'm new in talend. Can you explain what you mean by "your schema values are not passed through the tJava* components so they will come out null the other end"?

 

Also when i use globalMap it throws the error: "The constructor File(Object) is undefined"

nfz11
Creator III
Creator III

Can you show a screen shot of your code where the you are setting the File(Object)?

 

I mean that if you put a tJava* component in your flow, it does not persist the values in schema to the other side, unlike say, a tLogRow.

 

[id=1,name=John] -> tJava* -> [id=null,name=null]
[id=1,name=John] -> tLogRow -> [id=1,name=John]
matiasdesousa
Contributor
Contributor
Author

I'm not setting any file object. I only set the file name in the tjava. Shouldn't talend create the file object itself when i check the upload file checkbox?

Also how can persist the values in schema to the other side?

 

0683p000009M5ZN.png0683p000009M5Tv.png

Anonymous
Not applicable

Hello,

 

globalMap.get() returns an object.

 

Please cast to string like (String)globalMap.get("FILE_NAME")

 

Thanks,

Subhadip

matiasdesousa
Contributor
Contributor
Author

@subhadip13 thanks for replying.

I try to post the file to server using postman and it works fine. Here are my postman settings:

0683p000009M5yn.png

In talend it's throwing the following error:

java.net.SocketException:Connection reset by peer: socket write error

What can be causing this?

PS: the file size is 44MB.