Red Hat Bugzilla – Bug 844700
RFE: Disallow deploying plugins incompatible with server or plugin API
Last modified: 2015-11-01 19:45:31 EST
Description of problem:
Recently, I've caught this on IRC:
<nsaad> hello folks
<nsaad> i have a quick question, onsite with a consultant at an unhappy client
<nsaad> trying to get some jon issues resolved
<nsaad> when the agent starts (jon 3.0.1 installed), after it starts up, it throws an error
<nsaad> NoClassDefFoundError: org/rhq/core/pluginapi/util/JavaCommandLine
After some search in git history, I've found out, that JavaCommandLine class has beed introduced in JON 3.1. This means that customer probably successfully deployed 3.1 plugin (that depends on 3.1 plugin API) to JON 3.0.1.
I've also verified, that I can deploy JON 3.1 plugins to JON 3.0 and I am having same error (and much more) in agent.log as nsaad.
We should prevent users doing so.
We should start versioning our plugin API and force our plugins to include something like <require "1.2.3" /> in rhq-plugin.xml. With this information we could fail deploying plugins that require higher plugin API that is avaiable on server. User would quickly figure out what's wrong.
Version-Release number of selected component (if applicable):
RHQ 4.5.0 master