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

Posted on 2007-10-15
Last Modified: 2013-12-22
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)

Question by:irtekaz
    LVL 12

    Expert Comment

    by:Gibu George
    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



    Author Comment

    Thanks, I will add the jar files to the classpath and see if that works.
    LVL 5

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now