Limit in number of users creating from an extension
Hey Geeks,
I was trying to create a set of users, from an custom extension created by me.
Inside a loop, I need to create n number of users.
Please see the code snippet;
for(int k=0; k < 3 ; k++) {
String userName = "testUser" + k;
services.CreateUser(userName, "Test Desc", null, "pwd");
}
The first user(testUser0) was created successfully in the first iteration.
But in next iterations testUser1 and testUser2 are not created in Thingworx.
The exception I am getting is ;
com.thingworx.common.exceptions.InvalidRequestException: User limit reached; Please Upgrade to Paid Version
at com.thingworx.system.managers.BaseManager.createEntity(BaseManager.java:211)
at com.thingworx.contentmanagement.ImportProcessor.processImport(ImportProcessor.java:456)
at com.thingworx.resources.entities.EntityServices.processImport(EntityServices.java:130)
at com.thingworx.resources.entities.EntityServices.CreateUser(EntityServices.java:395)
at com.test.CtsServiceThingTemplate.reloadPicassoDetails(CtsServiceThingTemplate.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:170)
at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:45)
at com.thingworx.things.async.AsyncHandler.run(AsyncHandler.java:42)
at java.lang.Thread.run(Thread.java:745)
Can anyone help on this?

