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$ Source)
      at java.awt.Component$ Source)
      at 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>(
      at com.imxinc.isys.claimsentry.imageviewer.ClaimImageViewerApplet.init(
      at Source)
      at Source)

Who is Participating?
ebertkConnect With a Mentor Commented:
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.
Gibu GeorgeChief Technology OfficerCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.