Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

BeanSerializer Exception:  RSS feed

 
deepa sundaram
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to retrieve some 55000 records from DB, when I test my web service method, it gives me following exception in JBoss:

09:40:01,746 ERROR [BeanSerializer] Exception:
java.io.IOException: java.io.IOException: java.lang.IllegalArgumentException: The char '0x0' in 'some Junk Characters - - not able to copy that here'
is not a valid XML character.

please anyone ever encountered such exception, if so please let me know how to resolve this.

Thanks
Dk
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As your strings seem to include characters outside of the valid XML Range you may need to constrain and sanitize your strings before serialization.

W3C Extensible Markup Language (XML) 1.0: 2.2 Characters



From: Processing XML with Java: Parsing non-XML Documents.


Otherwise you will have to write your own custom serializer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!