I have tried connecting to PostgreSQL databases using applets on
Netscape browsers but I keep getting Exceptions to do with a
missing java.sql.Blob class.
The same code works when I call the java program from the
command line using "main args" methods. I have tried using jar
files inorder to include my java applet class, java.sql.*
classes ...... and even signed the jar file but still I cannot
connect to the database. I have attached the messages I get from
the java console on netscape. I also get some messages on the
httpd_access.log trace to do with the "304" code when trying to
fetch the sql classes. All this happens on the machine hosting
the webserver and PostgreSQL database on Linux.
Please help me
Java console trace:
Netscape Communications Corporation -- Java 1.1.5
Type '?' for options.
# Applet exception: class sampled could not be loaded
java.lang.ClassNotFoundException: sampled
at netscape.applet.AppletClassLoader.findClass
(AppletClassLoader.java:821)
at netscape.applet.AppletClassLoader.loadClass1
(AppletClassLoader.java:688)
* at netscape.applet.AppletClassLoader.loadClass
(AppletClassLoader.java:652)
at netscape.applet.AppletClassLoader.loadClass
(AppletClassLoader.java:629)
at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch
(DerivedAppletFrame.java:438)
at java.awt.EventDispatchThread$EventPump.dispatchEvents
(EventDispatchThread.java:81)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:135)
at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
(DerivedAppletFrame.java:911)
After class loading
# Verifier error org/postgresql/jdbc2/ResultSet.getBlob(I)
Ljava/sql/Blob;: Cannot find class java/sql/Blob
java.lang.VerifyError: org/postgresql/jdbc2/ResultSet
at java.lang.ClassLoader.resolveClass(ClassLoader.java:269)
at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:349)
at org.postgresql.Connection.ExecSQL(Connection.java:426)
at org.postgresql.Connection.openConnection
(Connection.java:254)
at org.postgresql.Driver.connect(Driver.java:116)
at java.sql.DriverManager.getConnection(DriverManager.java:90)
at java.sql.DriverManager.getConnection(DriverManager.java:132)
at JDBCtest.init(JDBCtest.java:32)
* at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch
(DerivedAppletFrame.java:553)
at java.awt.EventDispatchThread$EventPump.dispatchEvents
(EventDispatchThread.java:81)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:135)
at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
(DerivedAppletFrame.java:911)
After class loading
java.lang.NoClassDefFoundError: org/postgresql/jdbc2/ResultSet
at java.lang.ClassLoader.resolveClass(ClassLoader.java:269)
at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:349)
at org.postgresql.Connection.ExecSQL(Connection.java:426)
at org.postgresql.Connection.openConnection
(Connection.java:254)
at org.postgresql.Driver.connect(Driver.java:116)
at java.sql.DriverManager.getConnection(DriverManager.java:90)
at java.sql.DriverManager.getConnection(DriverManager.java:132)
at JDBCtest.init(JDBCtest.java:32)
* at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch
(DerivedAppletFrame.java:553)
at java.awt.EventDispatchThread$EventPump.dispatchEvents
(EventDispatchThread.java:81)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:135)
at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
(DerivedAppletFrame.java:911)