Does the Bonita Community Version not support org.bonitasoft.engine.api.APIClient

Hello ,
I am trying to build a process using 
org.bonitasoft.engine.api.APIClient apiClient = new APIClient()

When I am testing the code with Bonita Studio , its working fine. 
But when I deploy the same bar file in Bonita Tomcat community version i am getting the below error.

Caused by: java.lang.ClassNotFoundException: com.bonitasoft.engine.api.APIAccessor
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1358)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
    at org.bonitasoft.engine.classloader.VirtualClassLoader.loadClass(VirtualClassLoader.java:95)
    at org.bonitasoft.engine.classloader.BonitaClassLoader.loadClass(BonitaClassLoader.java:175)
    at org.bonitasoft.engine.classloader.VirtualClassLoader.loadClass(VirtualClassLoader.java:93)
    at org.bonitasoft.engine.classloader.BonitaClassLoader.loadClass(BonitaClassLoader.java:175)
    at org.bonitasoft.engine.classloader.VirtualClassLoader.loadClass(VirtualClassLoader.java:93)
    at org.bonitasoft.engine.expression.impl.ReturnTypeChecker.getClazz(ReturnTypeChecker.java:105)
    at org.bonitasoft.engine.expression.impl.ReturnTypeChecker.checkReturnType(ReturnTypeChecker.java:79)
    ... 31 more

Hi,

A process design with a community version should not reference com.bonitasoft.* classes.
You can replace them with the org.bontasoft.* equivalent (at least for the APIAccessor)

HTH
Romain

Hey Romain

I rechecked my code. I am not using com.bonitasoft . But I have a subscription based Bonita Studio.
I am deploying the code in a Community Tomcat version.

 

import org.bonitasoft.engine.identity.ContactDataCreator

import org.bonitasoft.engine.identity.ContactDataCreator

import org.bonitasoft.engine.api.IdentityAPI
import org.bonitasoft.engine.api.LoginAPI
import org.bonitasoft.engine.api.APIClient
import org.bonitasoft.engine.identity.User
import org.bonitasoft.engine.identity.UserCreator
import org.bonitasoft.engine.search.SearchOptionsBuilder
import org.bonitasoft.engine.search.SearchResult
import org.bonitasoft.engine.session.APISession


// First of all, let's log in on the engine:
org.bonitasoft.engine.api.APIClient apiClient = new APIClient()
apiClient.login("install", "install")


def identityAPI = apiAccessor.getIdentityAPI()
// create complex user
UserCreator creator = new UserCreator(userName, password)
creator.setFirstName(firstname).setLastName(lastname)
ContactDataCreator proContactDataCreator = new ContactDataCreator().setAddress(address).setCity(city).setPhoneNumber(phonenumber).setEmail(emailId)
creator.setProfessionalContactData(proContactDataCreator)
final User user2 = identityAPI.createUser(creator)

You should double check in the process expressions.
When an apiAccessor is used, the enterprise version inject a com.bonitasoft.engine.api.APIAccessor in the expression dependencies. You must change this to org.bonitasoft.engine.api.APIAccessor if you want to execute it in Community (either by replacing it directly in .proc file or editing the expression using the Community Studio).

HTH
Romain