title: how to solve the error java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject
body: <pre><code>File file = new File("D:\\testExcelInput.xlsx");
      FileInputStream fIP = new FileInputStream(file);
  
    //get the existing sheet from the workbook
      XSSFWorkbook wb = new XSSFWorkbook(fIP);
      XSSFSheet sheet = wb.getSheetAt(0);
  
    //get the count of already existing rows  
      int i=sheet.getPhysicalNumberOfRows();
      Row row=sheet.createRow(++i);
  
    //input date in the required format  
      Cell cellDate = row.createCell(0);
      cellDate.setCellValue(dateFormat.format(date));
  
    //input item ID 
      Cell cellItem = row.createCell(1);
      //cellItem.setCellType(CellType.NUMERIC);
      cellItem.setCellType(XSSFCell.CELL_TYPE_NUMERIC);
      cellItem.setCellValue(ItemID);
  
    //input name
      Cell cellName = row.createCell(2);
      cellName.setCellValue(ItemName);
  
    //create a number cell and insert quantity 
      Cell cellQuant = row.createCell(3);
      cellQuant.setCellType(XSSFCell.CELL_TYPE_NUMERIC);
      cellQuant.setCellValue(quant);
  
      try ( //save the changes by writing the data in the workbook
              FileOutputStream fileOut = new FileOutputStream("D:\\testExcelInput.xlsx")) {
          wb.write(fileOut);
          //wb.close();
  </code></pre>
  
  <p>This is my code. I can't find the reason behind the error . it worked fine when i used hssf and .xls file but i needed to use .xlsx file that's why i used xssf .</p>