Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jre1.4.1_01 missing postgres driver.

4 views
Skip to first unread message

Glenn Ivar Klausen

unread,
Jan 15, 2003, 7:25:26 AM1/15/03
to

We are using a postgres database, and are forced to use jre because the
org.postgres.Driver class is not included in the jre1.4.1_01 rt.jar.

I've extracted all the class files under org/postgres/* (se list at the
bottom) to a own .jar file and include that in the classpath, but the
call to Class.forName("org.postgresql.Driver"); fails with this exception:

What must I do to get my database to work with jre1.4.1_01 and newer
versions?

==========
java.lang.NoClassDefFoundError: org/postgresql/Connection
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at org.postgresql.Driver.connect(Driver.java:121)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at no.zeroone.zoac.db.JZOACDatabase.connect(JZOACDatabase.java:190)
at no.zeroone.zoac.ZOAC.<init>(ZOAC.java:100)
at no.zeroone.zoac.ZOAC.main(ZOAC.java:436)
Exception in thread "main"
Process completed.
=============

Files included in postgres.jar
org/
org/postgresql/
org/postgresql/Connection.class
org/postgresql/core/
org/postgresql/core/BytePoolDim1.class
org/postgresql/core/BytePoolDim2.class
org/postgresql/core/ConnectionHook.class
org/postgresql/core/MemoryPool.class
org/postgresql/core/ObjectPool.class
org/postgresql/core/SimpleObjectPool.class
org/postgresql/Driver.class
org/postgresql/errors.properties
org/postgresql/errors_fr.properties
org/postgresql/errors_it.properties
org/postgresql/errors_nl.properties
org/postgresql/fastpath/
org/postgresql/fastpath/Fastpath.class
org/postgresql/fastpath/FastpathArg.class
org/postgresql/Field.class
org/postgresql/geometric/
org/postgresql/geometric/PGbox.class
org/postgresql/geometric/PGcircle.class
org/postgresql/geometric/PGline.class
org/postgresql/geometric/PGlseg.class
org/postgresql/geometric/PGpath.class
org/postgresql/geometric/PGpoint.class
org/postgresql/geometric/PGpolygon.class
org/postgresql/jdbc2/
org/postgresql/jdbc2/CallableStatement.class
org/postgresql/jdbc2/Connection.class
org/postgresql/jdbc2/DatabaseMetaData.class
org/postgresql/jdbc2/PreparedStatement.class
org/postgresql/jdbc2/ResultSet.class
org/postgresql/jdbc2/ResultSetMetaData.class
org/postgresql/jdbc2/Statement.class
org/postgresql/jdbc2/UpdateableResultSet.class
org/postgresql/largeobject/
org/postgresql/largeobject/BlobInputStream.class
org/postgresql/largeobject/BlobOutputStream.class
org/postgresql/largeobject/LargeObject.class
org/postgresql/largeobject/LargeObjectManager.class
org/postgresql/largeobject/PGblob.class
org/postgresql/largeobject/PGclob.class
org/postgresql/PG_Stream.class
org/postgresql/ResultSet.class
org/postgresql/Statement.class
org/postgresql/util/
org/postgresql/util/PGmoney.class
org/postgresql/util/PGobject.class
org/postgresql/util/PGtokenizer.class
org/postgresql/util/PSQLException.class
org/postgresql/util/Serialize.class
org/postgresql/util/UnixCrypt.class


Glenn

Exile In Paradise

unread,
Jan 15, 2003, 10:07:16 AM1/15/03
to
Glenn Ivar Klausen wrote:
> We are using a postgres database, and are forced to use jre because the
> org.postgres.Driver class is not included in the jre1.4.1_01 rt.jar.

PostgreSQL drivers are included as an extension jar IN the postgres
distribution itself.

Mailing lists, new driver version downloads and such are available at:
http://jdbc.postgresql.org/

RedHat 8.0 Instructions
-----------------------
Download and install the PostgreSQL 7.2.3 RPMs from RedHat.

The JDBC drivers are in the postgresql-jdbc RPM which installs
the jar files into /usr/share/pgsql.

For Java 1.2 or better, the jdbc7.1-1.2.jar file there needs to
be linked or copied into your $JAVA_HOME/jre/lib/ext directory.

That's all there is.

For Other OS, see the website mentioned above.

--
Exile In Paradise
The first myth of management is that it exists. The second myth of
management is that success equals skill.
-- Robert Heller

Glenn Ivar Klausen

unread,
Jan 15, 2003, 11:10:16 AM1/15/03
to
Exile In Paradise wrote:

> Glenn Ivar Klausen wrote:
>
> For Java 1.2 or better, the jdbc7.1-1.2.jar file there needs to
> be linked or copied into your $JAVA_HOME/jre/lib/ext directory.

aaah... then it all worked.

TANX!

Glenn

0 new messages