title: why i am getting Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError?
body: <p>i found a java file on the web that allows me to read a pdf in a url and save it to my local machine, 
  i have sucsesfully compiled it and customized as a javabean so i can useit in my app, but when i test it i am getting the next error message.
  i have added the library (PDFOne.jar file) to my project in netbean and averything compiles well.</p>
  
  <p>in fact, the program detect my pdf url and validate it saying is a valid pdf file, but then the error comes:</p>
  
  <p>any tip ? i am completely new in java world.
  thanks in advance</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: com/gnostice/pdfone/PdfDocument
      at Read_PDF_From_URL.setProperty(Read_PDF_From_URL.java:51)
      at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)
      at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)
      at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)
      at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
      at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)
      at oracle.forms.engine.Runform.processMessage(Unknown Source)
      at oracle.forms.engine.Runform.processSet(Unknown Source)
      at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
      at oracle.forms.engine.Runform.onMessage(Unknown Source)
      at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
      at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
      at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$200(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: com.gnostice.pdfone.PdfDocument
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 39 more
  </code></pre>
  
  <p><strong>here is part of the source code:</strong></p>
  
  <pre><code>import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.net.ConnectException;
  import java.net.URL;
  import java.net.URLConnection;
  import oracle.forms.properties.*;
  import oracle.forms.ui.*;
  
  import com.gnostice.pdfone.PdfDocument;
  import java.net.MalformedURLException;
  
  public class Read_PDF_From_URL   extends VTextArea {
      private static final ID GEN = ID.registerProperty("sav");
  
    public boolean setProperty(ID id, Object value) {
      boolean retorno = true;
  
      try {
         if (id == GEN) {
             System.out.println("if");         
           URL url1 =
        new URL("http://www.gnostice.com/downloads/Gnostice_PathQuest.pdf");
  
        byte[] ba1 = new byte[1024];
        int baLength;
        FileOutputStream fos1 = new FileOutputStream("sibdownload.pdf");
  
        // Contacting the URL
        System.out.print("Connecting to " + url1.toString() + " ... ");
        URLConnection urlConn = url1.openConnection();
  
        // Checking whether the URL contains a PDF
        if (!urlConn.getContentType().equalsIgnoreCase("application/pdf")) {
            System.out.println("FAILED.\n[Sorry. This is not a PDF.]");
        } else {
          try {
  
            // Read the PDF from the URL and save to a local file
            InputStream is1 = url1.openStream();
            while ((baLength = is1.read(ba1)) != -1) {
                fos1.write(ba1, 0, baLength);
            }
            fos1.flush();
            fos1.close();
            is1.close();
  
            // Load the PDF document and display its page count
            System.out.print("DONE.\nProcessing the PDF ... ");
            PdfDocument doc = new PdfDocument();
            try {
              doc.load("sibdownload.pdf");
              System.out.println("DONE.\nNumber of pages in the PDF is " +
  </code></pre>