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

Upgrade fails if external data store for Applications and Policies is used

    Details

    • Type: Bug
    • Status: Open
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 6.5.2, 7.0.0
    • Fix Version/s: None
    • Component/s: upgrade
    • Labels:
    • Environment:
      Oracle JDK 1.8.0_201-b09
      Apache Tomcat/9.0.8
      DS 6.5.0 as external data store for Applications and Policies
      AM 6.5.0, upgrade to AM 6.5.2
    • Target Version/s:
    • Rank:
      1|i010jc:
    • Sprint:
      AM Sustaining Sprint 76, AM Sustaining Sprint 77
    • Story Points:
      3
    • Support Ticket IDs:

      Description

      Bug description

      Uprade can not be performed

      How to reproduce the issue

      1. Configure AM 6.5.0
      2. Setup OIDC provider in sub-realm
      3. create agent group and OAuth2 profile in sub-realm
      4. Setup DS 6.5.0 as external data store as described in https://backstage.forgerock.com/docs/am/6.5/install-guide/index.html#prepare-ds-for-policy-and-application
      5. Migrate data as described in https://backstage.forgerock.com/docs/am/6.5/install-guide/index.html#migrate-policy-and-application-data , also see OPENAM-15252
      6. Configure AM 6.5.0 to use external data store for Applications and Policy in sub-realm
      7. Stop Tomcat
      8. Deploy AM 6.5.2 web app
      9. Start Tomcat
      10. Access AM deployment uri to trigger upgrade
      Expected behaviour
      It should be possible to perform Upgrade
      
      Current behaviour
      Option to upgrade to AM 6.5.2 is grayed out, see screenshot.
      

      Current behavior

      Excerpt from AM 6.5.2 upgrade logs
      amUpgrade:07/22/2019 03:28:15:593 PM CEST: Thread[http-nio-8080-exec-7,5,main]: TransactionId[06f0ba28-27b5-438b-851b-d39968ef1e4a-1125]
      ERROR: An error occurred while initializing upgrade steps
      java.lang.NullPointerException
      	at com.sun.identity.idm.server.IdRepoPluginsCache.getIdRepoPlugins(IdRepoPluginsCache.java:180)
      	at com.sun.identity.idm.server.IdRepoPluginsCache.getIdRepoPlugins(IdRepoPluginsCache.java:202)
      	at com.sun.identity.idm.server.IdServicesImpl.search(IdServicesImpl.java:1410)
      	at com.sun.identity.idm.server.IdCachedServicesImpl.search(IdCachedServicesImpl.java:616)
      	at com.sun.identity.idm.AMIdentityRepository.searchIdentities(AMIdentityRepository.java:380)
      	at com.sun.identity.idm.AMIdentityRepository.searchIdentities(AMIdentityRepository.java:312)
      	at org.forgerock.openam.upgrade.steps.UpgradeRemoteConsentAgentStep.initialize(UpgradeRemoteConsentAgentStep.java:107)
      	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:634)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:59)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:127)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:46)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:412)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1385)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	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:07/22/2019 03:28:15:594 PM CEST: Thread[http-nio-8080-exec-7,5,main]: TransactionId[06f0ba28-27b5-438b-851b-d39968ef1e4a-1125]
      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:634)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:59)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:127)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:46)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:412)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1385)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	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)
      

      Full debug logs for upgrade attached.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bthalmayr Bernhard Thalmayr
            • Votes:
              3 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

              • Created:
                Updated: