Incorrect file encoding used in processing deployment descriptors in JBoss
Environment
- JBoss Enterprise Application Platform (EAP)
- 5.0.0
- 5.0.1
- 5.1.0
Resolution.
This problem is caused by a bug in the Virtual File System and can be corrected by upgrading to EAP 5.1.1 (when available) or by applying a patch.
Issue
-
I have an EJB 2.1 which contains french character 'é' in env-entry-values. Although the character is correctly encoded in ejb-jar.xml, its value is wrong in java code, resulting in 'é'. It appears that ejb-jar.xml is encoded in platform encoding, Cp1252, instead of the encoding specified in the xml header of the ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?> -
Generally, a deployment descriptor is read based on the systems file encoding (
file.encodingsystem property) and not the value specified in the XML header.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
