• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BeanSerializer Exception:

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Yup, yup, yup. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic