• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1809
  • Last Modified:

java.lang.NoClassDefFoundError: javax/mail/Message$RecipientType

We use a proprietary application developed using Java at our work place. Once we logon to the application we are able to access certain menus such as claims, providers etc. One some of the systems
one of the menus fails to load. It starts to load a java applet, but the stops and just shows a red x at the
top right hand corner. The Java console displays the following error:

Java.lang.NoClassDefFoundError: javax/mail/Message$RecipientType
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.getDeclaredMethod(Unknown Source)
      at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
      at java.awt.Component.access$100(Unknown Source)
      at java.awt.Component$2.run(Unknown Source)
      at java.awt.Component$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Component.checkCoalescing(Unknown Source)
      at java.awt.Component.<init>(Unknown Source)
      at java.awt.Container.<init>(Unknown Source)
      at javax.swing.JComponent.<init>(Unknown Source)
      at javax.swing.JPanel.<init>(Unknown Source)
      at javax.swing.JPanel.<init>(Unknown Source)
      at javax.swing.JPanel.<init>(Unknown Source)
      at com.imxinc.isys.claimsentry.imageviewer.panel.EmailPanel.<init>(EmailPanel.java:60)
      at com.imxinc.isys.claimsentry.imageviewer.ClaimImageViewerApplet.init(ClaimImageViewerApplet.java:83)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

1 Solution
Gibu GeorgeCTOCommented:
Hello irtekaz,

Make sure that you have tha jar files required for mail API on you machine, i.e. mail.jar and activation.jar, and make sure that this is in you classpath, by adding it to tne env variable CLASSPATH


irtekazAuthor Commented:
Thanks, I will add the jar files to the classpath and see if that works.
Since this is an Applet, not an full-blown application the problem is almost 100% a server issue.  If you add the JAR files and change the classpath on your local machine it might fix the issue for you, but not for anyone else.  (Hence some work some don't)

What you need to do is make sure that the missing JAR files are in the same directory on the server as the HTML page that displays the Applet.  The failure to load is being caused by not finding the class file (which is contained in one of the jar fies) on the server, not your local machine.  Put all of the jar files in the same directory as the page that contiains the applet and this should fix it.

Also, if the applet is using an attribute called "codebase" you will need to put the jar files in that directory.  If you view source on the HTML page and search for applet, you should see the codebase attribute in the applet tag.  If you do, put the jar files in that directory instead of the one where the HTML file was located.

This should do if for you.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now