question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't delete/remove unloaded plugin

See original GitHub issue

Hi, I found a little issue. I don’t know if it’s only on my end.

How to reproduce it:

  • Start the application and install a plugin
  • After installing it, deactivate it
  • Restart your application -> The plugin won’t be started by application
  • Try to delete (pluginManager.deletePlugin(plugin.getPluginId());) the plugin.
  • A ClassNotFoundException is thrown

image

If I activate the plugin and then tries to delete/remove it there is no issue. The same if I activate the plugin and then deactivate it again and then tries to delete/remove it.

The problem occurs only if I try to delete/remove a plugin which was not loaded/started by application with application-start.

Tested on macOS 10.14.4 with Java 1.8.0_202

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
decebalscommented, Apr 10, 2019

The problem is related to https://github.com/pf4j/pf4j/issues/242 (Add delete hook method in Plugin). I will take a look and I will come with a solution asap.

1reaction
decebalscommented, Apr 13, 2019

I think that I found a solution to solve the problem in an elegant mode with few modifications. My idea is to retrieve the plugin instance before the plugin will be unloaded. See below the modifications as diff:

image

@meydominic Please make above modifications on your machine. Build and test the new PF4J version on your use case (application). If the result is OK please let me know to commit the modifications on GitHub. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to Do When You Can't Delete a WordPress Plugin
You need to first deactivate the plugin before you can completely delete it from your website. To deactivate a plugin, click on Deactivate ......
Read more >
How to Uninstall a WordPress Plugin (the Proper Way) - Kinsta
Browse to your /wp-content/plugins/ folder. Then delete the plugin folder from your server. Delete plugin via FTP Delete WordPress plugin via ...
Read more >
How to remove your plugin completely - WordPress.org
1. Click “Plugins” in the vertical WordPress admin menu. ... 3. Click the “Deactivate” link which is under the plugin name. 4. Click...
Read more >
How to Properly Uninstall a WordPress Plugin (Beginner's ...
To uninstall a plugin, go ahead and click on the 'Delete' link below the plugin name. WordPress will now ask you to confirm...
Read more >
How To Delete & Reinstall Plugins - YouTube
This video looks at how to delete and install/reinstall plugins both via WordPress and manually using FTP or File Manager. #avad...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found