• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassNotFoundException

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
Rajnishs Sinha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Rajnishs Sinha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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.
 
Rajnishs Sinha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which URL are you using to access that JSP?
 
Rajnishs Sinha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
url used to access the jsp is

http://rajnish:8080/localopal/rc?command=file&file=WEB-Schlumberger/pagetypes/SimpleApplet.jsp
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
A timing clock, fuse wire, high explosives and a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic