direct access to mariadb

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

Hi Oleg,

Are you using Standalone version?

Hi Sergey,
Yes, I’m using Standalone version.

Currently our Business Logic does not allow creating multiple threads, but in the next version of Standalone this restriction will be removed. It will be released in several weeks and we shall announce the release, so please stay tuned.

Great!

But is there any other possibility to access directly to db from Business Logic code?

Thanks.

Actually, Business Logic was not designed to access database directly, so no, there’s no other way for now. Is there a particular reason you can’t use a built-in Data Service?

Ok, I’ve got it.
Nevertheless thanks.

P.S.: I’ll describe the reason here:
http://support.backendless.com/t/find-object-that-has-few-related-objects-in-list-at-a-time
in a few hour.