Search code examples
javagenexus

Invalid connection URL on Genexus generated code


I have created an application on Genexus 15 and imported the jar file generated on its deploy to a Java project on NetBeans.

When I call my sample procedure, I get the following error:

Error   : The syntax of the connection URL 'jdbc:jtds:sqlserver://:1433/' is invalid.

Looking at my client.cfg file, my DB_URL is as follows:

DB_URL=jdbc:jtds:sqlserver://localhost:1433/TesteIntegracao

Since the connection code is generated by Genexus, I cannot access it to see where the URL is beeing created.

What is the source of this URL and the cause of the error?


Solution

  • Just to answer with more detail, following the hint on comments above, I copied the client.cfg file to my java java root directory.

    The original cfg file can be found inside the directories created by genexus when you deploy the application. It should be something like YourKB/JavaModel/Deploy/Local/

    After this I had an error on my DB user, because it was encrypted in the client.cfg, so I just edited the USER_ID and USER_PASSWORD fields and the connection was successfull.

    USER_ID=root
    USER_PASSWORD=root
    
    DB_URL=jdbc:jtds:sqlserver://localhost:1433/TesteIntegracao
    

    The other fields were kept with default value.