Dependencies in cloud code java project

Hello,

I downloaded the java project template from backendless console to deploy custom API services in backendless and I’m asking how to deal with dependencies of the project.

There are already some dependencies inside the lib folder : backendless.jar, servlet-api-2.5.jar.

But what if I want to use java-client-sdk-7.0.1.jar (because it contains some bug fixes compared to the backendless.jar which is the 6.3.6 version) ? Should I delete backendless.jar or keep backendless.jar ? What I noticed is that when I replace backendless.jar by java-client-sdk-7.0.1.jar the following error occured when I run the CodeRunner.bat script:

13:47:23.289 [ERROR] c.b.c.runtime.CodeExecutor |main| Can't set AppData for ApiCalls.
java.lang.NoSuchFieldException: isCodeRunner
        at java.base/java.lang.Class.getDeclaredField(Class.java:2411)
        at com.backendless.coderunner.runtime.CodeExecutor.initAppData(CodeExecutor.java:141)
        at com.backendless.coderunner.runtime.CodeExecutor.init(CodeExecutor.java:117)
        at com.backendless.coderunner.runtime.executor.CodeExecutorFactory.createDebugExecutor(CodeExecutorFactory.java:22)
        at com.backendless.coderunner.runtime.executor.CodeExecutorHolder.createDebugExecutor(CodeExecutorHolder.java:64)
        at com.backendless.coderunner.debugger.BusinessLogicDebugger.build(BusinessLogicDebugger.java:57)
        at com.backendless.coderunner.debugger.InstructionsFetcher.executeCommandSafe(InstructionsFetcher.java:30)
        at com.backendless.coderunner.LocalCodeRunner.listenForServiceMessages(LocalCodeRunner.java:73)
        at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:45)
        at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.java:32)

Could you explain to me how to deal with the different backendless jars ? Moreover should I update the runner.properties in bin folder to change the “system.services.exclude.jar” property ?

Thank you

Hi, @Seb777

I have created an internal ticket - BKNDLSS-31967 to fix the issue. As we need time to fix, check and release the changes, you can do the following. Use java-client-sdk-7.0.1.jar, then update the following dependencies yourself:

  • backendless-commons
  • sdk-commons
  • weborb

The required dependencies can be found in the Backendless Maven Repository:

https://mvnrepository.com/artifact/com.backendless

Regards,
Marina