Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

BeanSerializer Exception:  RSS feed

 
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
 
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!