Hi All,
We are facing the errow : A null parameter has been passed as parameter 1 at function a!fileUploadField.
Is anyone aware what can be the possible scenario for this error?
Kindly advise.
Thanks and Regards,Diksha
Discussion posts and replies are publicly visible
Hi,
could you share the code? It would be helpful to understand the error
This is the code snippet. Strangely, this error is only faced by one of the users and others are able to upload files as expected.
a!fileUploadField(target: cons!FILE_UPLOAD_FOLDER,maxSelections: 1,filenames: fv!file.name &"_APN_"&loggedInUser(),value: local!fileUpload,saveInto: { local!fileUpload,a!save( ri!fileUpload, save!value),a!save( ri!fileName,save!value)},validations: {})
Is there a specific reason to store the value into three different rule inputs/locals?
Is this problem specific to that user in general, or a specific file this user wants to upload. In the latter case, please check whether that file has a size larger zero bytes.
Yes, we are using these rule inputs in a later stage of our process.
This problem is specific to that user only. She's getting this error on loading of the interface
Parameter 1 is the target folder. Please check whether this user has access to that folder.
The user has the access to the target folder.
Did you check the tomcat-stdout log file for any details?
yes, but it doesn't give much details except the above mentioned error
Caused by: java.lang.NullPointerException: A null parameter has been passed as parameter 1.
at com.appiancorp.core.expr.fn.Signature.nullCheck(Signature.java:332)
at com.appiancorp.core.expr.fn.Function.nullCheck(Function.java:194)
at com.appiancorp.core.expr.fn.Function.nullCheck(Function.java:190)
at com.appiancorp.core.expr.fn.Signature.eval(Signature.java:131)
yes, but it didn't have much details except the above mentioned error
dikshag said:a!save( ri!fileName,save!value)
just fyi, this won't actually do anything. at best, it'll set ri!fileName to the Doc ID of the uploaded file, as far as I know, which doesn't seem like it'll be very useful overall.
As far as your error - can you try commenting out the "filenames" parameter and see if the error still persists for the user in question?