Resource in Addon jar-file not Isolated Between Plugins

Hi

We recently got a but report, where an admin page of another plugin showed content from our data. To our surprise, the resources or resource lookup wasn’t isolated between the plugin.

Our plugin has a ‘template/admin.vm’ in it’s jar for the admin panel. It is served in a Servlet.doGet via 'com.atlassian.templaterenderer.TemplateRenderer.render(“template/admin.vm”,…).
The other plugin also had a ‘template/admin.vm’ in their jar. When both plugins are installed, our template/admin.vm is served by the other plugin as well.
Note: I had to restart Confluence sometimes after installing the conflicting addons.

I’m not sure if this is some error on our side, expected behavior or a bug.

We’ll rename the resource to include our plugin key so that it is very unlikely to create a conflict in the future.

Hi Roman,

yes, this is a known behavior, that vm templates reside in a shared directory. The best approach is to use a namespace for your vm templates to avoid collision.

Best regards,
Robert

Thanks for the confirmation. We where not aware of this gotcha.

Yes, we moved our resource to our namespace =)