Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-9734

Upgrade on JBoss EAP fails with org.xml.sax.SAXParseException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.0.4
    • Fix Version/s: 12.0.4, 12.0.5
    • Component/s: upgrade
    • Labels:
    • Environment:
      Centos 7 / JDK 1.7.0_75 / JBoss EAP 6.4 / OpenAM 12.0.4-RC5 Build 8f3551671e (2016-September-19 17:53)
    • Sprint:
      AM Sustaining Sprint 28

      Description

      Upgrade OpenAM 12.0.4 on Jboss suffers with org.xml.sax.SAXParseException and upgrade crashed.

      Steps to reproduce

      1.)Prepare openam.war 11.0.3 and 12.0.4 files

      • set configuration.dir=/root/openam in am.war/WEB-INF/classes/bootstrap.properties
      • copy jboss-deployment-structure.xml file into AM.war/WEB-INF/
        jboss-deployment-structure.xml
        <?xml version="1.0" encoding="UTF-8"?>
        <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
          <deployment>
            <exclusions>
              <module name="sun.jdk" />
            </exclusions>
            <exclude-subsystems>
              <subsystem name="jaxrs" />
              <subsystem name="webservices" />
            </exclude-subsystems>
            <dependencies>
                <module name="sun.jdk" >
                    <imports>
                        <exclude-set>
                            <path name="com/sun/org/apache/xml/internal/security/transforms/implementations"/>
                        </exclude-set>
                    </imports>
                </module>
              <system>
                <paths>
                  <path name="com/sun/net/httpserver" />
                  <path name="sun/security/x509" />
                  <path name="sun/security/tools/keytool" />
                  <path name="com/sun/org/apache/xpath/internal" />
                  <path name="com/sun/org/apache/xerces/internal/dom" />
                  <path name="com/sun/org/apache/xml/internal/utils" />
                </paths>
              </system>
            </dependencies>
          </deployment>
        </jboss-deployment-structure>
        

      2.) Default installation of AM 11.0.3
      3.) Deploy AM 12.0.4
      4.) Perform an upgrade

      Expected result

      Successfully upgrade

      Observed result

      Upgrade crashed with:
      org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 1; Content is not allowed in prolog.

      amUpgrade debug log
      amUpgrade:09/22/2016 08:32:21:659 AM BST: Thread[http-/10.1.4.66:8080-2,5,main]
      ERROR: UpgradeUtils:createService : Parser error at line: 5
      org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 1; Content is not allowed in prolog.
      amUpgrade:09/22/2016 08:32:21:660 AM BST: Thread[http-/10.1.4.66:8080-2,5,main]
      ERROR: Error occured while upgrading OpenAM
      org.forgerock.openam.upgrade.UpgradeException: Parser error at line: 5
      org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 1; Content is not allowed in prolog.
              at org.forgerock.openam.upgrade.UpgradeUtils.createService(UpgradeUtils.java:419)
              at org.forgerock.openam.upgrade.UpgradeUtils.createService(UpgradeUtils.java:442)
              at org.forgerock.openam.upgrade.steps.UpgradeServiceSchemaStep.perform(UpgradeServiceSchemaStep.java:258)
              at org.forgerock.openam.upgrade.UpgradeServices.upgrade(UpgradeServices.java:186)
              at com.sun.identity.config.upgrade.Upgrade.doUpgrade(Upgrade.java:79)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)
              at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)
              at org.apache.click.control.AbstractControl$1.onAction(AbstractControl.java:228)
              at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)
              at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)
              at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)
              at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)
              at org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)
              at org.apache.click.ClickServlet.processPage(ClickServlet.java:559)
              at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
              at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
              at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
              at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: Message:Parser error at line: 5
      org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 1; Content is not allowed in prolog.
      
              at com.sun.identity.sm.SMSSchema.getXMLDocument(SMSSchema.java:389)
              at com.sun.identity.sm.SMSSchema.getXMLDocument(SMSSchema.java:375)
              at com.sun.identity.sm.ServiceManager.registerServices(ServiceManager.java:423)
              at com.sun.identity.sm.ServiceManager.registerServices(ServiceManager.java:398)
              at org.forgerock.openam.upgrade.UpgradeUtils.createService(UpgradeUtils.java:413)
              ... 40 more
      

      I tested also upgrade from 12.0.3 to 12.0.4 on the same env. and upgrade stuck without error, see picture:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peter.major Peter Major [X] (Inactive)
                Reporter:
                richard.hruza Richard Hruza
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0h
                  0h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h