Backendless Support
 
Solved

Can't deploy business logic through Code Runner

Hey,

After a while on Backendless v3 I've decided to switch to V4.

I'm trying to deploy custom services and one handler.

As you can see from the log, when the Code Runner starts everything is OK. Also the services and handler shows at the Backendless panel as "in debug". When I run the build command it bumps the number of handlers to 2 (I still have only one) and then I'm unable to publish and deploy (running build command bump this counter every time).

In case of services I can do a workaround and just upload a jar file. The problem I've noticed here is that firstly I need to manually delete all services and then upload jar. Otherwise the old services won't be replaced.

Can this be fixed on my side?

  1. Listening for transport dt_socket at address: 5005
  2. [INFO] JDK from "JAVA_HOME" - /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
  3. [INFO] CodeRunner(tm) Backendless Debugging Utility
  4. [INFO] Copyright(C) 2017 Backendless Corp. All rights reserved.
  5. [INFO] Version: 4.0.b18 Build date: 2017-07-06T09:22:55Z
  6. [INFO] CodeRunner session is running for 2 hours and will be terminated on 07:17:35.454[UTC]
  7. [INFO] Registering runner on: 'https://api.backendless.com'
  8. [INFO] Application ID: '00D0941B-86A9-90A9-FFE0-BA830404AA00'
  9. [INFO] Secret key: 'secret key'
  10. [INFO] Runner successfully registered
  11. [INFO] Parsing event model...
  12. [INFO] Run dependency analyzer for app: 00D0941B-86A9-90A9-FFE0-BA830404AA00
  13. ClassPath: /<path_to_project>/libs/backendless.jar:/<path_to_project>/libs/servlet-api-2.5.jar
  14. [INFO] Analyze service: com.mbaas.service.PaymentsService
  15. [INFO] Analyze service: com.mbaas.service.PlayerService
  16. [INFO] Analyze service: com.mbaas.service.RoomService
  17. [INFO] Build successfully: 1 event handler and 0 timers and 3 services
  18. [INFO] Deploying model to server, and starting debug...
  19. [INFO] Model successfully deployed.
  20. [INFO] Waiting for events...
  21. build
  22. [INFO] Parsing event model...
  23. [INFO] Run dependency analyzer for app: 00D0941B-86A9-90A9-FFE0-BA830404AA00
  24. ClassPath: <path_to_project>/libs/backendless.jar:/<path_to_project>/libs/servlet-api-2.5.jar
  25. [INFO] Analyze service: com.mbaas.service.PaymentsService
  26. [INFO] Analyze service: com.mbaas.service.PlayerService
  27. [INFO] Analyze service: com.mbaas.service.RoomService
  28. [INFO] Build successfully: 2 event handlers and 0 timers and 3 services
  29. deploy
  30. [INFO] Deploying model to server, and starting debug...
  31. [ERROR] Event handler with specified parameters already exists
  32. publish
  33. [WARN] IMPORTANT! The business logic code will be deployed to model "default".
  34. Any business logic which is already deployed on the server in that model
  35. will be removed and replaced with the code from your current project.
  36. If this is an undesired behavior, stop now and set a different deployment model
  37. either by using the -model argument or changing the model name in runner.properties.
  38. Would you like to continue? (Y/N)
  39. Y
  40. [WARN] You should deploy your business logic first!

Leave a Comment

Comments (7)

photo
1

Hi Matt,

What exactly is the command you're executing? Is it `./CodeRunner.sh deploy`?

photo
1

Hi, at the beginning I'm executing just ./CodeRunner.sh, then as you can see from the log: build, deploy and publish.

photo
1

Could you try to compile the code and then execute

  1. ./CodeRunner.sh deploy

?

photo
1

Executing

  1. ./CodeRunner.sh deploy

works as expected - handlers and services are published.

photo
1

Wasn't this what you were trying to accomplish? :)

photo
1

That's true, thanks! Although this doesn't solve the problem with Code Runner :) Looks like there is some bug. It's not a big deal with your workaround.

photo
1

It just looks like you've been using the deprecated way of working with it (we do not have mentions of 'build' and 'publish' command in the documentation).

photo