aspose file tools*
The moose likes Applets and the fly likes ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "ClassNotFoundException" Watch "ClassNotFoundException" New topic
Author

ClassNotFoundException

Rajnishs Sinha
Greenhorn

Joined: Jun 01, 2007
Posts: 5
Hi,

i have an applet class named SimpleApplet.class
i also have supporting jar file named migcalendar.jar

these two files are present in my Application Servers folder in my box in the following folder

C:\Sybase\EAServer\java\classes

My Application server is

Jaguar CTS - Component Transaction Server/Version 5.2.0 (Build 52025)/P/PC Intel /Microsoft Windows/OPT/Nov 29 2004 16:40:29


I have included the applet class in a jsp named SimpleApplet.jsp

the jsp is also in my applicattion servers folder in my box in the following location

C:\Sybase\EAServer\Repository\WebApplication\schlumberger\WEB-SCHLUMBERGER\pagetypes

Below is the jsp file content


<HTML>
<BODY>
<table>
<tr>
<td>
<jsp lugin
type="applet"
code="SimpleApplet"
codebase="C:\Sybase\EAServer\java\classes"
jreversion="1.4.2"
align="center" width="640" height="400"
archive="migcalendar.jar"
pluginurl="http://java.sun.com/j2se/1.4.2/download.html"
iepluginurl="http://java.sun.com/j2se/1.4.2/download.html" >
<jsp:fallback>
<p>Unable to start plugin.</p>
</jsp:fallback>
</jsp lugin>
</td>
</tr>
</table>
</BODY>
</HTML>


below is the error message in the Java Console


Java Plug-in 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\rajnishs
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
load: class SimpleApplet not found.
java.lang.ClassNotFoundException: SimpleApplet
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.IOException: open HTTP connection failed.
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

i am strugling with for the past 3 days
can any one get me out of this.......

thanks and regards in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

"schlumberger",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rajnishs Sinha
Greenhorn

Joined: Jun 01, 2007
Posts: 5
Hi,

Actually i tried with my name and it was not accepting it.So gave the name of my project that i am doing as display name and it worked.

Anyway i m sorry for violating the rules although unknowingly.I have updated my profile for the display name.

may i have the solution its urgent as the project i am doing is of very short duration and i need to finish it up quikly.

once again thanks in advance

rajnish
Pravin Jain
Ranch Hand

Joined: May 20, 2007
Posts: 60
What is the url used from the browser to access the jsp?
I would be better to place the Applet class and the jar
somewhere within the application folder.
can try specifing codebase starting with http:


The Zen of Java Programming.
Rajnishs Sinha
Greenhorn

Joined: Jun 01, 2007
Posts: 5
To acces a web page in my web application i have a request controller servlet.

1)It acts as a security gate between clients (web browsers) and the application Server.

2)Allows property values to be passed to a page.

i have my own custom page type which determines the look and feel of my page.

i have registered the SimpleApplet.jsp as SimpleApplet.

and i am calling it using the rc as

http://rajnish:8080/localopal/rc?command=page&page=SimpleApplet

where localopal is my webapplication folder in my box with the following location

C:\Sybase\EAServer\Repository\WebApplication\localopal



if you forget about everything above except the webapplications location

i also tried with the following url to acces the SimpleApplet jsp in my application framework with the help of rc(request controller)

http://rajnish:8080/localopal/rc?command=file&file=WEB-Schlumberger/pagetypes/SimpleApplet.jsp

where WEB-Schlumberger/pagetypes/SimpleApplet.jsp is the folder structure under my webapplication folder i.e localopal

please let me know how to use http:// type of code base and what url i should give in case of my webapplication for codebase attribute........


once again thanks and regards in advance

rajnish
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
"codebase" must refer to a directory on the web hierarchy; it can't be just any directory (and in particular, it can't be an absolute path, since it will be interpreted relative to the web app root).

Try putting the class and jar files in the same directory as the JSP page, and remove the codebase attribute.


Ping & DNS - my free Android networking tools app
Rajnishs Sinha
Greenhorn

Joined: Jun 01, 2007
Posts: 5
thanks Ulf Dittmer for responding,

I tried putting the class and jar files in the same directory as the JSP page
and then removed the codebase, but with no result.

My Applet class supporting jar files and the jsp file are all in the following location

C:\Sybase\EAServer\Repository\WebApplication\schlumberger\WEB-SCHLUMBERGER\pagetypes

i tried with removing codebase

now if i put the codebase then how to give the exact relative (http://....)codebase url for the above mentioned folder structure

i am sick with all the permutation and combination

please get me out of this trap. its urgent.


once again thanks in advance,
rajnish
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
Which URL are you using to access that JSP?
Rajnishs Sinha
Greenhorn

Joined: Jun 01, 2007
Posts: 5
url used to access the jsp is

http://rajnish:8080/localopal/rc?command=file&file=WEB-Schlumberger/pagetypes/SimpleApplet.jsp
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
Does it work if you address the JSP directly, like

http://rajnish:8080/localopal/WEB-Schlumberger/pagetypes/SimpleApplet.jsp

and put the applet files in the pagetypes directory?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassNotFoundException