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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -