Backendless 4.0 Cloud - Cannot deploy Java BL; java.lang.NoClassDefFoundError "jdeps not available"

After updating the Backendless 4.0 Java sdk and the required code changes (from the migration guide) in my server code project, I seem to be unable to deploy the services through coderunner. (I have also regenerated the cloud code project from the v4 portal and updated coderunner’s bin folder)

When using the Deploy.sh script (on macOS Sierra), I get the following warnings:







[WARN] jdeps not available
java.lang.NoClassDefFoundError: com/sun/tools/jdeps/Main
	at com.backendless.coderunner.runtime.DependencyAnalyzer.analyze(DependencyAnalyzer.java:44)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.lambda$parse$18(CustomServiceParserTask.java:88)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.parse(CustomServiceParserTask.java:86)
	at com.backendless.coderunner.parser.HostedServiceParser.parseServiceModel(HostedServiceParser.java:59)
	at com.backendless.coderunner.debugger.BusinessLogicDebugger.build(BusinessLogicDebugger.java:60)
	at com.backendless.coderunner.debugger.InstructionsFetcher.executeCommandSafe(InstructionsFetcher.java:30)
	at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java:60)
	at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:42)
	at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.java:29)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.jdeps.Main
	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)






p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #c33720}
span.s2 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}





















	... 10 common frames omitted

[WARN] jdeps not available
java.lang.NoClassDefFoundError: com/sun/tools/jdeps/Main
	at com.backendless.coderunner.runtime.DependencyAnalyzer.analyze(DependencyAnalyzer.java:44)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.lambda$parse$18(CustomServiceParserTask.java:88)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.parse(CustomServiceParserTask.java:86)
	at com.backendless.coderunner.parser.HostedServiceParser.parseServiceModel(HostedServiceParser.java:59)
	at com.backendless.coderunner.debugger.BusinessLogicDebugger.build(BusinessLogicDebugger.java:60)
	at com.backendless.coderunner.debugger.InstructionsFetcher.executeCommandSafe(InstructionsFetcher.java:30)
	at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java:60)
	at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:42)






p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #c33720}
span.s2 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}















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

[WARN] jdeps not available
java.lang.NoClassDefFoundError: com/sun/tools/jdeps/Main
	at com.backendless.coderunner.runtime.DependencyAnalyzer.analyze(DependencyAnalyzer.java:44)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.lambda$parse$18(CustomServiceParserTask.java:88)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.parse(CustomServiceParserTask.java:86)
	at com.backendless.coderunner.parser.HostedServiceParser.parseServiceModel(HostedServiceParser.java:59)
	at com.backendless.coderunner.debugger.BusinessLogicDebugger.build(BusinessLogicDebugger.java:60)
	at com.backendless.coderunner.debugger.InstructionsFetcher.executeCommandSafe(InstructionsFetcher.java:30)
	at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java:60)
	at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:42)






p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #c33720}
span.s2 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}















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

[WARN] jdeps not available
java.lang.NoClassDefFoundError: com/sun/tools/jdeps/Main
	at com.backendless.coderunner.runtime.DependencyAnalyzer.analyze(DependencyAnalyzer.java:44)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.lambda$parse$18(CustomServiceParserTask.java:88)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at com.backendless.coderunner.runtime.task.CustomServiceParserTask.parse(CustomServiceParserTask.java:86)
	at com.backendless.coderunner.parser.HostedServiceParser.parseServiceModel(HostedServiceParser.java:59)
	at com.backendless.coderunner.debugger.BusinessLogicDebugger.build(BusinessLogicDebugger.java:60)
	at com.backendless.coderunner.debugger.InstructionsFetcher.executeCommandSafe(InstructionsFetcher.java:30)
	at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java:60)
	at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:42)






p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #c33720}
span.s2 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}















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



Oddly enough, the script reports that it has successfully deployed, but nothing shows up in my cloud services. This HTML “error” is also displayed in the terminal (citing action not found):







[INFO] Build successfully: 1 handler, 0 timers, 4 services
[INFO] Publishing 1 event handler and 0 timers and 4 services to the server… 
[INFO] Successfully published all event handlers and timers. 
[ERROR] 


