Fwd: Rocks 6.1.1 with JDBC connection - What should be wrong?

From: Luciana Campos <lumascampos(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Fwd: Rocks 6.1.1 with JDBC connection - What should be wrong?
Date: 2014-11-25 15:18:28
Message-ID: CAHvPryDq9sZF48VbCKt-xzJ3ZhVZtBNbJHVf6u9ocAKR39Z6cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

I am having trouble configuring JDBC4 with Rocks 6.1.1.
It's possible to connect database with 'psql', but using the JDBC
connection, I got this error:

Exception in thread "main"
java.lang.NoClassDefFoundError: org/postgresql/jdbc4/Jdbc4Connection
at org.postgresql.Driver.makeConnection(Driver.java:410)
at org.postgresql.Driver.connect(Driver.java:280)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at testaconexao.TestaConexao.main(TestaConexao.java:40)
Caused by: java.lang.ClassNotFoundException:
org.postgresql.jdbc4.Jdbc4Connection
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 5 more
Caused by: java.io.EOFException: Detect premature EOF
at sun.misc.Resource.getBytes(Resource.java:131)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:444)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
... 10 more

I'm using :

- JAVA J2SE

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

- PostgreSQL

PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7
20120
313 (Red Hat 4.4.7-4), 64-bit

- JDBC4

postgresql-9.2-1004.jdbc41.jar

What should be wrong?

Luciana.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Paragon Corporation 2014-11-26 00:47:51 Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed
Previous Message Heikki Linnakangas 2014-11-25 13:15:10 PQexec() hangs on OOM