Dear Joget Community,

Is it possible in the cloud environment to use Java and SQL integrations?

In my local Joget environment I use Java code to access tables with SQL and populate fields: 

SELECT Toezichthouder.c_id, Toezichthouder.c_Naam, Toezichthouder.c_Email FROM app_fd_klachten as Klachten, app_fd_plaatsen as Plaatsen, app_fd_organisaties as Veroorzaker, app_fd_organisaties as Toezichthouder WHERE Klachten.c_OrganisatieID = Veroorzaker.c_id AND Veroorzaker.c_Plaats = Plaatsen.c_Plaatsnaam AND Plaatsen.c_OrganisatieID = Toezichthouder.id AND Klachten.c_KlachtID = 'ID-000054'
This works OK in my local environment but in the cloud I get the following error :

Exception = com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jwc_vdschoot.app_fd_klachten' doesn't exist

This error states that a referenced table does not exists, which is strange.
Maybe I need a more specific table path in the definition , but that would make the code dependent on the environment.
Thanks for the help,

Joost van der Schoot

  • No labels

3 Comments

  1. Hi Joost,

    May I know on where you are using this query?

    Seems like from the error message, the table is nowhere to be found. To verify if you have the table created or not in your cloud account, you will need to submit the form once to get the table created first.

    On the database connectivity with the database on Joget's Cloud, you may look up for "Execute SQL statement through JDBC" in Bean Shell Programming. The portion of code there would allow you to connect to the database without specifying all the JDBC parameters all over again.

    Hope this helps.

    1. Hi Hugo,

      The problem here was the difference in case sensitivity of table names in databases.

      I developed the SQL in my local environment where table names are lower case, where in the cloud the tables can have upper case characters. I discoverd this by querying the database schema in the cloud.

      Regards, Joost

      1. Thanks for your finding on this. It is also notable that case sensitivity issue will occur on Linux based OS.