Hello.
I debug my server code with coderunner.
I create simple DataServiceHandler with “after” event.
There is my code:
@Override
public void afterCreate(RunnerContext context, Vote vote, ExecutionResult<Vote> result) throws Exception {
Vote newVote = Backendless.Data.of(Vote.class).findFirst();
super.afterCreate(context, vote, result);
}
And when event happens, in coderunner console I see the following stacktrace:
//first api request from client
java.lang.reflect.InvocationTargetException
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 com.backendless.coderunner.runtime.InvocationTask.run(InvocationTask.java:99)
at java.lang.Thread.run(Unknown Source)
at com.backendless.coderunner.runtime.concurrent.ExecutorThread.run(ExecutorThread.java:46)
Caused by: java.lang.ExceptionInInitializerError
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 weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:175)
at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:144)
at weborb.client.WeborbClient.invoke(WeborbClient.java:138)
at com.backendless.Invoker.invokeSync(Invoker.java:100)
at com.backendless.Persistence.first(Persistence.java:547)
at com.backendless.DataStoreFactory$1.findFirst(DataStoreFactory.java:64)
at com.backendless.suitsme.events.persistence_service.VoteTableEventHandler.afterCreate(VoteTableEventHandler.java:32)
... 7 more
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "jdk.tls.client.protocols" "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(CodeRunnerSecurityManager.java:39)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at sun.security.action.GetPropertyAction.run(Unknown Source)
at sun.security.action.GetPropertyAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.SSLContextImpl$CustomizedSSLContext.<clinit>(Unknown Source)
... 21 more
//here I repeat request from client
java.lang.reflect.InvocationTargetException
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 com.backendless.coderunner.runtime.InvocationTask.run(InvocationTask.java:99)
at java.lang.Thread.run(Unknown Source)
at com.backendless.coderunner.runtime.concurrent.ExecutorThread.run(ExecutorThread.java:46)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
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 weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:175)
at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:144)
at weborb.client.WeborbClient.invoke(WeborbClient.java:138)
at com.backendless.Invoker.invokeSync(Invoker.java:100)
at com.backendless.Persistence.first(Persistence.java:547)
at com.backendless.DataStoreFactory$1.findFirst(DataStoreFactory.java:64)
at com.backendless.suitsme.events.persistence_service.VoteTableEventHandler.afterCreate(VoteTableEventHandler.java:32)
... 7 more
Windows 7 x64
jre 1.7.0_51