Errors in the Log when opening article xwiki:Licenses.Code.MissingLicensesUIX

Hi all,

short information about the system:
XWiki Debian 12.5.1 on Ubuntu 18.04 LTS with tomcat9 and mysql.
Installed with the help of this manual https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/

After setting up all necesary things (most of the time LDAPs), i imported the articles from an old XWiki instance, ok, the old instance is nearly same system with XWiki 12.3, but an upgrade always fails, so i decided to go this way.

Now if i open an article i get following errors in the Log at each time someone opens an article:
Jul 28 16:04:02 <servername> tomcat9[8201]: 2020-07-28 16:04:02,448 [http-nio-8080-exec-22 - <Article-URL>] ERROR o.a.v.rendering - Left side ($unlicensedSheets.size()) of comparison operation has null value at xwiki:Licenses.Code.MissingLicensesUIX^XWiki.UIExtensionClass[0][line 5, column 61]
This error even occours on complete new created empty sites in the new wiki.

I almost forgot, there is no paid extension installed in the system.

If you need further informations feel free to ask.

Thanks for any help.

Did you export from the old XWiki 12.3 instance only the “Created pages” (or at most " Created and modified pages") as per https://extensions.xwiki.org/xwiki/bin/view/Extension/Administration%20Application#HExport ? Exporting all the pages in order to import in a newer instance is definitely a bad idea.

You must have exported all the pages, otherwise I don’t see how you could have the xwiki:Licenses.Code.MissingLicensesUIX page included in the export.

In the new XWiki instance maybe, but you certainly did install a paid extension in the old instance at some point otherwise you wouldn’t have the xwiki:Licenses.Code.MissingLicensesUIX page. I seriously doubt you installed the Licensor extension alone. This usually is installed as a dependency of a paid extension. You may have uninstalled the paid extension from the old instance but the Licensor dependency remained installed. Now the Licensor has two parts: some Java code (a JAR) and some wiki pages. The wiki pages need the Java code in order to work properly, even when there’s no paid extension installed. When you migrated to the new XWiki instance you took all the wiki pages (including xwiki:Licenses.Code.MissingLicensesUIX) but you didn’t took the JARs so you end up having the Licensor partially installed. That’s one of the reasons why exporting all pages is a bad idea when importing in a new instance.

Yes, because as its name suggests, the xwiki:Licenses.Code.MissingLicensesUIX page defines an UI extension (UIX) that is executed on every page, provided its last author, the administrator that imported the page in your case, has the necessary rights: admin for local execution and programming for global (all wikis) execution.

The quick fix is to remove this page, but I doubt this is the only issue you’ll have as a result of exporting / importing all the pages.

Hope this helps,
Marius

Hi Marius,

thanks for the reply.

Indeed i exported all Pages not only the “Created Pages” and like you assumed i had a paid extension with trial license in the old xwiki instance.

For now i removed this page and the error is gone.

When migrating the old xwiki instance to the new one in the future i will only export the “Created Pages” as you suggested and hope this will work (will test it before).

Best regards,
Christoph