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

Upgrading from AM 6.5 to AM 6.5.0.1 fails when AM 6.5 Config DJ was setup with --profile am-config

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.5.0.1
    • Fix Version/s: None
    • Component/s: upgrade
    • Labels:
      None

      Description

      Bug description

      When AM 6.5 and DJ 6.5 was setup and installed using the DJ's Application Profile: --profile am-config, when upgrading AM to 6.5.0.1, one gets an error unable to read directory schema and a NullPointerException:

      How to reproduce the issue

      1. Install DJ 6.5 using the --profile am-config option
      2. Install AM 6.5 using the above 6.5 DJ for your Config DJ (suffix: ou=am-config & user:
        uid=am-config,ou=admins,ou=am-config)
      3. Verify AM 6.5 works.
      4. Take 6.5.0.1.war file and replace the 6.5 war file and deployed directory
      5. go to AM and to the upgrade page. The "Upgrade" button will be greyed out.
      6. Check the logs, and you will see the stack trace's from above.
      Expected behaviour
      The upgrade to complete.
      
      Current behaviour

      Get this error:

      [root@localhost openam]# more /root/openam/openam/debug/amUpgrade
      amUpgrade:02/20/2019 09:47:04:329 PM GMT: Thread[http-nio-8080-exec-4,5,main]: TransactionId[9ec2affb-d09d-472f-8809-d1580858f114-52]
      Current version: Wed Nov 28 15:19:00 GMT 2018
      amUpgrade:02/20/2019 09:47:04:329 PM GMT: Thread[http-nio-8080-exec-4,5,main]: TransactionId[9ec2affb-d09d-472f-8809-d1580858f114-52]
      War version: Wed Nov 28 15:19:00 GMT 2018
      amUpgrade:02/20/2019 10:15:59:374 PM GMT: Thread[localhost-startStop-1,5,main]: TransactionId[73cba79a-2539-470f-8c30-6313e6bbbdaf-0]
      Current version: Wed Nov 28 15:19:00 GMT 2018
      amUpgrade:02/20/2019 10:15:59:374 PM GMT: Thread[localhost-startStop-1,5,main]: TransactionId[73cba79a-2539-470f-8c30-6313e6bbbdaf-0]
      War version: Tue Jan 15 06:37:00 GMT 2019
      amUpgrade:02/20/2019 10:16:14:330 PM GMT: Thread[http-nio-8080-exec-6,5,main]: TransactionId[73cba79a-2539-470f-8c30-6313e6bbbdaf-38]
      Initializing upgrade subsystem.
      amUpgrade:02/20/2019 10:16:14:515 PM GMT: Thread[http-nio-8080-exec-6,5,main]: TransactionId[73cba79a-2539-470f-8c30-6313e6bbbdaf-38]
      ERROR: Unable to read directory schema, the schema won't be upgraded
      
      No Results Returned: The entry ou=am-config does not include a subschemaSubentry attribute
      
       at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:246)‚Äč
       at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:143)
       at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:112)
       at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:70)
       at org.forgerock.opendj.ldap.schema.SchemaBuilder.getSubschemaSubentryDn(SchemaBuilder.java:93)
       at org.forgerock.opendj.ldap.schema.SchemaBuilder.addSchemaForEntry(SchemaBuilder.java:1714)
       at org.forgerock.opendj.ldap.schema.Schema.readSchemaForEntry(Schema.java:898)
       at org.forgerock.openam.upgrade.DirectoryContentUpgrader.<init>(DirectoryContentUpgrader.java:156)
       at org.forgerock.openam.upgrade.steps.UpgradeDirectoryContentStep.initialize(UpgradeDirectoryContentStep.java:56)
       at org.forgerock.openam.upgrade.UpgradeServices.<init>(UpgradeServices.java:96)
       at org.forgerock.openam.upgrade.UpgradeServices.getInstance(UpgradeServices.java:123)
       at com.sun.identity.config.upgrade.Upgrade.<init>(Upgrade.java:45)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at java.lang.Class.newInstance(Class.java:442)
       at org.apache.click.ClickServlet.newPageInstance(ClickServlet.java:1422)
       at org.apache.click.ClickServlet.initPage(ClickServlet.java:1257)
       at org.apache.click.ClickServlet.createPage(ClickServlet.java:1103)
       at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:367)
       at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:59)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:127)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:748)
      amUpgrade:02/20/2019 10:16:14:536 PM GMT: Thread[http-nio-8080-exec-6,5,main]: TransactionId[73cba79a-2539-470f-8c30-6313e6bbbdaf-38]
      
      ERROR: An error occurred while initializing upgrade steps
      
      java.lang.NullPointerException
      
       at org.forgerock.openam.upgrade.DirectoryContentUpgrader$UpgradeCTSToMultiValue.isUpgradeNecessary(DirectoryContentUpgrader.java:369)
       at org.forgerock.openam.upgrade.DirectoryContentUpgrader.<init>(DirectoryContentUpgrader.java:162)
       at org.forgerock.openam.upgrade.steps.UpgradeDirectoryContentStep.initialize(UpgradeDirectoryContentStep.java:56)
       at org.forgerock.openam.upgrade.UpgradeServices.<init>(UpgradeServices.java:96)
       at org.forgerock.openam.upgrade.UpgradeServices.getInstance(UpgradeServices.java:123)
       at com.sun.identity.config.upgrade.Upgrade.<init>(Upgrade.java:45)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at java.lang.Class.newInstance(Class.java:442)
       at org.apache.click.ClickServlet.newPageInstance(ClickServlet.java:1422)
       at org.apache.click.ClickServlet.initPage(ClickServlet.java:1257)
       at org.apache.click.ClickServlet.createPage(ClickServlet.java:1103)
       at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:367)
       at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:59)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:127)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:748)
      amUpgrade:02/20/2019 10:16:14:537 PM GMT: Thread[http-nio-8080-exec-6,5,main]: TransactionId[73cba79a-2539-470f-8c30-6313e6bbbdaf-38]
      ERROR: An error occured, while initializing Upgrade page
      
      org.forgerock.openam.upgrade.UpgradeException: Unable to initialize upgrade steps
      
       at org.forgerock.openam.upgrade.UpgradeServices.<init>(UpgradeServices.java:102)
      
       at org.forgerock.openam.upgrade.UpgradeServices.getInstance(UpgradeServices.java:123)
      
       at com.sun.identity.config.upgrade.Upgrade.<init>(Upgrade.java:45)
      
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at java.lang.Class.newInstance(Class.java:442)
       at org.apache.click.ClickServlet.newPageInstance(ClickServlet.java:1422)
       at org.apache.click.ClickServlet.initPage(ClickServlet.java:1257)
       at org.apache.click.ClickServlet.createPage(ClickServlet.java:1103)
       at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:367)
       at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:59)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:127)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:748)
      

      Work around

      installed using cn=Directory Manager rather then the config dj user that is setup during the installation

      Code analysis

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                david.bate David Bate
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: