cancel
Showing results for 
Search instead for 
Did you mean: 

Applet Running on J2ee Engine

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I'm trying to implement an applet in a jsp running on the was java engine. The JspDynPage appliation is running the applet, but the applet itself is bombing. It gives the fullowing error in the console.

java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file com/ve/kavachart/applet/speedoApp
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	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)

Anyone ever implement an applet in a jspdynpage? Know what I'm missing here? Any reply would be greatly appreciated. Thanks.

Regards,

Rich Heilman

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There could be two things.

1. The path you are specifying for your archive is incorrect

archive="xxxxx"

2. The jar is imcompatible with client's jdk version.

can you post your JSP code for the applet section

Message was edited by: Prakash Singh

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Prakash, Thanks for the reply. It looks like I have successfully deployed the .sda file. But I think that the path for the following is incorrect, as you suggested, I have no clue as to what it wants here.



<APPLET CODE="com.ve.kavachart.applet.speedoApp" ARCHIVE="speedoApp.jar" WIDTH=300 HEIGHT=150>
	<param name=needleStyle value="2">
	<param name=speedoPosition value="1">
</APPLET>


Regards,

Rich Heilman

Former Member
0 Kudos

Hi Rich,

I see your problem. I think you are storing speedoApp.jar in your par. If that is the case then it should look like following.

ARCHIVE="/irj/portalapps/your par name/directory/speedoApp.jar"

Your par name = name your par

directory = folder where you store your jar inside the par

<b>

Note: Make sure you put your speedoApp.jar in dist->some folder that you create.</b>

Regards,

Prakash

Former Member
0 Kudos

Hi Rich,

If there's nothing wrong with your .jar file this error occurs when the .jar file cannot be found. The reason for this error is that instead of the .jar file server sends you "404 File Not Found error" which is .html file. Then your class loader tries to load this 404 page as a .jar file and it fails.

Regards,

Ville

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Prakash, I took your idea and did it your way. It is working when I attach the .jar file to the .par. What I really wanted to do was use this applet which I deployed to the engine via an .sda file instead of embedding the .jar into the .par. Do you have any idea what the path would be in this case?

Thanks a lot for you help.

Regards,

Rich Heilman

Former Member
0 Kudos

Good question. I have no idea because i don't know where it is getting deployed on the J2EE. I can figure it out if you send me the .SDA file at psingh(at)ust.net.

Answers (0)