Skip to main content
NageshRaja
Level 5
September 9, 2026
Question

AEM Forms - AMS to Cloud Migration

  • September 9, 2026
  • 1 reply
  • 31 views

Hi All,

 

We are migrating AEM Forms to Cloud from AMS.

When setting up the local, we placed the .far file add-on in the install and then brought over our custom forms.

 

09.09.2026 21:04:17.714 *ERROR* [[0:0:0:0:0:0:0:1] [1788968057597] GET /content/forms/af/brandA/en/forms/contact-sales-form.html 
HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor Failed to execute script 'parser': FAILED ASSERTION
java.lang.IllegalStateException: FAILED ASSERTION
at org.mozilla.javascript.Kit.codeBug(Kit.java:375)
at org.mozilla.javascript.TokenStream.<init>(TokenStream.java:47)
at org.mozilla.javascript.Parser.parse(Parser.java:568)
at org.mozilla.javascript.Context.parse(Context.java:2533)
at org.mozilla.javascript.Context.compileImpl(Context.java:2482)
at org.mozilla.javascript.Context.compileString(Context.java:1486)
at org.mozilla.javascript.Context.compileString(Context.java:1475)
at org.mozilla.javascript.Context.evaluateString(Context.java:1231)
at com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor$2.call(RhinoScriptProcessor.java:210) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.internal.impl.utils.rhino.sandbox.RhinoSandbox.executeWithSafeContext(RhinoSandbox.java:81) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor.withRhinoContext(RhinoScriptProcessor.java:255) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]


09.09.2026 21:04:17.720 *ERROR* [[0:0:0:0:0:0:0:1] [1788968057597] GET /content/forms/af/brandA/en/forms/contact-sales-form.html
HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor Unable to execute compiled script 'ruleEditor1':
TypeError: Cannot call method "createElement" of undefined (ruleEditor1#57)
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "createElement" of undefined (ruleEditor1#57)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4287)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4265)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:4298)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:4317)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:4334)

09.09.2026 21:04:17.721 *ERROR* [[0:0:0:0:0:0:0:1] [1788968057597] GET /content/forms/af/brandA/en/forms/contact-sales-form.html HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor Failed to execute script 'ruleEditor1': Unable to execute compiled script 'ruleEditor1': TypeError: Cannot call method "createElement" of undefined (ruleEditor1#57)
com.adobe.aemds.guide.service.GuideException: Unable to execute compiled script 'ruleEditor1': TypeError: Cannot call method "createElement" of undefined (ruleEditor1#57)
at com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor.executeCompiledScript(RhinoScriptProcessor.java:245) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.internal.impl.utils.rhino.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:187) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.internal.impl.utils.StaticScriptsManager.evalRuleEditorScripts(StaticScriptsManager.java:140) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.internal.impl.utils.RulesCompiler.initScope(RulesCompiler.java:64) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.service.impl.GuideModelTransformerImpl.exportGuideJsonObject(GuideModelTransformerImpl.java:533) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]
at com.adobe.aemds.guide.service.impl.GuideModelTransformerImpl.exportGuideJsonObject(GuideModelTransformerImpl.java:471) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1386]

 

Can anyone point to the RCA for these logs?

 

Thanks,

NK

 

1 reply

AmitVishwakarma
Community Advisor
Community Advisor
September 18, 2026

Hi ​@NageshRaja 

The error indicates that the migrated form still contains a legacy Code Editor rule or custom script. Installing the Forms .far file only installs the Forms runtime; it does not convert existing AMS form scripts to the Cloud-compatible format.

The following error is the key:

TypeError: Cannot call method "createElement" of undefined
(ruleEditor1#57)

This suggests that the script is using a browser-only DOM API such as document.createElement() while AEM is trying to compile or execute the rule through the server-side Rhino engine.

Please try the following:

  • On a clone of the AMS source, run the AEM Forms Migration Utility.
  • Run Code Editor Script Migration to convert legacy rule scripts into reusable functions and visual rules.
  • Review ruleEditor1, especially line 57, and remove or rewrite calls such as:
    document.createElement()
    window
    document.getElementById()
    jQuery DOM manipulation
  • Use supported Rule Editor actions/custom functions for form logic. Keep pure UI/DOM manipulation in a client-side client library instead of a form rule.
  • Deploy the generated client libraries and corrected form content through the Cloud Manager pipeline.
  • Test the form again after a full-stack deployment.

Do not try to resolve this by installing another .far file or modifying /libs in Cloud Service. If the source environment is AEM Forms on OSGi, Adobe recommends using the Forms Migration Utility and Content Transfer Tool. Migration from AEM Forms on JEE is not supported by this migration path.

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/setup-configure-migrate/migrate-to-forms-as-a-cloud-service

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/forms-overview/notable-changes

Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME