Enviado em 25/11/2014 - 15:38h
Estou com problemas para configurar uma conexão JDBC no Rocks 6.1.1.
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
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 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
postgresql-9.2-1004.jdbc41.jar