I am currently developing CloudCode with Java and I am reciving the error that I cannot allocate a new thread and the solution for this is buying a function pack from the Backendless Marketplace.
So I found the package in the Marketplace and was curious how many more Java threads I can allocate after buying the package or are there any restrictions after buying it?
Or is there any other solution for this problem as I am currently on the Springboargplan and I don’t want to upgrade to Cloud 9 yet?
to be honest I am not really sure I am currently using one Eventhandler and one Timer and in each I am making two calls to the Backendless Database. Is it possible that I maybe send you an email with the code and you take a look?
@Bernhard_Hammer, as soon as you wrote to us, we checked your case and also experienced the problem of adding a new Java stream. We created a problem ticket - BKNDLSS-23263. Our team is already working on it. I believe that your problem is caused by it. We apologize for the inconvenience. We try to do our best to fix it.
ApplicationId: 53F60FB5-E0AF-457D-FF50-ED080AC38500
No I haven’t as I am just in the development and I don’t really want to change to the Cloud 9 if it isn’t necessary. I am receiving the error when I am deploying an EventHandler and a Timer and I am still facing this problem.
We have fixed the problem on our side. The issue cannot be reproduced now.
Can you please provide the stacktrace for your error and your EventHandler and Timer classes with the logic. So we can inspect if something is wrong from your side.
this is the stacktrace of the error: 09:59:33 | com.xperience.timers.PastXperiencesTimer | ERROR | Cannot allocate new thread. You can remove this limitation by purchasing a function pack in Backendless Marketplace.
Can I also send you the code of the EventHandler and Timer per email as I don’t want to share the code publicly?
@Bernhard_Hammer, I have checked your project in my application ( which is on the Springboard plan too as you have) and it did not cause any errors while debugging or deploying it. Could you check it now? As I see in your application you have only one deployed JAVA service. So, it has to work. If you do not mind, can we try to deploy it in your app?
I just saw when running the CodeRunner that I get this warning:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.backendless.coderunner.runtime.security.CodeRunnerSecurityManager (file:/C:/Users/hamme/Desktop/Masterordner/Xperience/CloudCode/bin/CodeRunner.jar) to field java.lang.ThreadGroup.nUnstarted
Threads
WARNING: Please consider reporting this to the maintainers of com.backendless.coderunner.runtime.security.CodeRunnerSecurityManager
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I made a fix, checked the work of your handler and timer, now everything is working as it should.
Please check if everything works for you and let us know.
Also, you do not need to use Backendless.initApp in handlers and timers, you can remove this call from your handler and your timer.
Thank you for contacting us. Please let us know if you run into any other issues, we’re here to make sure you have a fantastic experience with Backendless.
Thanks for the tip. I removed the Backendless.initApp
Can you run the timer without getting any error? I still can’t download my objects from the database I am getting the error: “Cannot allocate new thread. You can remove this limitation by purchasing a function pack in Backendless Marketplace”.