Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in EM while upgrading on farm the application, leading to unapplied migration #170

Closed
oanalavinia opened this issue Oct 9, 2020 · 2 comments

Comments

@oanalavinia
Copy link

oanalavinia commented Oct 9, 2020

Steps to reproduce

  1. Have Diagram Application (Pro) 1.10 installed on farm
  2. Create a diagram with clipart shapes
    from_diagram
  3. Upgrade on farm the application to version 1.15.2
  4. Observe the progress displayed in Extension Manager
  5. Observe the created diagram page

Results
The following error appears, but the application is upgraded correctly:

Failed to send event [org.xwiki.extension.event.ExtensionUpgradedEvent@4cd30ffd] to listener [com.xwiki.diagram.internal.DiagramApplicationListener@766a17a5]
class java.lang.NullPointerException: null
    at com.xwiki.diagram.internal.DiagramApplicationListener.getTargetWikis(DiagramApplicationListener.java:80)
    at com.xwiki.diagram.internal.DiagramApplicationListener.onEvent(DiagramApplicationListener.java:75)
    at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
    at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
    at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:339)
    at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:209)
    at org.xwiki.extension.job.internal.AbstractExtensionJob.applyActions(AbstractExtensionJob.java:157)
    at org.xwiki.extension.job.internal.InstallJob.runInternal(InstallJob.java:154)
    at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:206)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:189)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

This error appears in EM despite the version from which the upgrade is done.

After upgrade, the created page is broken:
to_diagram

@oanalavinia
Copy link
Author

oanalavinia commented Oct 9, 2020

The unapplied migration will affect only diagrams created before Diagram Application version 1.11, but the error in EM will appear for any upgrade

@oanalavinia oanalavinia changed the title Error in EM while upgrading the application, leading to unapplied migration Error in EM while upgrading on farm the application, leading to unapplied migration Oct 9, 2020
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Oct 9, 2020
@oanalavinia oanalavinia added this to the 1.15.3 milestone Oct 16, 2020
@oanalavinia
Copy link
Author

oanalavinia commented Oct 16, 2020

Note that to have the fix to the problem, two diagram upgrades will be needed, where the first upgrade is to a version >= 1.15.3 (the fix version).

The reason is that a component that listens to the upgrade operation is the provider of the error, and while doing the first upgrade the old component will be the one registered. Only on a second upgrade the new listener (that was fixed in the previous upgrade) will be the one registered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant