BetaONE will rise again!


Reply
  #1  
Old 22nd Nov 04, 10:29 AM
*MO*'s Avatar
*MO* *MO* is offline
Senior Member
 
Join Date: Aug 2002
Location: Cape Town
Posts: 311
*MO* is an unknown quantity at this point
Send a message via MSN to *MO*
Cannot connect to MySQL Database from Java Applet
Hi

I've created a java applet that connects to a mysql database. When i run the applet from the JBuilder Applet viewer, it works fine. but once i load the applet into an HTML page, upload it to the server where it has to run, It gives an error the size to big for this page.

-------------------------ERROR I RECIEVE---------------------------------
load: class cms_applet.cms_start.class not found.
java.lang.ClassNotFoundException: cms_applet.cms_start.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\CMS_Applet\cms_applet\cms_start\class.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connec t(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInp utStream(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
---------------------------------
This was running the file on my machine, but i get same error when page is loaded on server. My connection passes when i run the page in my jbuilder9 software. But not anywhere else. Why is it doing this and how can i get it to work?

thanx,
MO
Reply With Quote
  #2  
Old 23rd Nov 04, 02:41 AM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
This is why:

Code:
Caused by: java.io.FileNotFoundException: C:\CMS_Applet\cms_applet\cms_start\class.class (The system cannot find the path specified
You are using the excat path to were your class file is found on your computer. But of course thats not where it is for the server. So you need to use virtual paths such as:

/home/war59312/public_html/
__________________
Ad Muncher Usage Statistics for v4.7 Build 27105/1624
Adverts removed by Ad Muncher: 1,601,933
Approximate bandwidth saved: 12,515 MB
Counter started: April 2, 2003

Download: http://war59312.admuncher.com/download.shtml
Reply With Quote
  #3  
Old 23rd Nov 04, 08:39 AM
*MO*'s Avatar
*MO* *MO* is offline
Senior Member
 
Join Date: Aug 2002
Location: Cape Town
Posts: 311
*MO* is an unknown quantity at this point
Send a message via MSN to *MO*
huh?

I understand that you must set the classpath to indicate where the MySQL driver is sitting right.

So where do i specify it on the server?

Crap

I hate java
Reply With Quote
  #4  
Old 23rd Nov 04, 05:36 PM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
I have no idea I just know you do. lol

Sure someone knows around here.
__________________
Ad Muncher Usage Statistics for v4.7 Build 27105/1624
Adverts removed by Ad Muncher: 1,601,933
Approximate bandwidth saved: 12,515 MB
Counter started: April 2, 2003

Download: http://war59312.admuncher.com/download.shtml
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Update Puts a Toe Into Big Vendors' Database Turf NewsBot NeoWin News 0 27th Oct 04 09:30 PM
Speed up system. greasemonkey Hardware Support 6 6th Nov 01 08:32 PM


All times are GMT +1. The time now is 03:38 PM.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.