Jaxb NumberFormatException: For input string: ""

Solution Verified - Updated -


Our application is trying to marshal an empty string to an int value, but fails with the following exception:

Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:470)
    at java.lang.Integer.valueOf(Integer.java:554)
    at com.sun.xml.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:103)


JBoss Enterprise Applicaiton Platform 5.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content