[OPENAM-15286] Upgrade from 12.0.4 fails Created: 30/Jul/19  Updated: 20/Apr/20  Resolved: 20/Apr/20

Status: Closed
Project: OpenAM
Component/s: upgrade
Affects Version/s: 5.5.2
Fix Version/s: 5.5.2

Type: Bug Priority: Blocker
Reporter: Ľubomír Mlích Assignee: Adam Heath
Resolution: Fixed Votes: 0
Labels: EDISON
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File upgrade_error.png    
Issue Links:
Regression
Target Version/s:
Sprint: AM Sustaining Sprint 65
Story Points: 2
Needs backport:
No
Verified Version/s:
Needs QA verification:
Yes
Functional tests:
No
Are the reproduction steps defined?:
Yes and I used the same an in the description

 Description   

Bug description

Upgrade from 12.0.4 to AM 5.5.2 fails with

and in debug there is

ERROR: Unable to upgrade AuditService field
Message:Service does not exist : AuditService	at com.sun.identity.sm.ServiceSchemaManagerImpl.isValid(ServiceSchemaManagerImpl.java:142)
	at com.sun.identity.sm.ServiceSchemaManagerImpl.<init>(ServiceSchemaManagerImpl.java:120)
	at com.sun.identity.sm.ServiceSchemaManagerImpl.getInstance(ServiceSchemaManagerImpl.java:631)
	at com.sun.identity.sm.ServiceSchemaManager.<init>(ServiceSchemaManager.java:111)
	at com.sun.identity.sm.ServiceSchemaManager.<init>(ServiceSchemaManager.java:77)
	at org.forgerock.openam.upgrade.steps.UpgradeAuditFieldFilterPolicyStep.isAuditServiceUpgradeRequired(UpgradeAuditFieldFilterPolicyStep.java:78)
	at org.forgerock.openam.upgrade.steps.UpgradeAuditFieldFilterPolicyStep.initialize(UpgradeAuditFieldFilterPolicyStep.java:67)
	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:43)
	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:36)
	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:124)
	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:200)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
	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:668)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
	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)

How to reproduce the issue

  1. install & configure OpenAM 12.0.4
  2. stop container (tomcat8 or tomcat9)
  3. copy AM-5.5.2-M6.war to webapps
  4. remove temporary files tomcat/webapps/openam tomcat/work/* tomcat/temp/*
  5. start container
  6. go to openam URL (or run upgrade from CLI)
Expected behaviour
Upgrade will be successful
Current behaviour
Upgrade fails

Work around

upgrade to 5.5.1 and then to 5.5.2-M6



 Comments   
Comment by Ľubomír Mlích [ 21/Aug/19 ]

Upgrade to 5.5.2-M7 works again

Comment by Adam Heath [ 20/Apr/20 ]

Re-opening to modify bug title to not mention internal milestone

Generated at Fri Nov 27 04:58:01 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.