My Oracle Support Banner

Importing a Portal Fails with: XML-20221: (Fatal Error) Invalid char in text. (Doc ID 3013859.1)

Last updated on SEPTEMBER 16, 2024

Applies to:

Oracle WebCenter Portal for OCI - Version 12.2.1.4.0_24.6.1 and later
Oracle WebCenter Portal - Version 12.2.1.3.0 to 12.2.1.4.0
Information in this document applies to any platform.

Symptoms

Importing a Portal fails with the following error:

ERROR

Portal(s) import started...
Adding connections...
Importing "<PORTAL_NAME>"
Failed importing "<PORTAL_NAME>" on the target.
Portal/Portal Template import operation failed. Cause of failures: 'EBAB': file:/tmp/import<ID>/portal-entities.xml<Line <LINE_NUMBER>, Column <COLUMN_NUMBER>>: XML-20221: (Fatal Error) Invalid char in text.

 Upon checking further, there are invalid characters in portal-entities.xml file inside par file.

STEPS

The issue can be reproduced at will with the following steps:

  1. Export a portal. 
     
  2. Attempt to Import to a target environment.
    Here the error is displayed. 

  3. Reviewing the portal managed server diagnostic log file you will see this error:

    [<DATE_TIME>] [WC_Portal] [NOTIFICATION] [WCS-12045] [oracle.webcenter.lifecycle.operation.ImportOperation] [tid: wc concurrency non-pooled worker thread] [userId: <USERID>] [ecid: <ECID>] [APP: webcenter] [partition-name: DOMAIN] [tenant-name: <TENANT_NAME>] Operation aborted because of an exception thrown by subunit (oracle.webcenter.lifecycle.data.PersistenceUnit)[[
    oracle.webcenter.lifecycle.LifecycleException: file:/tmp/import<IMPORT_ID>/portal-entities.xml<Line <LINE_NUMBER>, Column <COLUMN_NUMBER>>: XML-20221: (Fatal Error) Invalid char in text.
         at oracle.webcenter.lifecycle.data.PersistenceUnit.doImport(PersistenceUnit.java:340)
         at oracle.webcenter.lifecycle.operation.ImportOperation.doImport(ImportOperation.java:151)
         at oracle.webcenter.lifecycle.LifecycleService.doImport(LifecycleService.java:2899)
         at oracle.webcenter.lifecycle.LifecycleService.importPortals(LifecycleService.java:7041)
         at oracle.webcenter.webcenterapp.internal.view.lifecycle.WebCenterImporterThread.run(WebCenterImporterThread.java:125)
         at oracle.webcenter.concurrent.RunnableTask.call(RunnableTask.java:44)
         at oracle.webcenter.concurrent.Submission$2.run(Submission.java:491)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.webcenter.concurrent.Submission.runAsPrivileged(Submission.java:505)
         at oracle.webcenter.concurrent.Submission.run(Submission.java:430)
         at oracle.webcenter.concurrent.Submission$SubmissionFutureTask.run(Submission.java:929)
         at java.lang.Thread.run(Thread.java:748)
    Caused by: org.xml.sax.SAXParseException; systemId: file:/tmp/import<IMPORT_ID>/portal-entities.xml; lineNumber: <LINE_NUMBER>; columnNumber: <COLUMN_NUMBER>; file:/tmp/import<IMPORT_ID>/portal-entities.xml<Line <LINE_NUMBER>, Column <COLUMN_NUMBER>>: XML-20221: (Fatal Error) Invalid char in text.
         at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:425)
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:290)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:438)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:251)
         at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:175)
         at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:162)
         at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
         at oracle.webcenter.lifecycle.data.PersistenceUnit.doImport(PersistenceUnit.java:335)
    ... 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.