Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Errror Creating bean with name 'userManager'

Hello everybody.

I'm currently developing a confluence Plugin, which need access to the Conflunece UserManager.

This worked the last weeks, but since 2 days im getting the following Exception:

Error creating bean with name 'userManager': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/springframework/osgi/context/internal/classloader/ChainedClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"


this is my atlassian-plugin.xml

<component-import key="userManager" interface="com.atlassian.sal.api.user.UserManager"/>
<component-import key="loginUriProvider" interface="com.atlassian.sal.api.auth.LoginUriProvider"/>


I'm accessing the UserManager through constructor DI

private BandanaManager manager;
private UserManager userManager;
private UserAccessor userAccessor;
public UsageClass(BandanaManager manager, UserManager userManager, UserAccessor userAccessor) {
    this.manager = manager;
    this.userManager = userManager;
    this.userAccessor = userAccessor;


I Have no idea where this error comes from.


I hope for some advice 

Lars Kölpin

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted

It seems like a new dependency 


 solved the issue

Sorry for the late reply, but it could help people facing this.

In my opinion, the error appeared after you added a dependency that brought it's own dependency, that overrides one or more of servlet api classes. This could be a networking library redefinind Request class, for example. In this case, the overriden class takes precendence over the class provided by servlet-api, and of course jira classes depending on it fail to load.

Adding the servlet-api dependency as a top-level class may solve you immediate problem, but it may break the networking api (if you added a networking api :) ), because its Request class will be overriden (or not, depending on how dependencies are managed, bundled or not).

To solve this, the cleanest way (provided you removed the dependency that introduced the problem), is to remove the target dependency and rebuild your plugin from scratch. 


Atlassian Community Events