Regarding Database Connectivity

I just started working on cuba and initially i got a prob.
after adding my SQL connector jar and changed the name of that jar and after killing the gradle and restarted the server i am still getting the same problem and can’t connect to my local mysql server.
please help me out for this ASAP.

Could you please specify the version of the CUBA Studio, CUBA platform and MySQL server you use? Also, we will need to have a look at the Studio log file, which is located at the {home directory}.haulmont\studio\logs\studio.log (if you use windows it should be c:\Users{YOUR_USER}}.haulmont\studio\logs\studio.log).


Please find the attached logs and screen shots.
please do the needful ASAP

Thank You
Abhilash Arora



studio.log (8.1K)

studio (2).log (38.2K)


Could you please send:

  1. A screenshot of the folder, where you placed the driver
  2. Version of MySQL you use


Hi Aleksey,

sql connector is : - mysql-connector-java-5.1.23-bin
please find the attached file,i have also deleted the 5.1.23.bin in jar and added mysql-connector-java.jar as per the given instruction when i was trying to connect my local db (sql) .
I am using MYSQL server 5.1 in windows.
The path is inside the lib folder of cuba installed c:/programm_x86/cuba/…/lib/sql jar file.

I have two question :

  1. Can we create a war on cuba and deploy where we want i mean on local server as well.
  2. Can we use our local db and do the needful because we are having some critical issues on our project regarding db so we need to take it on our hand.
    3.When we run the offline mode than where the application works on our local server or cuba’s server which shows http://localhost:8111/app .


It seems that you have incorrectly renamed the .jar - file.
File extensions are not shown in Windows by default. So renaming the file you should specify the new name without extension (just “mysql-connector-java”).
It is also recommended to use the latest stable version of JDBC driver. At the time it is 5.1.39.

Regarding your questions:

  1. You can generate WAR with your application. To do it add the special task to the build.gradle and launch it from command line or search-tool in Studio.
    See the following documentation for more details:

Also, Studio 2.3 has means to automate the ‘buildWar’ task generation. Expand the ‘project properties’ tab and find the ‘Deployment settings’ link. Following the link you can setup deployment to WAR.
The generated ‘buildWar’ task still should be launched manually.
You can download Studio 2.3RC1 here.

  1. Please see the documentation: It describes usage of databases with the platform.
    Studio also has a special tool which provides an ability to generate model from already existing database.
    It means, if you have a database with data, you are able to create a new CUBA application, quickly create entities and screens by the tool, and the application will handle your data.
    The documentation has not been published yet, but the tool is available by the ‘Generate model’ link on the ‘entities’ tab in Studio. Your data is in safety, but do not forget to backup it before the model generation.

  2. Could you please explain the question?