PCJ - Troubleshooting the Error : "java.lang.IllegalArgumentException: File name parameter is missing"
Problem
During the import when uploading the zip file, the below error occurs
Log Entries
2022-09-01 13:53:31,287+0200 http-nio-8080-exec-18 url: /rest/projectconfigurator/latest/importCompleteProject/uploadFile; user: A18AE73 ERROR A18AE73 833x72676x1 nlfyg2 84.38.192.7,127.0.0.1 /rest/projectconfigurator/latest/importCompleteProject/uploadFile [c.a.p.rest.exceptionhandlers.GenericExceptionMapper] Unexpected exception captured by GenericExceptionHandler:
java.lang.IllegalArgumentException: File name parameter is missing
at org.springframework.util.Assert.notNull(Assert.java:201)
at com.awnaba.projectconfigurator.transporter.files.CompleteProjectRESTService.uploadMedia(CompleteProjectRESTService.java:62)
at sun.reflect.GeneratedMethodAccessor10068.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
... 19 filteredSolution
After analyzing the Atlassian log files, if the above log entry is found, this error happens which means uploader_file_name header is missing from the request.
Check in the HAR file whether the uploader_file_name (the zip file name) is missing and look for errors.
If a 500 error is present, that means the zip file is not reaching the PCJ endpoints as it could be trimmed mid-way and causing the error.
This can be caused by Firewall/network proxies/rules in the target server that removes the header from the request and the zip file does not reach PCJ upload routines.
Check with the network administrators to find what is removing the header from the request and can allow the zip file to upload. Mainly check if there is a setting in the configuration of the proxy and if there are blocking underscores “_” that are present in the zip file name.