<!DOCTYPE html>
<html>
	<head>
		<title>Action not found</title>
		<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlFJREFUeNqUU8tOFEEUPVVdNV3dPe8xYRBnjGhmBgKjKzCIiQvBoIaNbly5Z+PSv3Aj7DSiP2B0rwkLGVdGgxITSCRIJGSMEQWZR3eVt5sEFBgTb/dN1yvnnHtPNTPG4PqdHgCMXnPRSZrpSuH8vUJu4DE4rYHDGAZDX62BZttHqTiIayM3gGiXQsgYLEvATaqxU+dy1U13YXapXptpNHY8iwn8KyIAzm1KBdtRZWErpI5lEWTXp5Z/vHpZ3/wyKKwYGGOdAYwR0EZwoezTYApBEIObyELl/aE1/83cp40Pt5mxqCKrE4Ck+mVWKKcI5tA8BLEhRBKJLjez6a7MLq7XZtp+yyOawwCBtkiBVZDKzRk4NN7NQBMYPHiZDFhXY+p9ff7F961vVcnl4R5I2ykJ5XFN7Ab7Gc61VoipNBKF+PDyztu5lfrSLT/wIwCxq0CAGtXHZTzqR2jtwQiXONma6hHpj9sLT7YaPxfTXuZdBGA02Wi7FS48YiTfj+i2NhqtdhP5RC8mh2/Op7y0v6eAcWVLFT8D7kWX5S9mepp+C450MV6aWL1cGnvkxbwHtLW2B9AOkLeUd9KEDuh9fl/7CEj7YH5g+3r/lWfF9In7tPz6T4IIwBJOr1SJyIGQMZQbsh5P9uBq5VJtqHh2mo49pdw5WFoEwKWqWHacaWOjQXWGcifKo6vj5RGS6zykI587XeUIQDqJSmAp+lE4qt19W5P9o8+Lma5DcjsC8JiT607lMVkdqQ0Vyh3lHhmh52tfNy78ajXv0rgYzv8nfwswANuk+7sD/Q0aAAAAAElFTkSuQmCC">
	    <style>
		    html, body, pre {
		        margin: 0;
		        padding: 0;
		        font-family: Monaco, 'Lucida Console', monospace;
		        background: #ECECEC;
		    }
		    h1 {
		        margin: 0;
		        background: #AD632A;
		        padding: 20px 45px;
		        color: #fff;
		        text-shadow: 1px 1px 1px rgba(0,0,0,.3);
		        border-bottom: 1px solid #9F5805;
		        font-size: 28px;
		    }
		    p#detail {
		        margin: 0;
		        padding: 15px 45px;
		        background: #F6A960;
		        border-top: 4px solid #D29052;
		        color: #733512;
		        text-shadow: 1px 1px 1px rgba(255,255,255,.3);
		        font-size: 14px;
		        border-bottom: 1px solid #BA7F5B;
		    }
		</style>
	</head>
	<body>
		<h1>Action not found</h1>


		<p id="detail">
			For request 'POST /%25s/%25s/servercode/services'
		</p>


	</body>






p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c33720; background-color: #ffffff}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #5230e1}
span.s2 {font-variant-ligatures: no-common-ligatures}
span.s3 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.Apple-tab-span {white-space:pre}


















































</html>


For added context, I also get similar errors (jdeps not available) when running the coderunner debug script, but doing that will allow the services to show up in the v4 portal in debug mode and I am able to invoke them.

I have also tried importing a jar into backendless (which works), but invocation of those functions fail with the error citing:

400 - Type:"java.lang.NoClassDefFoundError", Description:"Could not initialize class sun.security.pkcs.SignerInfo", ExceptionClass:"ServiceException" {Msg:"none", Cause:"none"}

Does this look to be a Beckendless 4 error, or is there something wrong with my process/project?

Thanks,
Renato

I was able successfully to deploy my code. Could you send your project to support@backendless.com

Hi Sergey, thanks for the quick response - just sent my project off to support.

Hey Renato

Was able to reproduce the issue you’ve described. It requires detailed investigation. We’ve opened internal ticket which you can reference by id BKNDLSS-14389. We’ll notify you here in the topic as soon as the fix will be made. Thanks for reporting

Regards Anton

Thanks!

Hi, Renato.
For CodeRunner proper work you must have system environment variable JAVA_HOME which should point to the directory where jdk is located.

For example on my machine it looks like:
~ $ echo $JAVA_HOME
/opt/java/jdk1.8.0_121

