Backendless Standalone Business Logic

So I’ve gone through the various fixes I’ve found in the forum like this one http://support.backendless.com/t/business-logic-on-standlone-backendless I’ve gotten to the point where my event handler deploys to the server but never returns anything. I’m just trying to get it to work so right now I just have it create a map put in a single object and return it. The response comes back right away every time but with an empty map.

I’m using a Server setup by Bitnami on Google Cloud Platform.
I create a custom event handler and download the zip.
Open the project in Intelli J, add the code, compile the event handler and bootstrap.
Update runner.properties to the correct values.
Replace everything but runner.properties with the code runner from this link https://backendless.com/downloads/

Doing these allows the code to show up in the debug and let’s me deploy them but the code always comes back with an empty map.

I was also wondering whether the weborb.jar file should be left there or not.

I changed the execution time like this comment suggested http://support.backendless.com/t/business-logic-on-standlone-backendless#comment-6593 but I think that only effects deploy.

What I get when I takeout the weborb.jar
Listening for transport dt_socket at address: 5005
[INFO] CodeRunner™ Backendless Debugging Utility
[INFO] Copyright© 2016 Backendless Corp. All rights reserved.
[INFO] Version: 3.0.0 Build date: 20160125-0901
[INFO] CodeRunner session is running for 2 hour and will be terminated on 16:43:11.839[UTC]

[INFO] Registering runner on: http://###.###.###.###:80/api with secretKey: 167CF6ED-####-####-####-535205337F00
[INFO] Runner successfully registered
[INFO] Parsing event model…
[INFO] Build successfully: EventModel{timers=0, eventHandlers=1}
[INFO] Deploying model to server, and starting debug…
[INFO] Model successfully deployed…

[INFO] Waiting for events…

What I get when I leave in weborb.jar
Listening for transport dt_socket at address: 5005
[INFO] CodeRunner™ Backendless Debugging Utility
[INFO] Copyright© 2016 Backendless Corp. All rights reserved.
[INFO] Version: 3.0.0 Build date: 20160125-0901
[INFO] CodeRunner session is running for 2 hour and will be terminated on 16:46:30.071[UTC]

[INFO] Registering runner on: http://###.###.###.###:80/api with secretKey: 167CF6ED-####-####-####-535205337F00
[INFO] Runner successfully registered
[INFO] Parsing event model…
[WEBORB ERROR, Thread-26, 02:12:16 02:46:33] Unable to register invocation handler with class name weborb.handler.HibernateHandler due to exception: org/hibernate/Session
[WEBORB ERROR, Thread-26, 02:12:16 02:46:33] Hibernate wasn’t found. Hibernate Service Browser and Handler won’t be working
[INFO] Build successfully: EventModel{timers=0, eventHandlers=1}
[INFO] Deploying model to server, and starting debug…
[INFO] Model successfully deployed…

[INFO] Waiting for events…

Also the coderunner logs I found on the server that I’m not sure when they’re from

