CodeRunner java.security.AccessControlException

А workaround for the problem is to make sure the “bin” directory for your JDK installation is added to the system “path” variable. For example, on my machine I added “c:\Program Files\Java\jdk1.8.0_73\bin” to path and CodeRunner worked as expected.

I added the bin Directory to the path variable, restarted my PC,

and still getting the same error

What do you get when you run the “jar” command from the command prompt line?

‘jar’ is not recognized as an internal or external command,
operable program or batch file.

even though there is such a file called jar.exe in the bin directory…

that tells me that the “bin” for the JDK installation is not in the system path…

OK, the problem was when there are spaces in the path.

So now the CodeRunner is running.
I am making the get request and getting this error:
(I don’t have the file sunec.dll)

[WEBORB EXCEPTION, Thread-31, 03:13:16 08:52:07] java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.security.jca.ProviderConfig$2.run(Unknown Source)
at sun.security.jca.ProviderConfig$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jca.ProviderConfig.doLoadProvider(Unknown Source)
at sun.security.jca.ProviderConfig.getProvider(Unknown Source)
at sun.security.jca.ProviderList.getProvider(Unknown Source)
at sun.security.jca.ProviderList.getService(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 weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:181)
at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:145)
at weborb.client.WeborbClient.invoke(WeborbClient.java:138)
at com.backendless.Invoker.invokeSync(Invoker.java:100)
at com.backendless.persistence.MapDrivenDataStore.save(MapDrivenDataStore.java:60)
at com.backendless.persistence.MapDrivenDataStore.save(MapDrivenDataStore.java:42)
at com.taldroid.backendapi.tapextreme.RewardService.getAddSupersonicReward(RewardService.java:5
3)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at weborb.util.Invocation.invoke(Invocation.java:190)
at weborb.util.Invocation.invoke(Invocation.java:62)
at com.backendless.coderunner.runtime.task.ServiceInvocationTask.runImpl(ServiceInvocationTask.
java:92)
at com.backendless.coderunner.runtime.concurrent.ExtendedRunnable.run(ExtendedRunnable.java:26)

    at java.lang.Thread.run(Unknown Source)

Caused by: java.security.AccessControlException: access denied (“java.io.FilePermission” “C:\Program%20
Files\Java\jre1.8.0_73\lib\ext\amd64\sunec.dll” “read”)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at com.backendless.coderunner.runtime.security.CodeRunnerSecurityManager.checkPermission(CodeRu
nnerSecurityManager.java:52)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
at java.io.WinNTFileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at java.io.FilePermission$1.run(Unknown Source)
at java.io.FilePermission$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.FilePermission.init(Unknown Source)
at java.io.FilePermission.<init>(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findLibrary(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.ec.SunEC$1.run(SunEC.java:60)
at sun.security.ec.SunEC$1.run(SunEC.java:58)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ec.SunEC.<clinit>(SunEC.java:58)
… 38 more

Hi Tal,

Please see the following response. It was posted in another topic for the identical problem:
http://support.backendless.com/t/cant-open-https-urls#comment-10483

Regards,
Mark

Yes!! now It works! I can debug and reach breakpoints!

now something that still happens sometimes, every couple of calls, this error happens.
It does update the tables, but throws this exception, and I am receiving response code 0. “error”: “no response from server”.

RewardServiceDoing table update
RewardServicefinished table update
[ERROR] Unexpected end of stream.
redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198) ~[CodeRunner.jar:na]

    at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[CodeRunner.jar:na]
    at redis.clients.jedis.Protocol.process(Protocol.java:132) ~[CodeRunner.jar:na]
    at redis.clients.jedis.Protocol.read(Protocol.java:196) ~[CodeRunner.jar:na]
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:288) ~[CodeRunne

r.jar:na]
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:213) ~[CodeRunner.jar:na]
at redis.clients.jedis.BinaryJedis.rpush(BinaryJedis.java:954) ~[CodeRunner.jar:na]
at com.backendless.coderunner.processor.ResponderProcessor.run(ResponderProcessor.java:56) ~[Code
Runner.jar:na]

Hi Tal,

This is a known issue in the current release of CodeRunner. We’re working on it and will provide a fix soon.

Regards,
Mark

Hi Teng,

Fresh changes have been released and you can check your use case

Regars,

Denys

The page shows still the same version 3.0.9…
https://backendless.com/downloads/

Hi TaI!

Latest code runner version you can download from code generation
on Business Logic page.
Regards,
Kate.

The page has been updated. The latest version now is 3.0.11

Not working:

Starting CodeRunner
Listening for transport dt_socket at address: 5005
[INFO] JDK from “JAVA_HOME” - C:\Program Files\Java\jdk1.8.0_73
[INFO] JRE from “JRE_HOME” - C:\Program Files\Java\jre1.8.0_73
[ERROR] Could not get a resource from the pool
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
e from the pool

Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.Unk
nownHostException: cl.backendless.com
Caused by: java.net.UnknownHostException: cl.backendless.com
… 13 common frames omitted Press any key to continue . . .

Hi, Tal,

Seems like connection issue, please try again now. If is still would not work post here your runner.properties file from bin folder.

Regards, Artur.

Hey Arthur,

No the exception is not thrown, but it only shows this, and doesn’t seem to be doing anything:

Starting CodeRunner
Listening for transport dt_socket at address: 5005
[INFO] JDK from “JAVA_HOME” - C:\Program Files\Java\jdk1.8.0_73
[INFO] JRE from “JRE_HOME” - C:\Program Files\Java\jre1.8.0_73
[INFO] CodeRunner™ Backendless Debugging Utility
[INFO] Copyright© 2016 Backendless Corp. All rights reserved.
[INFO] Version: 3.0.12 Build date: 20160321-1136

I will send you my runner.properties file by email

This can be fixed by setting
system.type = LOCAL

inside runner.properties

Great,

So now it runs, and also deploys,
but still I am receiving this very long error:

at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java
:67) ~[CodeRunner.jar:na]

Obviously you get a very long error, furthermore it is useless to post it on support forum because of lack of readability. I have cut your answer to encourage you posting logs to pastebin.com or even better attaching application.log from log folder.

We need to check your code, could you please send us to support@backendless.com with tag BKNDLSS-12107