When using Ajax to submit a page, the above exception is thrown, and the final result is found
<form id="newsForm" method="post" enctype="multipart/form-data">
News title:<input name="ntittle"><br>
News summary:<input name="nsummary"><br>
News content:<input name="ncontent"><br>
News by:<input name="nauthor"><br>
Post Time:<input name="ndate" ><br>
Image:<input type="file" name="newpic"><br>
News topics:<select name="newsType.ntypeId">
<option value="-1">Please select news topic</option>
</select><br>
<input type="hidden" name="nid"><br>
<input type="hidden" name="npic"><br>
<input type="submit" value="ADD">
</form>
AJAX is used, so the submission is not a direct submission, so you should use button and serialize the form.
<input type="button" value="ADD">