I’m trying to migrate my backend code to version 4 but having trouble deploying. Coderunner runs fine when running from Coderunner.bat. However trying to deploy the code gives the following problem:
D:\dev\repositories\backendless\bin>Deploy.bat
Starting CodeRunner
[INFO] JDK from "JAVA_HOME" - C:\Program Files\Java\jdk1.8.0_101
[INFO] CodeRunner(tm) Backendless Debugging Utility
[INFO] Copyright(C) 2017 Backendless Corp. All rights reserved.
[INFO] Version: 4.0.b18 Build date: 2017-06-21T13:51:50Z
[INFO] CodeRunner session is running for 2 hours and will be terminated on 22:22:17.029[UTC]
[INFO] Parsing event model...
[INFO] Build successfully: 2 event handlers and 0 timers and 0 services
[WARN] 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
[INFO] Publishing 2 event handlers and 0 timers and 0 services to the server…
[ERROR] Could not initialize class sun.security.ssl.SSLContextImpl$DefaultSSLContext
javax.ws.rs.ProcessingException: Could not initialize class sun.security.ssl.SSLContextImpl$DefaultSSLContext
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:234)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:655)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:652)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:652)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:412)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:321)
at com.backendless.coderunner.util.CodeRunnerUtil.publish(CodeRunnerUtil.java:130)
at com.backendless.coderunner.debugger.BusinessLogicDebugger.publishEvents(BusinessLogicDebugger.java:197)
at com.backendless.coderunner.debugger.BusinessLogicDebugger.publish(BusinessLogicDebugger.java:152)
at com.backendless.coderunner.debugger.InstructionsFetcher.executeCommandSafe(InstructionsFetcher.java:30)
at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java:68)
at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:38)
at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.java:25)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$DefaultSSLContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.security.Provider$Service.getImplClass(Unknown Source)
at java.security.Provider$Service.newInstance(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at javax.net.ssl.SSLContext.getInstance(Unknown Source)
at javax.net.ssl.SSLContext.getDefault(Unknown Source)
at javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(Unknown Source)
at javax.net.ssl.HttpsURLConnection.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(Unknown Source)
at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at org.glassfish.jersey.client.HttpUrlConnectorProvider$DefaultConnectionFactory.getConnection(HttpUrlConnectorProvider.java:284)
at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:257)
at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:225)
... 16 common frames omitted
[INFO] Debugging Utility disconnected successfully
[INFO] Thank you for using Backendless
D:\dev\repositories\backendless\bin>
Apperantly either the sun.securty class is not on the classpath or somehow a different version. Does anyone else have this problem and can point me in the right direction?
FYI I use gradle to build my classes:
version '1.0'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDirs = ["src"]
}
output.classesDir = 'classes'
}
}
dependencies {
compile files('lib/backendless.jar')
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task copyToLib(type: Copy) {
into "libs"
from configurations.runtime
}
build.dependsOn(copyToLib)