0 Replies Latest reply on Aug 12, 2008 4:35 AM by Ely de Oliveira

    org.jboss.security.auth.login.ParseException

    Ely de Oliveira Newbie

      Hello everyone

      I am trying to migrate my application from JBoss 4.0.3SP1 to the latest stable release JBoss 4.2.3.GA, but a very weird error is happening. During server startup, the following error message is shown:

      2008-08-12 09:53:53,877 WARN [org.jboss.system.ServiceController] Problem starting service abc:service=LoginModule
      org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, column 1.
      Was expecting one of:
       <EOF>
       <IDENTIFIER> ...
       at org.jboss.security.auth.login.SunConfigParser.generateParseException(SunConfigParser.java:395)
       at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunConfigParser.java:333)
      ...
      


      I am sure the cause of this error has nothing to do with XML syntax, since I have been able to deploy my SAR to the old JBoss. I have found some other people facing the same problem with much older versions, and they suggest the removal of special characters from the XML files, but that is not my case. I have recreated all my XML files by using very simple editors such as VI, and copied the content from the JBoss documentation.

      This is my META-INF/login-config.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE policy PUBLIC
       "-//JBoss//DTD JBOSS Security Config 3.0//EN"
       "http://www.jboss.org/j2ee/dtd/security_config.dtd">
      <policy>
       <application-policy name = "abc">
       <authentication>
       <login-module code = "com.abc.LoginModule" flag = "required">
       <module-option name="password-stacking">no</module-option>
       </login-module>
       </authentication>
       </application-policy>
      </policy>



      This is my jboss-service.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
      
       <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="abc:service=LoginModule">
      
       <attribute name="AuthConfig">META-INF/login-config.xml</attribute>
      
       <depends optional-attribute-name="LoginConfigService">
       jboss.security:service=XMLLoginConfig
       </depends>
      
       <depends optional-attribute-name="SecurityManagerService">
       jboss.security:service=JaasSecurityManager
       </depends>
      
       <depends>
       jboss.j2ee:module=abc-ejb.jar,service=EjbModule
       </depends>
       </mbean>
      
      </server>


      Does anyone know what is causing this error?

      Thanks a lot

      Ely