This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 167382 - Software as a Service Plugin won't deactivate
Summary: Software as a Service Plugin won't deactivate
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Platform (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords:
: 162962 178463 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-19 17:11 UTC by ekartzma
Modified: 2010-08-21 03:42 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ekartzma 2009-06-19 17:11:03 UTC
Found in 6.7 RC3

When I check the box next to "Software as a Service" and press the Deactivate button, I am told I need to restart to
have it deactivate.  When I restart the IDE and check the Plugins dialog, it still has the green checked circle
indicating that it is active.  I don't see any errors that would indicate a problem...
Comment 1 ekartzma 2009-06-19 17:12:14 UTC
Forgot to mention, all other plugins that I have tried to deactivate, do so upon restart without issue.
Comment 2 Egor Ushakov 2010-05-26 10:10:58 UTC
still valid in 6.9 RC1
Comment 3 Egor Ushakov 2010-05-26 10:11:20 UTC
*** Bug 178463 has been marked as a duplicate of this bug. ***
Comment 4 Milan Kuchtiak 2010-05-27 13:35:02 UTC
BTW Java Profiler has the same problem.

I found the reason for this:

the module websvc.saas.kit specifies the "OpenIDE-Module-Provides" manifest entry:
OpenIDE-Module-Provides: org.netbeans.modules.websvc.saas.kit

and the java.kit module specifies "OpenIDE-Module-Recommends":

OpenIDE-Module-Recommends: org.netbeans.modules.profiler,
    org.netbeans.modules.gsf,
    org.netbeans.modules.websvc.saas.kit,
    org.netbeans.modules.websvc.saas.codegen.java

This way java.kit activation triggers saas.kit activation (as well as the Java Profiler activation).

May be the module system should handle these relationships.

See also J.Tulach's changes:
http://hg.netbeans.org/main/rev/4818035ef955
Comment 5 dlipin 2010-05-27 13:41:18 UTC
See also Issue #162962 which says that autoupdate can't deactivate recommended module.
Comment 6 Jesse Glick 2010-05-27 13:46:06 UTC
Module system is behaving as documented. If you don't want enablement of java.kit to imply enablement of profiler etc. (when present), then delete the OpenIDE-Module-Recommends clause. This header should likely never be used with reference to other kits, and I'm not sure why it was there to begin with.
Comment 7 Jesse Glick 2010-05-27 13:46:55 UTC
*** Bug 162962 has been marked as a duplicate of this bug. ***
Comment 8 Tomas Zezula 2010-06-04 12:18:11 UTC
OK, I can remove it. But what is the reason why the java.kit was recommending the org.netbeans.modules.websvc.saas.codegen.java? I don't believe that it was not intentionally.

The change log introducing it:
changeset:   121517:4818035ef955
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Sat Mar 14 09:43:43 2009 +0100
summary:     Making java cluster dependant only on ide and platform. To do that I needed 
to add few provides/recommends dependencies. The most strange one is turning websvc.saas.
codegen.java into autoload and websvc.saas.codegen recommending it. Hopefully this will w
ork.

Jarda should explain why he needed the strange deps.
Comment 9 Jaroslav Tulach 2010-06-04 15:58:36 UTC
Well, it is not that strange. The Java SE distribution seems to contains also websvc cluster. The primary question is: Should it contain this cluster or not?

If the answer is yes, it should. Then FoD tries to mimic this dependency. E.g. as soon as you activate anything from JavaSE distribution, it tries to activate the whole JavaSE distribution. 

However we still want java cluster to be independent on anything else. Hence the recommend tag in manifest. It is just recommendation, nothing will fail in case websvc cluster is missing.

Btw. why are you asking me? Have you really looked at
http://hg.netbeans.org/main-golden/rev/4818035ef955
Originally there was strong dependency of java.kit on websvc cluster. The changeset just made it voluntary. Find someone else to blame.
Comment 10 Tomas Zezula 2010-06-04 16:24:34 UTC
First Jardo, I don't blame you.
Why I was asking is that I got this issue and I didn't add the recommends there. As I understand from your description if I remove the org.netbeans.modules.websvc.saas.codegen.java as recommended the FoD will not activate the saas, right?
Comment 11 Jaroslav Tulach 2010-06-04 19:36:58 UTC
Right. Enabling java would not activate saas.
Comment 12 Tomas Zezula 2010-06-07 08:06:40 UTC
Thanks Jardo, this is why I've asked you.
It seems that I cannot disable the promotes dependency as the "Software as a Service" will not work.
Reassigning to Petr Jiricka to decide what he wants, (either the "Software as a Service" will be automatically enabled with java or user will be able to disable it while having java enabled).
Comment 13 Milan Kuchtiak 2010-06-08 08:13:05 UTC
It looks, the most rational solution would be to remove this kind of  dependency on websvc.saas (cannot speak for java.compiler dependency). I'll ask authors (the former REST guys) about the reason for this dependency.
Comment 14 Milan Kuchtiak 2010-06-08 08:16:16 UTC
> cannot speak for java.compiler dependency

I've meant java.profiler (issue 162962)
Comment 15 Tomas Zezula 2010-06-08 12:03:40 UTC
OK, I will remove it.
Thanks Milan.
Comment 16 Milan Kuchtiak 2010-06-09 08:48:49 UTC
This is the answer from Nam T. Nguyen:
====
I don't recall I did introduce the dependency.  My guess is that the dependency is there through indirect dependency from webservice kit.  Obviously java functionality dependency on saas.codegen is not desirable.
====

Originally, the java.kit -> websvc.kit dependency was introduced by p.Jiricka (issue 157040). Anyway, I haven't found a reason for this. IMO, the dependency isn't needed.

Or, we can wait for Peter to explain.
Comment 17 Tomas Zezula 2010-06-09 09:51:18 UTC
OK, I will wait for Petr.
Comment 18 Jesse Glick 2010-06-10 20:58:31 UTC
(In reply to comment #9)
> FoD tries to mimic this dependency. E.g.
> as soon as you activate anything from JavaSE distribution, it tries to activate
> the whole JavaSE distribution. 

If this is desired, it is a high-level feature that should be implemented in FoD. Somehow keep a list of "cluster recommendations" such as java -> profiler (etc.) and if enabling a base cluster due to a trigger, try to also enable the other cluster too, if it is installed. (You already enable all kits in a single cluster together if I understand correctly, so this is not a big conceptual change.) From the perspective of both the module system and Plugin Manager, Java Profiler (etc.) is a purely optional addition.

> the recommend tag in manifest. It is just recommendation, nothing will fail in
> case websvc cluster is missing.

Indeed; but the meaning of OIDE-M-R is that if the websvc cluster *is* present, and java.kit is enabled, websvc.saas.kit will be too. That is not the semantics you want here.

> http://hg.netbeans.org/main-golden/rev/4818035ef955
> Originally there was strong dependency of java.kit on websvc cluster. The
> changeset just made it voluntary.

This particular change in fact added deps, not changed the nature of deps, but it is true that there were analogous deps on other kits before.

Again my recommendation is that no kit ever -Recommend another kit; this tag may be used to pull in invisible modules only. (Could easily be checked by ValidateUpdateCenterTest.)
Comment 19 Jaroslav Tulach 2010-06-11 05:52:47 UTC
I believe that the basic problems are in "the meaning of OIDE-M-R is that if the websvc cluster *is* present, and java.kit is enabled, websvc.saas.kit will be too" 

Primarily the OIDE-M-R was invented for autoload modules. The primary meaning is to automatically enable autoload modules that provide the token if one wants it, but don't fail if there is no such module. 

Note1: In case a module providing token required by another OIDE-M-R is not autoload and is disabled, module system will not enable it (at least I hope).

Note2: kits are not autoloads.

The original description of the meaning is imho a derived interpretation of the primary meaning for purposes of autoupdate. It is indeed OK if enabling a module with OIDE-M-R enables modules providing that token if present. It is not OK if enabling OIDE-M-R means downloading module providing that token from the net. 

In the same lines: it is OK to disable module providing a token still OIDE-M-R by another module. Autoupdate shall allow it and module system shall respect it.
Comment 20 Tomas Zezula 2010-06-11 07:18:03 UTC
>it is OK to disable module providing a token still OIDE-M-R by another module.
Jardo, but this issue is about the fact that this does not work. When you disable the SaaS module (providing token) the java.kit (OIDE-M-R) reenables it.
Comment 21 Milan Kuchtiak 2010-06-11 08:02:09 UTC
> I believe that the basic problems are in "the meaning of OIDE-M-R is that if
the websvc cluster *is* present, and java.kit is enabled, websvc.saas.kit will
be too" 

Yes, you're right.

To explain:

websvc.saas.kit(cluster) contains functionality(modules) related to Services tab -> Web Services node, like
 - node contents, actions
 - code generation API - code that's generated into java/php/ruby sources after Drag&Drop (websvc.saas.codegen)

Modules from websvc.saas.kit are independent from modules from java.kit, and vice versa.

However, there is a module websvc.saas.codegen.java, implementing websvc.saas.codegen, that is in java cluster (not in java kit). Thus java cluster de-facto depends on websvc cluster.
Comment 22 Milan Kuchtiak 2010-06-11 08:22:25 UTC
I wanted to say that there is no sense for java.kit to trigger websvc.saas.kit activation.
What about the following entry in java.kit manifest: 
OpenIDE-Module-Recommends: org.netbeans.modules.websvc.saas.codegen.java
Should this be moved into some module from java.kit ?

I tend to agree with Jesse: Recommends tag shouldn't be used with kits.
Comment 23 Tomas Zezula 2010-06-17 21:19:15 UTC
Petre, can you explain the dependency?
Can we remove it?
Comment 24 Petr Jiricka 2010-06-18 07:50:20 UTC
I don't remember now why I added the dependency. I guess it can be removed.
Comment 25 Tomas Zezula 2010-06-18 07:57:24 UTC
OK, I am going to remove it.
Thanks Petre.
Comment 26 Tomas Zezula 2010-06-22 14:23:01 UTC
The OpenIDE-Module-Recommends removed as Jesse-Recommends.
jet-main 95090b0bb55e
Comment 27 Quality Engineering 2010-06-23 03:28:29 UTC
Integrated into 'main-golden', will be available in build *201006230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/95090b0bb55e
User: Tomas Zezula <tzezula@netbeans.org>
Log: #167382:Software as a Service Plugin won't deactivate
Comment 28 Jaroslav Tulach 2010-08-17 17:47:52 UTC
Removing 
OpenIDE-Module-Recommends: org.netbeans.modules.profiler,
 org.netbeans.modules.debugger.jpda.ui
from java.kit was probably not really good idea.


ergonomics#40b995a7f8ed
Comment 29 Jesse Glick 2010-08-17 19:05:41 UTC
(In reply to comment #28)
> Removing 
> OpenIDE-Module-Recommends: org.netbeans.modules.profiler,
>  org.netbeans.modules.debugger.jpda.ui
> from java.kit was probably not really good idea.

Why? These are both kit modules which depend on java.kit, so your change probably regressed this fix for the case of those two modules - i.e. you would not be able to disable Java Debugger or Profiler while leaving Java on.
Comment 30 Jesse Glick 2010-08-17 19:07:22 UTC
Maybe I should enhance ValidateModulesTest to verify that there are no kit-to-kit -Recommends deps? Or that kits do not recommend anything, since they could be recommending some invisible module depending on another kit?
Comment 31 Jaroslav Tulach 2010-08-18 09:15:10 UTC
(In reply to comment #29)
> > OpenIDE-Module-Recommends: org.netbeans.modules.profiler,
> >  org.netbeans.modules.debugger.jpda.ui
> i.e. you would
> not be able to disable Java Debugger or Profiler while leaving Java on.

Well, that is basically it. People who enable Java want Java Debugger and Profiler. If there is anything to fix, then we shall probably include java debugger and profiler into java.kit. They are natural part of Java support.
Comment 32 Jesse Glick 2010-08-18 16:39:03 UTC
(In reply to comment #31)
> People who enable Java want Java Debugger and Profiler.

Perhaps they do, but that should be left as an option. In the setup you just committed, these effectively do not function as independent kits at all, which is an anomalous state - Plugin Manager displays the apparent option to turn off e.g. Profiler but it will not actually work. Please revert this dangerous change until there is some consensus; otherwise I need to reopen this bug with a slightly different summary and assign to you.

> we shall probably include java debugger and profiler into java.kit.

At least the second part is impossible currently, as profiler is in a "higher" cluster.
Comment 33 Quality Engineering 2010-08-21 03:42:35 UTC
Integrated into 'main-golden', will be available in build *201008210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/40b995a7f8ed
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: Improving #167382: Continue to recommend org.netbeans.modules.profiler, org.netbeans.modules.debugger.jpda.ui