Have you correctly set this variable ?

And have you able to make “publish” after run “./CodeRunner.sh” ?

We have fixed this problem. The changes will appear in production in 1-2 days.
As a workaround for now use “./CodeRunner.sh” and command “publish”.

Thanks for the update. I ensured that JAVA_HOME is set, and I no longer get the jdeps error with ./Coderunner.sh. However, when I run ./Coderunner.sh and then use publish as a workaround, I still get the html “error” action not found and no services are available in the backendless console:







p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c33720; background-color: #ffffff}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #5230e1}
span.s2 {font-variant-ligatures: no-common-ligatures}
span.s3 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.Apple-tab-span {white-space:pre}



[INFO] Publishing 1 event handler and 0 timers and 4 services to the server… 

[INFO] Successfully published all event handlers and timers. 

[ERROR] 




<!DOCTYPE html>

<html>

	<head>

		<title>Action not found</title>

		<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlFJREFUeNqUU8tOFEEUPVVdNV3dPe8xYRBnjGhmBgKjKzCIiQvBoIaNbly5Z+PSv3Aj7DSiP2B0rwkLGVdGgxITSCRIJGSMEQWZR3eVt5sEFBgTb/dN1yvnnHtPNTPG4PqdHgCMXnPRSZrpSuH8vUJu4DE4rYHDGAZDX62BZttHqTiIayM3gGiXQsgYLEvATaqxU+dy1U13YXapXptpNHY8iwn8KyIAzm1KBdtRZWErpI5lEWTXp5Z/vHpZ3/wyKKwYGGOdAYwR0EZwoezTYApBEIObyELl/aE1/83cp40Pt5mxqCKrE4Ck+mVWKKcI5tA8BLEhRBKJLjez6a7MLq7XZtp+yyOawwCBtkiBVZDKzRk4NN7NQBMYPHiZDFhXY+p9ff7F961vVcnl4R5I2ykJ5XFN7Ab7Gc61VoipNBKF+PDyztu5lfrSLT/wIwCxq0CAGtXHZTzqR2jtwQiXONma6hHpj9sLT7YaPxfTXuZdBGA02Wi7FS48YiTfj+i2NhqtdhP5RC8mh2/Op7y0v6eAcWVLFT8D7kWX5S9mepp+C450MV6aWL1cGnvkxbwHtLW2B9AOkLeUd9KEDuh9fl/7CEj7YH5g+3r/lWfF9In7tPz6T4IIwBJOr1SJyIGQMZQbsh5P9uBq5VJtqHh2mo49pdw5WFoEwKWqWHacaWOjQXWGcifKo6vj5RGS6zykI587XeUIQDqJSmAp+lE4qt19W5P9o8+Lma5DcjsC8JiT607lMVkdqQ0Vyh3lHhmh52tfNy78ajXv0rgYzv8nfwswANuk+7sD/Q0aAAAAAElFTkSuQmCC">

	    <style>

		    html, body, pre {

		        margin: 0;

		        padding: 0;

		        font-family: Monaco, 'Lucida Console', monospace;

		        background: #ECECEC;

		    }

		    h1 {

		        margin: 0;

		        background: #AD632A;

		        padding: 20px 45px;

		        color: #fff;

		        text-shadow: 1px 1px 1px rgba(0,0,0,.3);

		        border-bottom: 1px solid #9F5805;

		        font-size: 28px;

		    }

		    p#detail {

		        margin: 0;

		        padding: 15px 45px;

		        background: #F6A960;

		        border-top: 4px solid #D29052;

		        color: #733512;

		        text-shadow: 1px 1px 1px rgba(255,255,255,.3);

		        font-size: 14px;

		        border-bottom: 1px solid #BA7F5B;

		    }

		</style>

	</head>

	<body>

		<h1>Action not found</h1>




		<p id="detail">

			For request 'POST /%25s/%25s/servercode/services'

		</p>




	</body>

</html>

Is this error something that will be part of the fix that I should just wait for?

Thank you all for the support!
Renato

Thanks for your information. We are working on this problem. Task the same - BKNDLSS-14389.

Hi Renato,

The problem has been fixed, please verify. Apologizes for taking so long.

Hi Sergey, I have re-downloaded the server code from the console and replaced the bin folder in my project and everything seems to be working now - Thank you!