Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JApplet in Browser : Connection Problem

 
Erick Maxwell
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a JApplet connecting to mySql database directly without any Servlets. The JApplet runs perfectly in the AppletViewer, but when I run it in the browser, it doesnot get connected to the database.
Is it a problem with the placement of mysql-connector. Please advice as soon as possible.


 
Regina Thomas
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the applet and MySQL database located on the same server-- under the same domain?

Q...
 
Erick Maxwell
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, The applet and the mySql database on the same server.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you getting any exceptions?

Please check your private messages .
 
Javad Rashidi
Ranch Hand
Posts: 34
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
turn off your firewall maybe fix your problem if wouldn't, sign your applet.
 
Erick Maxwell
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no exceptions, no firewalls, signed the applet as well.
 
Paul Clapham
Sheriff
Posts: 21296
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No exceptions? I doubt that, probably you just haven't looked in the Java Console. But if there really aren't any exceptions, then you're going to have to do some debugging to find out what's happening in your code.
 
Javad Rashidi
Ranch Hand
Posts: 34
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post your code.
 
Erick Maxwell
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the late reply

There is an Exception

Unable to load Driverjava.lang.ClassNotFoundException com.mysql.jdbc.Driver
 
Regina Thomas
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you get you need to add the library with the MySQL drivers to the path?

Q...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic