title: iText and org.bouncycastle.asn1.ASN1Primitive not found
body: <p>I'm a newbie on iText. This is my first project using this library.</p>
  
  <p>I'm building a PDF with essentially a big table on it, and while compiling, i'm getting this Class Not Found error: <strong><em>class file for org.bouncycastle.asn1.ASN1Primitive not found</em></strong></p>
  
  <p>I'm confused, since i'm only using the basic functionalities, and didn't even touch the PDF Signing features. What should i do to fix the error?</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>JDK 1.7</li>
  <li>iText 5.3.5</li>
  <li>extrajars 2.2 (which provides bcmail-jdk15-146.jar, bcprov-jdk15-146.jar and bctsp-jdk15-146.jar)</li>
  </ul>
  
  <p>I only using iText inside one class, with these imports:</p>
  
  <pre><code>import com.itextpdf.text.BadElementException;
  import com.itextpdf.text.BaseColor;
  import com.itextpdf.text.Chunk;
  import com.itextpdf.text.Document;
  import com.itextpdf.text.DocumentException;
  import com.itextpdf.text.Font;
  import com.itextpdf.text.Image;
  import com.itextpdf.text.Paragraph;
  import com.itextpdf.text.Phrase;
  import com.itextpdf.text.Rectangle;
  import com.itextpdf.text.pdf.PdfPCell;
  import com.itextpdf.text.pdf.PdfPTable;
  import com.itextpdf.text.pdf.PdfWriter;
  </code></pre>
  
  <p>If it helps, i would like to clarify that when i run the project inside NetBeans, it compiles and runs just fine. The error appears when i try to compile it to a single executable jar file (which includes the dist/lib)</p>
  
  <p>This is build.xml target where the error appears:</p>
  
  <pre><code>&lt;target name="single_jar" depends="jar"&gt;
  
      &lt;property name="store.jar.name" value="Final"/&gt;
  
      &lt;property name="store.dir" value="store"/&gt;
      &lt;property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/&gt;
  
      &lt;echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/&gt;
  
      &lt;delete dir="${store.dir}"/&gt;
      &lt;mkdir dir="${store.dir}"/&gt;
  
      &lt;jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip"&gt;
          &lt;zipgroupfileset dir="dist" includes="*.jar"/&gt;
          &lt;zipgroupfileset dir="dist/lib" includes="*.jar"/&gt;
  
          &lt;manifest&gt;
              &lt;attribute name="Main-Class" value="${main.class}"/&gt;
          &lt;/manifest&gt;
      &lt;/jar&gt;
  
      &lt;zip destfile="${store.jar}"&gt;
          &lt;zipfileset src="${store.dir}/temp_final.jar"
          excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/&gt;
      &lt;/zip&gt;
  
      &lt;delete file="${store.dir}/temp_final.jar"/&gt;
  
  &lt;/target&gt;
  </code></pre>