title: ZXing java.lang.NoClassDefFoundError: com/google/zxing/WriterException Error
body: <h3>Project Context</h3>
  <p>Currently trying to generate QR codes to implement some information within it, that includes data (such as a student ID number, first name, last name) and MAC address of local computer (testing on my desktop computer for now, but will be applied to individual raspberry Pis).</p>
  <h3>Error in Question</h3>
  <p><a href="https://i.stack.imgur.com/TmFIq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TmFIq.png" alt="enter image description here" /></a></p>
  <h3>The Java Code</h3>
  <p>Ignore the data link input, this is for test purposes only.</p>
  <pre><code>    public static void main(String[] args) throws Exception
  {        
      MACFinder GM = new MACFinder();
      GM.getMac();
      
      System.out.println();
      
      try
      {
          GM.generateQRCodeImage();
      }
      catch (WriterException e)
      {
          System.out.println(&quot;Couldn't generate QR code, WriterException...&quot;);
      }
      catch (IOException e)
      {
          System.out.println(&quot;Couldn't generate QR code, IOException...&quot;);
      }
      catch (NotFoundException e)
      {
          System.out.println(&quot;This library couldn't be found... (ZXing)&quot;);
      }
  }
  
      public void generateQRCodeImage() throws WriterException, IOException, NotFoundException
  {
      String data = &quot;https://www.youtube.com/watch?v=qzYpgbP8RHA&quot;;
      String filepath = &quot;C:\\Users\\JmJ23\\Documents\\Code\\Internship Code&quot;;
      
      QRCodeWriter qrCodeWriter = new QRCodeWriter();
      BitMatrix bitMatrix = qrCodeWriter.encode(data, BarcodeFormat.QR_CODE, 250, 250);
  
      Path path = FileSystems.getDefault().getPath(filepath);
      MatrixToImageWriter.writeToPath(bitMatrix, &quot;PNG&quot;, path);
  }
  </code></pre>
  <h3>POM.xml Dependencies</h3>
  <pre><code>    &lt;dependency&gt;  
      &lt;groupId&gt;com.google.zxing&lt;/groupId&gt;  
      &lt;artifactId&gt;core&lt;/artifactId&gt;  
      &lt;version&gt;3.3.0&lt;/version&gt;  
  &lt;/dependency&gt; 
  
  &lt;dependency&gt;  
      &lt;groupId&gt;com.google.zxing&lt;/groupId&gt;  
      &lt;artifactId&gt;javase&lt;/artifactId&gt;  
      &lt;version&gt;3.3.0&lt;/version&gt;  
  &lt;/dependency&gt;
  </code></pre>
  <p>I understand that a NoClassDefFoundError is when a library/class is called but the class in question is not found at runtime... but why would this be the case if I have installed it into my Maven project? As a note I cleaned the project multiple times but with no progress. Any advice?</p>