Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot use class UserCountServiceImpl in Script runner.

Rafał Żydek
Contributor
March 9, 2020

I need to get count of active licensed users.

I try to use: UserCountServiceImpl

https://docs.atlassian.com/ConfluenceServer/javadoc/6.13.0/com/atlassian/confluence/license/rest/service/UserCountServiceImpl.html but getting import error:

 

import com.atlassian.confluence.license.rest.service.UserCountServiceImpl

 

Unable to resolve class.

2 answers

1 accepted

1 vote
Answer accepted
Rafał Żydek
Contributor
March 11, 2020

I've workaround to get licensed user number:

def usedLicense =userAccessor.countLicenseConsumingUsers().toString().

0 votes
Moses Thomas
Community Champion
March 9, 2020

@Rafał Żydek   To fix your problem  Rest API  package, try/ replace it with the below line

import com.atlassian.confluence.license.rest.service.*

 I was looking for the  license rest plugin for Confluence 7.1.0  here,  https://mvnrepository.com/artifact/com.atlassian.confluence.plugins/confluence-license-rest   

I could not find, may be it has not been updated for the latest Conf version

the last version was Conf 5.9x. But  i tried imported the package in  Conf 7.1.0 and the error disappears.

 

Best regards,

MO

Rafał Żydek
Contributor
March 10, 2020

@Moses Thomas 

 

I've tried this also. Import package is fine, but I can't use this class.

 

classimport problem.png 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
6.13
TAGS
AUG Leaders

Atlassian Community Events