The example you post is NOT valid, you're missing the
Have you enabled validation on the parser?
You'll need it if you want whitespace collpasing by the parser
because its gots to read the schema to find out the datatype.
e.g. in your case it should be
<connection-definition> <managed-connection-factory-class> org.jboss.resource.adapter.jms.JmsConnectionFactory </managed-connection-factory-class> </connection-definition>
managed-connection-factory-class is a j2ee:fully-qualified-classType
which is a j2ee:string which is a token.
<xsd:complexType name="string"> <xsd:annotation> <xsd:documentation> This is a special string datatype that is defined by Java EE as a base type for defining collapsed strings. When schemas require trailing/leading space elimination as well as collapsing the existing whitespace, this base type may be used. </xsd:documentation> </xsd:annotation> <xsd:simpleContent> <xsd:extension base="xsd:token"> <xsd:attribute name="id" type="xsd:ID"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType>
Its the tx-connection-factories-ds.xml that is being parsed, not the ra.xml so there is no schema associated with the file. I was able to resolve the issue by using the existing javax.xml.bind.annotation.adapters.CollapsedStringAdapter type adapter:
/** The connectionDefinition */ @XmlElement(name="connection-definition") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String connectionDefinition;