Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC/ODBC connection failed in applet

843854Jan 11 2004 — edited Jan 12 2004
Hi everybody,
i've created a JDBC/ODBC connection by creating a class test in which the connection is done.
When I run it as an application, it runs perfectly giving me my records in my database but when i include in in my Applet, it gives me the following

-----------------------------------------------------------------------------------------------------------------------------
Failed to load JDBC/ODBC driver.
java.lang.NullPointerException
at display.paint(display.java:115)
at sun.awt.RepaintArea.paint(RepaintArea.java:177)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
at java.awt.Component.dispatchEventImpl(Component.java:3678)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
------------------------------------------------------------------------------------------------------------------------
this a part of the code in the function :

public void paint(Graphics g){
test j =new test();

String[] k=j.retrieve_LecId();

if (k[0].equals("1")){


Font font = new Font("TimesRoman", Font.BOLD,20);
g.setFont(font);
g.drawString("LOGICAL TOPOLOGY",400,20);
g.drawImage(ImgHub, xHub,yHub, this);
g.drawImage(ImgPatchpanel, xPatch, yPatch,this);

}
}


Can somebody help me solve this problem?
Thanks avi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2004
Added on Jan 11 2004
11 comments
187 views