gentics / mesh

Gentics Mesh - The open source headless CMS for developers
https://getmesh.io
Apache License 2.0
571 stars 115 forks source link

Deployment of plugin fails #916

Open npomaroli opened 4 years ago

npomaroli commented 4 years ago

Gentics Mesh Version, operating system, or hardware.

Problem

When the deployment of a plugin (e.g. on mesh startup) fails due to an error during initialization (e.g. plugin expects a project to exist, which does not exist yet), the plugin cannot be deployed over the /admin/plugins endpoint with a "generic_error".

Mesh log shows:

08:44:13.654 [] ERROR [vert.x-worker-thread-5] - Plugin deployment of {mesh-formgenerator-plugin-1.0.1.jar} failed. cr_1 | org.pf4j.PluginAlreadyLoadedException: Plugin '/plugins/mesh-formgenerator-plugin-1.0.1.jar' already loaded with id 'fg'

It seems that the plugin is still somehow registered, even if it was not deployed on startup

Reproducer

  1. Setup new mesh instance with the formgenerator plugin placed in the plugins folder (with existing config.yml that references the project "fg-project")
  2. Start mesh instance -> plugin deployment fails (fg-project not found)
  3. Create fg-project
  4. Deploy plugin over /admin/plugins endpoint

Expected behaviour and actual behaviour

Expected: plugin deployment should work Actual: plugin deployment fails (until mesh is restarted)

Jotschi commented 4 years ago

TODO: