[OPENAM-9954] Upgrade fails if OpenAM is using an external Config Store "Unable to remove objectclass 1.3.6.1.4.1.36733.2.2.2.27 from the server schema because no such objectclass is defined" Created: 03/Nov/16  Updated: 14/Feb/17  Resolved: 07/Dec/16

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

Type: Bug Priority: Major
Reporter: Sebastien Bertholet [X] (Inactive) Assignee: Jonathan Thomas
Resolution: Fixed Votes: 0
Labels: EDISON, Must-Fix
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OpenAM 14.0.0-SNAPSHOT Build d9156ce7de (2016-November-03 00:28)


Attachments: Text File debug.txt    
Issue Links:
Depends
Relates
Target Version/s:
Rank: 1|hzpb7r:
Sprint: AM Sustaining Sprint 32
Story Points: 5
QA Assignee: Filip Kubáň [X] (Inactive)
Verified Version/s:

 Description   

Trying to upgrade an OpenAM 12.0.3 server using an external config store to OpenAM 14.0.0, it fails when running command:

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java -jar openam-upgrade-tool-14.0.0-SNAPSHOT.jar -f /local/wks/pyforge/results/20161103-143410/upgrade/Site/AM1/upgrade.properties
20161103 14:39:07.247 - INFO - SUCCESS:
-- rc --
returned 0, expected 0
20161103 14:39:07.248 - DEBUG - Writing Backup; Done.

Upgrade Failed. Please check the amUpgrade debug file for errors

From amUpgrade debug log we see:

amUpgrade:11/03/2016 02:39:07:234 PM CET: Thread[http-bio-8081-exec-6,5,main]: TransactionId[2449cfa7-cdd6-4517-9748-5092edd0b618-75]
ERROR: An error occurred while processing /WEB-INF/template/ldif/sfha/cts-add-multivalue.ldif
org.forgerock.opendj.ldap.LdapException: Unwilling to Perform: Unable to remove objectclass 1.3.6.1.4.1.36733.2.2.2.27 from the server schema because no such objectclass is defined
	at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:178)
	at org.forgerock.opendj.ldap.spi.ResultLdapPromiseImpl.setResultOrError(ResultLdapPromiseImpl.java:132)
	at org.forgerock.opendj.grizzly.LDAPClientFilter$ClientResponseHandler.modifyResult(LDAPClientFilter.java:301)
	at org.forgerock.opendj.io.LDAPReader.readModifyResult(LDAPReader.java:520)
	at org.forgerock.opendj.io.LDAPReader.readProtocolOp(LDAPReader.java:555)
	at org.forgerock.opendj.io.LDAPReader.readMessage(LDAPReader.java:122)
	at org.forgerock.opendj.grizzly.LDAPBaseFilter.handleRead(LDAPBaseFilter.java:72)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)

amUpgrade:11/03/2016 02:39:07:236 PM CET: Thread[http-bio-8081-exec-6,5,main]: TransactionId[2449cfa7-cdd6-4517-9748-5092edd0b618-75]
ERROR: Error occured while upgrading OpenAM
org.forgerock.openam.upgrade.UpgradeException: Unwilling to Perform: Unable to remove objectclass 1.3.6.1.4.1.36733.2.2.2.27 from the server schema because no such objectclass is defined
	at org.forgerock.openam.upgrade.DirectoryContentUpgrader.processLDIF(DirectoryContentUpgrader.java:265)
	at org.forgerock.openam.upgrade.DirectoryContentUpgrader.upgrade(DirectoryContentUpgrader.java:290)
	at org.forgerock.openam.upgrade.steps.UpgradeDirectoryContentStep.perform(UpgradeDirectoryContentStep.java:69)
	at org.forgerock.openam.upgrade.UpgradeServices.upgrade(UpgradeServices.java:155)
	at com.sun.identity.config.upgrade.Upgrade.doUpgrade(Upgrade.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	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.processPageEvents(ClickServlet.java:607)
	at org.apache.click.ClickServlet.processPage(ClickServlet.java:561)
	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:624)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.forgerock.opendj.ldap.LdapException: Unwilling to Perform: Unable to remove objectclass 1.3.6.1.4.1.36733.2.2.2.27 from the server schema because no such objectclass is defined
	at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:178)
	at org.forgerock.opendj.ldap.spi.ResultLdapPromiseImpl.setResultOrError(ResultLdapPromiseImpl.java:132)
	at org.forgerock.opendj.grizzly.LDAPClientFilter$ClientResponseHandler.modifyResult(LDAPClientFilter.java:301)
	at org.forgerock.opendj.io.LDAPReader.readModifyResult(LDAPReader.java:520)
	at org.forgerock.opendj.io.LDAPReader.readProtocolOp(LDAPReader.java:555)
	at org.forgerock.opendj.io.LDAPReader.readMessage(LDAPReader.java:122)
	at org.forgerock.opendj.grizzly.LDAPBaseFilter.handleRead(LDAPBaseFilter.java:72)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	... 1 more


 Comments   
Comment by Sebastien Bertholet [X] (Inactive) [ 03/Nov/16 ]

Note that:

  • we get the same problem if using the console to upgrade the server.
  • we get the same problem when trying to upgrade from 13.x
  • we don't get any problem when upgrading a server with an embedded config store
Comment by Jonathan Thomas [ 30/Nov/16 ]

I believe this is because the syntax used to delete the objectclass is

objectClasses: ( 1.3.6.1.4.1.36733.2.2.2.27 )

This will work from DJ 3.0 onwards as it introduces objectIdentifierFirstComponentMatch MR for schema elements.
With OpenDJ 2.6, the entire attribute or objectclass definition must be passed to be removed.

Sebastien Bertholet [X] Are you able to double check the DJ versions this is failing on - I suspect they are 2.6.x

Comment by Sebastien Bertholet [X] (Inactive) [ 30/Nov/16 ]

Just double checked it. I actually had the problem using DJ 3.0.0 (attaching full test log debug.txt)

Comment by Jonathan Thomas [ 30/Nov/16 ]

Hmm ok - I was able to reproduce this with 12.0.4 AM and 2.6 DJ.
Adding the objectclass definition to delete seems to fix this, tested 12.0.4 to master upgrade with 2.6, 3.0 and 3.5 external DJs.
I'll double check that I've got the version correct when objectIdentifierFirstComponentMatch was added but I feel fix is going to be same anyway.

Additionally tested embedded upgrade.

Comment by Filip Kubáň [X] (Inactive) [ 04/Jan/17 ]

verified fix: OpenAM 14.0.0-M9 Build 23ac75686f (2016-December-19 10:10)

Generated at Wed Mar 03 01:41:07 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.