Bonjour a tous,
Voila j'ai un petit probleme d'execution sous java avec la JDBC, voici le plan :
J'ai voulu suivre le tuto
http://ricky81.developpez.com/tutori...dbc/blob/#L2.2
J'ai lancer postgres sous windows avec pgAdminIII, j'ai créer une base "image" et voici mes fichiers
Mon fichier de conf : proprietePostgresqlBLOB.dat
et voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5user=adminbd password=adminbd url= jdbc:postgresql://localhost:5432/image driver=org.postgresql.Driver
et Voici mon erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 import java.sql.*; import java.util.*; import java.io.*; public class Driver { private Connection conn; public Driver() { } public void initialiserConnexion(String fichierConfig) throws Exception { Properties propBD = new Properties(); try { FileInputStream entree = new FileInputStream(fichierConfig); propBD.load(entree); }catch(IOException e){ e.printStackTrace(); } Class.forName(propBD.getProperty("driver")); conn = DriverManager.getConnection(propBD.getProperty("url"), propBD.getProperty("user"),propBD.getProperty("password")); } public void deconnexion() throws Exception { if(conn != null) { conn.close(); } } public static void main(String[] args) throws Exception{ Driver driver = new Driver(); driver.initialiserConnexion("proprietePostgresqlBLOB.dat"); } }![]()
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Exception in thread "main" The authentication type 5 is not supported. Check that you have configured the pg_hba.conf file to include the clients IP address or Subnet, and that it is using an authentication scheme supported by the driver. at org.postgresql.Connection.openConnection(Connection.java:204) at org.postgresql.Driver.connect(Driver.java:116) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at Driver.initialiserConnexion(Driver.java:40) at Driver.main(Driver.java:53)![]()
![]()
Une personne en aide:
:
:
Partager