Re: bug - connection problem with jdk 1.7 ?
От | dmp |
---|---|
Тема | Re: bug - connection problem with jdk 1.7 ? |
Дата | |
Msg-id | 533459F6.8080509@ttc-cmc.net обсуждение исходный текст |
Ответ на | bug - connection problem with jdk 1.7 ? (tim.lambrechts@laposte.net) |
Список | pgsql-jdbc |
> (I send this e-mail again, because I hadn't subscribed me to the mailing list) > > Hello, > > I already presented on the devshed forum a connection problem to postgresql with the jdbc jar file postgresql-9.3-1100.jdbc41.jar.Nobody answered me. > > Until recently I thought that the origin of the problem was maybe Eclipse, but now I have tested the same code with a recentversion of another development tool, Intellij IDEA, and the problem is still the same. > > That’s why I begin to think that the postgresql-9.3-1100.jdbc41.jar file doesn’t function correctly with the jdk 1.7 (version51.0), moreover because the same code worked very well with jdk 1.6, postgresql 9.0 and postgresql-9.0-801.jdbc4.jar. > > So, now I repeat the explanation of the jdbc connection problem that I gave on the devshed forum: > > Recently I bought a new computer and installed a running project with upgraded versions of windows (windows 7, 64 bit),eclipse (4.3.1), java (jdk 1.7 : 51.0), postgresql (9.3) and jdbc (postgresql-9.3-1100.jdbc41.jar). > > On the older versions the programs ran without any problem, but now there is an exception in the following code: > > public static final String DBURL = "jdbc:postgresql:MR"; > public static final String DBUSER = "postgres"; > > . . . > > public static Connection createConnection () throws SQLException { > Properties props = new Properties(); > props.setProperty("user",DBUSER); > return DriverManager.getConnection(DBURL, props); > } dbConnection = DriverManager.getConnection(connectionURLString, connectProperties); Connection URL: jdbc:postgresql://127.0.0.1:5432/key_tables What is "jdbc:postgresql:MR"? Is this a valid URL string? Above works fine with eclipse, jdk 1.7_45, 9.3-1101.jdbc41.jar Test of your URL: Connection Parameters: jdbc:postgresql:key_tables?user=danap&password=&loglevel=0 ClassNotFoundExceptionjava.lang.ClassNotFoundException: org.postgresql.Driver SQLExeceptionjava.sql.SQLException: No suitable driver found for jdbc:postgresql:key_tables?user=danap&password=&loglevel=0 Which would result in NULL being returned as you have indicated. danap. > > . . . > > ~ > ~ > ~ > > Tim
В списке pgsql-jdbc по дате отправления: