Search code examples
javaasp.netapplettelerikclassnotfoundexception

ClassNotFoundException when using applet with Telerik controls


First of all I am a dotnet developer and don't know anything about java. I am using a java applet in my asp.net application. basically this plugin is used for uploading folders which is not supported without using a plugin. I also have some telerik controls being used in one of my other pages. the problem is that when i try to run the page, I get a ClassNotFoundException in java.

I think this has got something to do with the telerik configurations in my web.config file

When I use the same applet in a different application which does not have any telerik controls or settings in the config, the applet works fine.

If anybody else has come across this issue or if you can tell me where I am going wrong, it would be really helpful.

Here's what I have in my aspx page.

 <applet width="200" height="30"
    codebase="assets/applet"
    id="PGatewayApplet"
    name="PGatewayApplet"
    code="com.gatewaytest.pgateway.applet.PGatewayApplet.class"
    archive="PGatewayApplet.jar,dcm4che-core-2.0.22.jar,log4j-1.2.13.jar,slf4j-api-1.5.0.jar,slf4j-log4j12-1.5.0.jar">
    <param name="mayscript" value="yes" />
    <param name="Mode" value="FileUpload" />
    <ASP:PLACEHOLDER ID="ExtraAppletParams" RUNAT="server"></ASP:PLACEHOLDER>
</applet>

I don't have the code for this applet. this same thing works fine in another asp.net application which does not have any telerik controls in it.


Solution

  • After a lot of digging, I found that the RadCompression key in my web.config file was causing the issue. here's the key

    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>
    

    I commented this in the config file and the applet started working.

    Hope this helps the others.