Search code examples
javaxmlxml-parsingwebspheremaximo

How does WebSphere 8.5.5.11 handle tabs inside deployment descriptors such as web.xml?


I've been running into some odd errors after my deployment of maximo.ear. One is \t\t\t java.langString:

AbstractInjec E CWNEN0009E: The injection engine failed to process the XML code from the deployment descriptor due to the following error: Referenced class could not be loaded : java.lang.String

This error seemed strange that a tidied XML could behave differently than one that is not tidied on deployment? I would think any data between > and < would trim any tabs and newlines?

Below are two examples... first is tidied and second is not.

I'm new to XML, so I'm not quite sure how XML data should behave or what the specifications are on tabs and newlines.

    <env-entry>
    <description>
        Indicates whether to use Application Server security or not
    </description>
    <env-entry-name>
        useAppServerSecurity
    </env-entry-name>
    <env-entry-type>
        java.lang.String
    </env-entry-type>
    <env-entry-value>
        1
    </env-entry-value>
</env-entry>

vs

<env-entry>
    <description>Indicates whether to use Application Server security or not</description>
    <env-entry-name>useAppServerSecurity</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>1</env-entry-value>
</env-entry>

Solution

  • Data within the tags including tabs, new lines, and spaces is considered part of the data. Best to not to tidy your XML and only have data values between tags without any formatting.