JBoss Version 3.2.1
I received the following error while parsing the conf/login-config.xml file:
org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, col
umn 1.
Was expecting one of:
<EOF>
<IDENTIFIER> ...
There were no indications of any problems earlier in the log file.
This was extremely confusing and erroneous. The problem with login-config.xml turned out to be in a directive near the end of the file. The reason the error was wrong is:
1) On line 249 of org.jboss.security.auth.login.XMLLoginConfigImpl, the method loadXMLConfig(config,configNames) is called. This method generated an exception because of my incorrect directive ( a "-" instead of an "=" on an attribute ).
2) The try block caught around line 249 caught *any* exception. No output is logged unless you are logging debug or trace output.
3) At line 255, another method, loadSunConfig(config,configNames) is called. Presumable to retry the parse under a different configuration. However, since this method apparently doesn't use the DTD for login-config.xml, it barfed on the first line of the config file.
I was able to find the configuration problem by placing a trace-level logging on org.jboss.security.auth.login.XMLLoginConfigImpl. This seems a little extreme, though.
I would suggest either differentiating exceptions under loadXMLConfig so that actual parse errors get handled differently. Otherwise, I'd at least go ahead and log the error message returned from the try block around loadXMLConfig so the error is logged in the default JBoss configuration.
Thanks for listening!
Logged In: YES
user_id=175228
The exceptions during xml parsing are now logged at debug level.