As a workaround for this problem:
http://support.backendless.com/t/find-object-that-has-few-related-objects-in-list-at-a-time
I want to get direct access to mariadb database to execute plain sql request for several tables.
I’m trying:
Class.forName("org.gjt.mm.mysql.Driver");
Connection connection = DriverManager.getConnection(url, username, password);
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM appversion;");
...
But I’m getting exception at first line:
[WEBORB EXCEPTION, Thread-39, 07:29:16 07:54:09] java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.innomos.baas.gant.AdvancedApiServiceDebug.connectToDb(AdvancedApiServiceDebug.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:115)
at com.backendless.coderunner.runtime.concurrent.ExtendedRunnable.run(ExtendedRunnable.java:26)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.security.AccessControlException: You have no permission to thread manipulation
at com.backendless.coderunner.runtime.security.CodeRunnerSecurityManager.getThreadGroup(CodeRunnerSecurityManager.java:42)
at java.lang.Thread.init(Thread.java:379)
at java.lang.Thread.init(Thread.java:349)
at java.lang.Thread.<init>(Thread.java:508)
at com.mysql.jdbc.AbandonedConnectionCleanupThread.<init>(AbandonedConnectionCleanupThread.java:35)
at com.mysql.jdbc.NonRegisteringDriver.<clinit>(NonRegisteringDriver.java:104)
... 12 more
Is there any possibility to allow multithreading?
Or maybe another way to access to the source database?
Thanks.
Best Regards,
Oleg