echocat / adam

Addon which enhances all user profiles of confluence. It also adds an advanced people directory. The whole addon is configurable by means of an XML, can be localized, supports Velocity templates and supports view and edit restrictions.
https://adam.echocat.org
GNU Lesser General Public License v3.0
11 stars 15 forks source link

echocat adam breaks another add-ons actions #66

Open dpashkevich opened 7 years ago

dpashkevich commented 7 years ago

Hi, I work for Lucid Software, and we have this Confluence add-on. Recently we received several reports ouf our add-on breaking for no apparent reason. Turns out that the echocat adam is somehow causing our add-on's xwork actions to stop working.

Steps to reproduce:

  1. Install the Lucidchart OnPrem for Confluence Server add-on, generate a trial license if needed
  2. Edit a confluence page, insert a Lucidchart diagram macro, save the page
  3. Install this (echocat adam) add-on. Leave all the configuration to default
  4. Navigate to a page that contains a Lucidchart diagram, observe this: image

You can see from the exception that suddenly our add-on's xwork actions stop working:

java.lang.RuntimeException: action method [ null ] not found on [ com.lucidchart.onprem.confluence.actions.Viewer ]
    at com.atlassian.confluence.xwork.HttpMethodValidationInterceptor.intercept(HttpMethodValidationInterceptor.java:76)
caused by: java.lang.NoSuchMethodException: Unable to load action: com.lucidchart.onprem.confluence.actions.Viewer
    at com.opensymphony.xwork.config.entities.ActionConfig.getMethod(ActionConfig.java:115)

I attached a full stack trace: lucidchart-actions-broken.log.txt

I can see from adam's source code that the add-on messes with xwork actions, can you please advise on what might be causing the issue? Have you received similar reports before?

Thanks, Dmitry

dpashkevich commented 7 years ago

Forgot to mention that we were able to reproduce this in Atlassian Confluence 5.7.6, but this doesn't seem specific to a Confluence version. We have reports of the issue from Confluence 5.10.7 as well.

blaubaer commented 7 years ago

Hi @dpashkevich!

Thank for your report. I will try to reproduce this - but I never noticed such problems before. I hopefully can investigate this problem within the demo phase of your plugin. ;-)

Thanks, Gregor

dpashkevich commented 7 years ago

Wow, thanks for a fast response Gregor!

Yes it's weird that so far this only seems to be affecting our add-on, but the good thing is that the issue is easily reproducible.

Also, it's peculiar that in order to "fix" our add-on, one has to not just uninstall the echocat adam add-on, but also clear Confluence's plugin cache and restart Confluence.

dpashkevich commented 7 years ago

Hi Gregor,

have you had a chance to look at the issue?

blaubaer commented 7 years ago

Hi @dpashkevich,

yes but until now I'am not really able to reproduce this issue - but I'am still on it.

dpashkevich commented 7 years ago

Can you share your set up and the steps you're performing, @blaubaer ?

dpashkevich commented 7 years ago

Hi @blaubaer, anything I can do to help repro the issue?

dpashkevich commented 7 years ago

Hey @blaubaer any progress on the issue? We are still affected

QuentinMonteyne commented 7 years ago

Hi @blaubaer I'm the customer affected. We've been using EchocatAdam, and still need it. However, this is blocking an important development for us. Do you have any timeframe on this? Do you need any help reproducing the issue? Do you have any plans of releasing a paid version of Echocat Adam? I understand this is a free plugin so support isn't necessarily guaranteed, but we're a bit stuck here ;-)

thx! Quentin

blaubaer commented 7 years ago

Hi @dpashkevich! I tried to reproduce this issue and it takes me some time. Right now I can reproduce this issue but I cannot find the cause. The only fancy thing adam does is that it hooks into the com.atlassian.crowd.directory.loader.LDAPDirectoryInstanceLoader across the boarders of the OSCGi system.

It also modifies the org.randombits.confluence.conveyor.ConveyorListener for its own display of some modules (sites):

Do your plugin hooks itself in one/some of this sites?

/ Gregor

dpashkevich commented 7 years ago

Thanks for investigating Gregor!

Our add-on doesn't depend on org.randombits in any way and does not do anything with the modules you listed.

It seems as if like something causes the ConveryorListener to break something inside the XWork action configuration. Not sure why it only appears to affect our add-on.

Here's a fragment of plugin.xml that defines the Viewer action that fails to load:

    <xwork name="Lucidchart Core Actions" key="lucid-core-actions">
        <package name="lucidchart-onprem" extends="default" namespace="/plugins/lucidchart-onprem">
            <action name="insertDiagram" class="com.lucidchart.onprem.confluence.actions.InsertDiagram">
                <result name="success" type="velocity">/templates/insertDiagram.vm</result>
            </action>
            <action name="duplicateDocument" class="com.lucidchart.onprem.confluence.actions.DuplicateDocument">
                <result name="success" type="velocity">/templates/insertDiagram.vm</result>
            </action>

            <!-- THIS ACTION FAILS TO LOAD 
                 with java.lang.RuntimeException: action method [ null ] not found on [ com.lucidchart.onprem.confluence.actions.Viewer ]
                when echocat adam is installed.
            -->
            <action name="viewer" class="com.lucidchart.onprem.confluence.actions.Viewer">
                <result name="success" type="velocity">/templates/viewer.vm</result>
            </action>

            <action name="editor" class="com.lucidchart.onprem.confluence.actions.Editor">
                <result name="success" type="velocity">/templates/chart-editor.vm</result>
                <result name="login" type="redirect">/confluence/login.action</result>
                <result name="relog" type="velocity">/templates/relog-page.vm</result>
                <result name="expired" type="velocity">/templates/expired.vm</result>
            </action>

            <action name="getImageAttachments" class="com.lucidchart.onprem.confluence.actions.GetImageAttachments">
                <result name="success" type="velocity">/templates/imageAttachments.vm</result>
            </action>
        </package>
    </xwork>

The viewer class definition doesn't look anything special

package com.lucidchart.onprem.confluence.actions;
// ...

public class Viewer extends ConfluenceActionSupport {
    public Viewer(...) {...}
    public String execute() throws Exception {...}
   // other methods
}

Rings any bells?

Siddaraju12 commented 7 years ago

Hey buddies

I am facing an issue in accessing LucidChart onprem macro through java code which is required to post the visio image into confluence. I am using Lucid chart plugin for the first time.

Can somebody help me with java code that uses MacroManager, Macro and the related classes that are used to fetch the visio attachment links.

dpashkevich commented 7 years ago

@Siddaraju12 please send an email to support@lucidchart.com, make sure to provide a detailed description of the issue (what steps are you performing, what you're seeing, attach screenshots and server logs).

QuentinMonteyne commented 7 years ago

Dear Gregor, @blaubaer

have you had any time to look further into this? we're still locked down due to this, and it's really frustrating to have to choose between these two great add-ons ...

please also review my previous comment .... I stand by it! If you release a paid version, we'll gladly pay for support, but I really need this one fixed ....

thx, Quentin