jackson - Serialization issue with CommonsMultipartFile -


my bean has folliwng snippet

@jsonignore private list<multipartfile> filedata;  @xmltransient public list<multipartfile> getfiledata() {     return filedata; } 

i et error upon file upload

org.codehaus.jackson.map.jsonmappingexception: no serializer found class java.io.filedescriptor ,  no properties discovered create beanserializer (to avoid exception, disable serializationconfig.feature.fail_on_empty_beans) )  (through reference chain: com.commands.mycommand["filedata"]-> java.util.arraylist[0]->org.springframework.web.multipart.commons.commonsmultipartfile["fileitem"]-> org.apache.commons.fileupload.disk.diskfileitem["inputstream"]->java.io.fileinputstream["fd"]) 

i read if used @jsonignore may able avoid error, not seem case me.

even though getter marked @xmltransient, seemed jackson still looking @jsonignore , upon adding it, things worked expected.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -