Deploy of cloud code times out

Hello there, We are unable to deploy any Java cloud code to Backendless all of a sudden. We are able to run CodeRunner.sh without any issues and test our API services. But running Deploy.sh generates the following -

22:47:44.257 [INFO] DependencyAnalyzer |main| Analyze service: net.navstation.chartstore.chartworldservice

22:47:44.360 [INFO] DependencyAnalyzer |main| Analyze service: net.navstation.chartstore.fastspringservice

22:47:44.542 [INFO] c.b.c.d.DebuggerConsoleInterface |main| Build successfully: 0 event handlers and 0 timers and 2 services

22:47:44.543 [WARN] c.b.c.d.DebuggerConsoleInterface |main| IMPORTANT! The business logic code will be deployed to model “default”.

Any business logic which is already deployed on the server in that model

will be removed and replaced with the code from your current project.

If this is an undesired behavior, stop now and set a different deployment model

either by using the -model argument or changing the model name in runner.properties.

Would you like to continue? (Y/N)

y

22:47:47.778 [INFO] c.b.c.d.DebuggerConsoleInterface |main| Publishing 0 event handlers and 0 timers and 2 services to the server…

22:51:57.420 [ERROR] c.b.c.CodeRunnerLoader |main| Can not parse generic service: Failed to inspect service archive file.

RuntimeException: java.util.concurrent.ExecutionException: com.backendless.exceptions.BusinessLogicExecutionTimeoutException: Custom business logic execution has been terminated because it did not complete in permitted time - 243 seconds

Cause: ExecutionException

com.backendless.exceptions.BusinessLogicExecutionTimeoutException: Custom business logic execution has been terminated because it did not complete in permitted time - 243 seconds

Cause: BusinessLogicExecutionTimeoutException

Custom business logic execution has been terminated because it did not complete in permitted time - 243 seconds

22:51:57.422 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Debugging Utility disconnected successfully

22:51:57.423 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Thank you for using Backendless

hello @David_Pellecchia

could you please attach the project that we can use to reproduce the issue? If there is some sensitive data you can send us it as message to the staff like described in the topic If you are a customer with Managed or Pro installation and send the link to the message in this topic

Hi Sergey, I actually went back and downloaded the latest Backendless API sample service following the steps here → Basic Quick Start Guide - Developing Backendless Server Code with Java.
Now CodeRunner.sh also fails with the below error -
Error: LinkageError occurred while loading main class com.backendless.coderunner.CodeRunnerLoader
java.lang.UnsupportedClassVersionError: JVMCFRE199E bad major version 61.0 of class=com/backendless/coderunner/CodeRunnerLoader, the maximum supported major version is 55.0; offset=6

I tried with Eclipse OpenJ9 VM 11.0.16.1 (build openj9-0.33.1, JRE 11 Mac OS X amd64-64-Bit Compressed References 20220817_454 (JIT enabled, AOT enabled) and with openjdk version “14.0.2” 2020-07-14. Both fail. Your docs say any JDK above version 8 will do.

What JDK should I use?

-TY

Hi @David_Pellecchia

Thank you for trying different JDK versions. We apologize for any confusion caused by our documentation. To ensure compatibility and optimal performance, we recommend using Java 17 for our system. Using Java 17 should resolve the issues you encountered.

If you have any further questions or need assistance, please feel free to ask.

Regards,
Viktor

Hi Viktor, Maybe bad karma but its one error after another …

Switched to Java 17 and ran CodeRunner.sh on the sample, here is what I get -

Listening for transport dt_socket at address: 5005

00:27:59.396 [INFO] c.b.c.CodeRunnerLoader |main| Local Date and Time: 2023-06-17T00:27:59.395869

00:27:59.400 [INFO] c.b.c.CodeRunnerLoader |main| JDK from “JAVA_HOME” - /Users/sb/z-mbp/java/jdk-17.0.7.jdk/Contents/Home

00:27:59.452 [INFO] c.b.c.CommandLineProcessor |main| CodeRunner™ Backendless Debugging Utility

00:27:59.452 [INFO] c.b.c.CommandLineProcessor |main| Copyright(C) 2023 Backendless Corp. All rights reserved.

00:27:59.452 [INFO] c.b.c.CommandLineProcessor |main| Build date: 2023-06-09T08:49:07Z

Version: 7.0.1.20

Build id: 242421

VCS revision: 804b84abdb51ce4cff4118299df84ecb1ce79be3

00:27:59.453 [INFO] c.b.c.CommandLineProcessor |main| CodeRunner session is running for 2 hours and will be terminated on 02:27:59.453104[UTC]

WARNING: A terminally deprecated method in java.lang.System has been called

WARNING: System::setSecurityManager has been called by com.backendless.coderunner.runtime.security.Security (file:/Users/sb/z-mbp/z-msh/2023-backendless-cloudcode-test/NavStation/bin/CodeRunner.jar)

WARNING: Please consider reporting this to the maintainers of com.backendless.coderunner.runtime.security.Security

WARNING: System::setSecurityManager will be removed in a future release

00:27:59.580 [INFO] c.b.h.HealthCheckHttpServer |main| Management port is absent, management server not started

00:27:59.581 [INFO] c.b.coderunner.LocalCodeRunner |main| Registering runner on: ‘https://api.backendless.com

00:27:59.581 [INFO] c.b.coderunner.LocalCodeRunner |main| Application ID: ‘323F3506-11F1-4D64-AA2D-B705C479FE26’

00:27:59.581 [INFO] c.b.coderunner.LocalCodeRunner |main| Api key: ‘8F5A741A-BA3C-47E9-8C79-90FF7ACB2C34’

00:28:00.328 [INFO] c.b.coderunner.LocalCodeRunner |main| Runner successfully registered

00:28:00.337 [INFO] c.b.c.parser.EventModelParser |main| Parsing event model…

[WEBORB INFO] Loading local(non-cloud) configuration.

[WEBORB ERROR] unable to find weborb-acl.xml. make sure the file is available in WEB-INF directory of the web application

Exception in thread “main” java.lang.IncompatibleClassChangeError: Method ‘com.backendless.Messaging com.backendless.Messaging.getInstance()’ must be InterfaceMethodref constant

at com.backendless.Backendless.(Backendless.java:76)

at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)

at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)

at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:42)

at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:185)

at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1132)

at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1113)

at java.base/java.lang.reflect.Field.get(Field.java:425)

at com.backendless.coderunner.runtime.task.CustomServiceParserTask.(CustomServiceParserTask.java:69)

at com.backendless.coderunner.parser.DebugHostedServiceParser.parseServiceModel(DebugHostedServiceParser.java:30)

at com.backendless.coderunner.debugger.BusinessLogicDebugger.build(BusinessLogicDebugger.java:85)

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:48)

at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.java:35)

Please help !!!

Hi. Could you show the listing of the libs directory?
It could be that you faced one bug which was fixed recently.
The last SDK version is 7.0.4.
If you see 7.0.3 or less, please download again the project from our site or change the version in pom.xml if you use maven.

If the error still present (event after you do what described above), we’ll need your project for deeper investigation.

Hi Oleg, After quite a bit of analysis, this is what I am observing -

Our JAVA cloud code uses four libraries - jackson-core-2.13.0.x.jar, jackson-databind-2.13.0.x.jar, jackson-annotations-2.13.0.x.jar and commons-net-3.9.0.jar.

When I run bin/CodeRunner.sh everything works perfectly fine.

However when I run bin/Deploy.sh, the deploy timesout with this error. Notice that it only scans the jackson jar files not the commons-net. And the deploy just hangs and times out. The problem seems to be related to commons-net but not clear what the issue is.

Any pointers?

[WEBORB INFO] Loading local(non-cloud) configuration.
[WEBORB ERROR] unable to find weborb-acl.xml. make sure the file is available in WEB-INF directory of the web application
01:07:27.495 [INFO] c.b.c.runtime.ServiceParser |main| Scan file: '../libs/jackson-core-2.13.0.x.jar'
01:07:27.530 [INFO] c.b.c.runtime.ServiceParser |main| Scan file: '../libs/jackson-databind-2.13.0.x.jar'
01:07:27.705 [INFO] c.b.c.runtime.ServiceParser |main| Scan file: '../libs/jackson-annotations-2.13.0.x.jar'
01:07:27.720 [INFO] c.b.c.runtime.ServiceParser |main| In target directory '../libs' present 3 jar files: [jackson-core-2.13.0.x.jar, jackson-databind-2.13.0.x.jar, jackson-annotations-2.13.0.x.jar]
01:07:27.720 [INFO] c.b.c.r.t.CustomServiceParserTask |main| Service classes size from libs: 0
01:07:27.726 [INFO] c.b.c.r.t.CustomServiceParserTask |main| Service classes size from classes: 3
01:07:27.727 [INFO] c.b.c.r.t.CustomServiceParserTask |main| Run dependency analyzer for app with appId=[323F3506-11F1-4D64-AA2D-B705C479FE26]
ClassPath: /Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/jackson-core-2.13.0.x.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/java-sdk-common-7.0.4.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/jackson-databind-2.13.0.x.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/commons-net-3.9.0.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/servlet-api-2.5.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/commons-6.7.5.0.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/jackson-annotations-2.13.0.x.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/weborbclient-5.2.0.8.jar:/Users/bswami/z-mbp/z-msh/2023-3-cloudcode/navstation-macenc/libs/java-client-sdk-7.0.4.jar
01:07:27.728 [INFO] DependencyAnalyzer |main| Analyze service: net.navstation.chartstore.chartworldservice
01:07:27.816 [INFO] DependencyAnalyzer |main| Analyze service: net.navstation.chartstore.fastspringservice
01:07:27.844 [INFO] DependencyAnalyzer |main| Analyze service: com.navstation.TestCloudCode
[WEBORB INFO] Loading local(non-cloud) configuration.
[WEBORB ERROR] unable to find weborb-acl.xml. make sure the file is available in WEB-INF directory of the web application
01:07:28.354 [INFO] c.b.c.d.DebuggerConsoleInterface |main| Build successfully: 0 event handlers and 0 timers and 3 services
01:07:28.355 [WARN] c.b.c.d.DebuggerConsoleInterface |main| IMPORTANT! The business logic code will be deployed to model "default".
Any business logic which is already deployed on the server in that model
will be removed and replaced with the code from your current project.
If this is an undesired behavior, stop now and set a different deployment model
either by using the -model argument or changing the model name in runner.properties.
Would you like to continue? (Y/N)
y
01:07:35.404 [INFO] c.b.c.d.DebuggerConsoleInterface |main| Publishing 0 event handlers and 0 timers and 3 services to the server… 
01:11:42.453 [ERROR] c.b.c.CodeRunnerLoader |main| Can not parse generic service: Failed to inspect service archive file.
RuntimeException: java.util.concurrent.ExecutionException: com.backendless.exceptions.BusinessLogicExecutionTimeoutException: Custom business logic execution has been terminated because it did not complete in permitted time - 243 seconds
Cause: ExecutionException
com.backendless.exceptions.BusinessLogicExecutionTimeoutException: Custom business logic execution has been terminated because it did not complete in permitted time - 243 seconds
Cause: BusinessLogicExecutionTimeoutException
Custom business logic execution has been terminated because it did not complete in permitted time - 243 seconds
01:11:42.454 [WARN] c.b.coderunner.LocalCodeRunner |Thread-0| Please wait. Stopping all running tasks and started threads, and freeing resources.
01:11:42.455 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Debugging Utility disconnected successfully
01:11:42.455 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Thank you for using Backendless

It is hard to make a conclusion when the problem related to third-party libraries. Could you, please, provide the entire project (link on archive on google drive, e.g.). I’ll try to check what goes wrong.

Hi I sent you a message. Need a way to securely share the project with you. Pls let us know. TY.

@David_Pellecchia ,

We are terribly sorry for such long delay. It seems that your email with source code cannot be found at support@backendlessmail.com. Could you send it one more time if this problem is still actual for you?

Regards, Andriy