Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
It's throwing the following error:
java.io.FileNotFoundException:File is not a normal file.
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
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.
@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"
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]
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?
Hello,
globalMap.get() returns an object.
Please cast to string like (String)globalMap.get("FILE_NAME")
Thanks,
Subhadip
@subhadip13 thanks for replying.
I try to post the file to server using postman and it works fine. Here are my postman settings:
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.