[WEBORB ERROR, Thread-1, 02:11:16 04:01:30] Unable to register invocation handler with class name weborb.handler.HibernateHandler due to exception: org/hibernate/Session[WEBORB ERROR, Thread-1, 02:11:16 04:01:30] Hibernate wasn’t found. Hibernate Service Browser and Handler won’t be working[WEBORB EXCEPTION, Thread-1, 02:11:16 04:01:30] Unable to configure WebORB cluster in EC2java.lang.NoClassDefFoundError: com/amazonaws/services/s3/AmazonS3 at weborb.config.AmazonConfig.getData(AmazonConfig.java:40) at weborb.config.AmazonConfig.configureCluster(AmazonConfig.java:93) at weborb.config.AmazonConfig.configure(AmazonConfig.java:77) at weborb.config.ORBServerConfig.init(ORBServerConfig.java:200) at weborb.config.ORBServerConfig.<init>(ORBServerConfig.java:106) at weborb.config.ORBServerConfig.getORBConfig(ORBServerConfig.java:255) at weborb.config.ORBServerConfig.getORBConfig(ORBServerConfig.java:270) 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:497) at weborb.config.ORBConfig.getORBConfig(ORBConfig.java:58) at weborb.types.Types.getServerTypeForClientClass(Types.java:185) at weborb.reader.NamedObject.<init>(NamedObject.java:56) at weborb.reader.jsonrpc.ObjectReader.read(ObjectReader.java:132) at weborb.protocols.jsonrpc.JsonRequestParser.read(JsonRequestParser.java:57) at weborb.protocols.jsonrpc.JsonRequestParser.readJSON(JsonRequestParser.java:38) at weborb.util.io.Serializer.fromBytes(Serializer.java:172) at com.backendless.coderunner.processor.ServiceMessageProcessor.onMessage(ServiceMessageProcessor.java:30) at redis.clients.jedis.BinaryJedisPubSub.process(BinaryJedisPubSub.java:102) at redis.clients.jedis.BinaryJedisPubSub.proceed(BinaryJedisPubSub.java:80) at redis.clients.jedis.BinaryJedis.subscribe(BinaryJedis.java:2929) at com.backendless.coderunner.CodeRunner.start(CodeRunner.java:124) at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.java:67)Caused by: java.lang.ClassNotFoundException: com.amazonaws.services.s3.AmazonS3 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) … 24 more^[[1;31m[ERROR]^[[0;39m [Worker] exception timeout value is negativejava.lang.IllegalArgumentException: timeout value is negative at java.lang.Thread.join(Thread.java:1240) ~[na:1.8.0_65] at com.backendless.coderunner.runtime.pool.Worker.run(Worker.java:57) ~[CodeRunner.jar:na]^[[1;31m[ERROR]^[[0;39m [Worker] exception timeout value is negativejava.lang.IllegalArgumentException: timeout value is negative at java.lang.Thread.join(Thread.java:1240) ~[na:1.8.0_65] at com.backendless.coderunner.runtime.pool.Worker.run(Worker.java:57) ~[CodeRunner.jar:na]

I’ve spent more time then I’d care to admit on this and I had business logic working on Backendless Cloud before switching to standalone. Would really appreciate some help.

Thanks.

You guys should make it so you can edit posts. That whole post can be ignored. I’m now where this guy was http://support.backendless.com/t/business-logic-on-standlone-backendless#comment-6558 where it’ll work and debug and not deploy. I had ssh’d in and changed the value. But it still wasn’t working. So I thought the server might have to restart to refresh the value or something and now I’m stuck with the “Server Temporarily Unavailable” screen for the last 10 minutes.

Also I don’t know if I updated the value wrong. I went in and tried to edit it but it said it was read only so I used the “:w !sudo tee %” command to write it anyways.

I’ll update with anything new.

So I guess I should have used the Bitnami script to restart instead of restarting the whole server. I have two backendless machines going for comparison. When the entire server is restarted everything is able to start again except the Play-server. It reports it’s status as not running and running scripts to stop/start/restart don’t do anything. Also I tried restarting both servers to compare and they both don’t have Play-server running but have different screens when trying to log in http://imgur.com/a/CehFn.

Hi Matthew,

Regarding editing posts, do you see this icon for your posts:
http://support.backendless.com/public/attachments/310b091a6c36d550d067f7db1491f20b.png&lt;/img&gt;

As for troubleshooting of the installation, there should be a log file in: install_dir/apps/backendless/htdocs/play-logs/*
Please check for the log files and send them to support@backendless.com (or attach to this post as a zip archive).

Here’s additional information on troubleshooting Standalone Backendless errors:
https://wiki.bitnami.com/Applications/Bitnami_Backendless_Enterprise#How_to_debug_Standalone_Backendless_errors.3f

Regards,
Mark

No I don’t have that.http://support.backendless.com/public/attachments/16f45bbe59401219faa67252d60f3f0a.PNG&lt;/img&gt;

Just to note those servers are still down. You can close this thread I’ll email those files to you now.

Hello,

Was this finally resolved? I am having the same issue with Backendless Standalone installed on my Mac.

Dimitris,

There is an updated build of CodeRunner on our website (v 3.0.9). When you download it, make sure to make the following changes in the bin/runner.properties file to point CodeRunner to your Standalone installation (replace STANDALONE-BACKENDLESS-IP to the actual IP address):

system.server.url = http://<STANDALONE-BACKENDLESS-IP>:9000
system.redis.master.host = <STANDALONE-BACKENDLESS-IP>
system.redis.master.port = 6379

Regards,
Mark