Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

Hello,

Can someone tell me how to create a datasource with a connection to postgresql?
I tried with this connection string:

  • jdbc:postgresql:database
    
  • jdbc:postgresql://host/database
    
  • jdbc:postgresql://host:port/database

when I created the datasource I entered the data requested, label, description, dialect, type jdbc and the url of the postgresql database. Where I requested the driver I wrote the strings that I described above but when trying the connection test an error message appears in the connection. Can you help me to know how to connect the controller correctly?

Regards

Environment windows 10
in Data Source by (230 points)
edited by
hi,

Were you able to find the answer ?

Thanks in advance

1 Answer

0 votes

The connection string should be like this:

jdbc:postgresql://host:port/database

Check that you have valid postgres jdbc jar-file in your classpath

by (2.8k points)
Thank you for your response, but I get the same message when I try to test the connection. It is like this:

Error
Driver not found: jdbc:postgresql://host:port/database.
I guess it is due a not valid jdbc jar in the classpath. I downloaded jar archive driver named: postgresql-42.2.1.
This jar is filed in the next path: C:\apache-tomcat\Knowage-Server-CE\lib\postgresql-42.2.1.  in my hard disk; but it does not seams to work, better say, it does not works.
Could You please help me to configure the right path for the classpath to start rightly the connection test in the datasource?
Best regards
Is correct that you put the jar in the lib directory of tomcat server, but what value did you use for the jdbc driver class?
Also please have a look at the knowage logs in the tomcat server so we can have more information about the problem to provide help.
...