Uploaded image for project: 'Minyaa Suite'
  1. Minyaa Suite
  2. MYAA-1474

Minyaa Plugins can be disabled from the UPM

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Obsolete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Public
    • Labels:
      None
    • JIRA Release:
      6.2.x, 6.3.x

      Attachments

        Activity

        Hide
        vthoule Vincent Thoulé added a comment -

        An support request has been raised to Atlassian Developper team with follwing details :

        When trying tot disable a plugin v1, it fails with the error "org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate for 'xxxx'".

        After some search in JIRA source code and found this ....

        Before 6.2, the method ComponentModuleDescriptor.unregisterComponents() was :

            public void unregisterComponents(final MutablePicoContainer container)
            {
                // Check that we have classloaded the interface if required.
                if (interfaceClazzName != null && interfaceClazz == null)
                {
                    throw new PluginException("Cannot unregister component '" + interfaceClazzName + "' in plugin '" + getKey() +
                        "' because we haven't loaded the class. This means that this plugin has not been successfully enabled.");
                }
        
                if (container.getComponentAdapter(interfaceClazz) != null)
                {
                    container.unregisterComponent(interfaceClazz);
                }
                // TODO: Should this be in an else clause? It is probably harmless, but also pointless.
                container.unregisterComponent(getModuleClass());
            }
        

        Since 6.2, the method ComponentModuleDescriptor.unregisterComponents() is now :

            public void unregisterComponents(final MutablePicoContainer container)
            {
                // Check that we have classloaded the interface if required.
                if (interfaceClazzName != null && interfaceClazz == null)
                {
                    throw new PluginException("Cannot unregister component '" + interfaceClazzName + "' in plugin '" + getKey() +
                        "' because we haven't loaded the class. This means that this plugin has not been successfully enabled.");
                }
        
                if (container.getComponentAdapter(interfaceClazz) != null)
                {
                    container.removeComponent(interfaceClazz);
                }
                // TODO: Should this be in an else clause? It is probably harmless, but also pointless.
                container.addComponent(getModuleClass());
            }
        

        I did not invest more about the cause of this change (probably due to some change the Container), but it is strange that the last line :

        container.unregisterComponent(getModuleClass());

        is replaced by

        container.addComponent(getModuleClass());

        I am waiting for a return to confirm that it is a JIRA Bug.

        Show
        vthoule Vincent Thoulé added a comment - An support request has been raised to Atlassian Developper team with follwing details : When trying tot disable a plugin v1, it fails with the error "org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate for 'xxxx'". After some search in JIRA source code and found this .... Before 6.2, the method ComponentModuleDescriptor.unregisterComponents() was : public void unregisterComponents( final MutablePicoContainer container) { // Check that we have classloaded the interface if required. if (interfaceClazzName != null && interfaceClazz == null ) { throw new PluginException( "Cannot unregister component '" + interfaceClazzName + "' in plugin '" + getKey() + "' because we haven't loaded the class. This means that this plugin has not been successfully enabled." ); } if (container.getComponentAdapter(interfaceClazz) != null ) { container.unregisterComponent(interfaceClazz); } // TODO: Should this be in an else clause? It is probably harmless, but also pointless. container.unregisterComponent(getModuleClass()); } Since 6.2, the method ComponentModuleDescriptor.unregisterComponents() is now : public void unregisterComponents( final MutablePicoContainer container) { // Check that we have classloaded the interface if required. if (interfaceClazzName != null && interfaceClazz == null ) { throw new PluginException( "Cannot unregister component '" + interfaceClazzName + "' in plugin '" + getKey() + "' because we haven't loaded the class. This means that this plugin has not been successfully enabled." ); } if (container.getComponentAdapter(interfaceClazz) != null ) { container.removeComponent(interfaceClazz); } // TODO: Should this be in an else clause? It is probably harmless, but also pointless. container.addComponent(getModuleClass()); } I did not invest more about the cause of this change (probably due to some change the Container), but it is strange that the last line : container.unregisterComponent(getModuleClass()); is replaced by container.addComponent(getModuleClass()); I am waiting for a return to confirm that it is a JIRA Bug.
        Hide
        vthoule Vincent Thoulé added a comment - - edited

        Bug seems to be confirmed by Atlassian Dev. Relation.
        The Bug has been raised to Atlassian JIRA Team : JRA-40530.

        To follow...

        Show
        vthoule Vincent Thoulé added a comment - - edited Bug seems to be confirmed by Atlassian Dev. Relation. The Bug has been raised to Atlassian JIRA Team : JRA-40530 . To follow...

          People

          • Assignee:
            vthoule Vincent Thoulé
            Reporter:
            vthoule Vincent Thoulé
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: