What is the problem? (If you need more information, just ask; do not answer until you have all the information you need.):
cd /home/user/NetBeansProjects/MyApp; JAVA_HOME=/app/jdk /app/netbeans/java/maven/bin/mvn -Dexec.vmArgs= "-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}" -Dexec.executable=/app/jdk/bin/java -Dexec.mainClass=com.mycompany.myapp.ClientCode -Dexec.classpathScope=runtime -Dexec.appArgs= process-classes org.codehaus.mojo:exec-maven-plugin:3.1.0:exec
Scanning for projects...

------------------------< com.mycompany:MyApp >-------------------------
Building MyApp 1.0-SNAPSHOT
  from pom.xml
--------------------------------[ jar ]---------------------------------

--- resources:3.3.1:resources (default-resources) @ MyApp ---
Copying 1 resource from src/main/resources to target/classes

--- compiler:3.8.1:compile (default-compile) @ MyApp ---
Nothing to compile - all classes are up to date

--- exec:3.1.0:exec (default-cli) @ MyApp ---
Sep. 15, 2023 3:42:46 A.M. org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 6.3.0.Final
Sep. 15, 2023 3:42:46 A.M. org.hibernate.cache.internal.RegionFactoryInitiator initiateService
INFO: HHH000026: Second-level cache disabled
Sep. 15, 2023 3:42:46 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using built-in connection pool (not intended for production use)
Sep. 15, 2023 3:42:46 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: Loaded JDBC driver class: org.sqlite.JDBC
Sep. 15, 2023 3:42:46 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001012: Connecting with JDBC URL [jdbc:sqlite:mydatabase.sqlite]
Sep. 15, 2023 3:42:46 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {}
Sep. 15, 2023 3:42:46 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Sep. 15, 2023 3:42:46 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
INFO: HHH10001115: Connection pool size: 20 (min=1)
Sep. 15, 2023 3:42:47 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PoolState stop
INFO: HHH10001008: Cleaning up connection pool [jdbc:sqlite:mydatabase.sqlite]
java.lang.NullPointerException
	at com.mycompany.myapp.FoodDao.save(FoodDao.java:34)
	at com.mycompany.myapp.ClientCode.main(ClientCode.java:22)
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time:  3.085 s
Finished at: 2023-09-15T03:42:47-04:00
------------------------------------------------------------------------

ClientCode.java:
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.mycompany.myapp;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class ClientCode {

    public static void main(String[] args) throws Exception {

//        Transaction tx = null;
        
        try/*( Session session = HibernateUtil.getSessionFactory().openSession() )*/ {
//            tx = session.beginTransaction();

            // FOR APPLE
            Food apple = new Apple(8.9);
            FoodDao.getInstance().save(apple);
            
//            // FOR BREAD LOAF
            ShippingForm shippingForm = new ShippingForm(123.45, 45.123, LocalDateTime.now(), false);
            BreadSlice breadSlice1 = new BreadSlice(0.2, 420.0, LocalDateTime.now().plusMinutes(1), false);
            BreadSlice breadSlice2 = new BreadSlice(0.8, 1680.0, LocalDateTime.now().plusMinutes(2), false);
            List<BreadSlice> breadSlices = new ArrayList<>(2);
            breadSlices.add(breadSlice1);
            breadSlices.add(breadSlice2);
//            
            Food breadLoaf = new BreadLoaf("Red and delicious", shippingForm, breadSlices);
            FoodDao.getInstance().save(breadLoaf);
            
//            // DISPLAY ALL FOOD
            List<Food> foods = FoodDao.getInstance().loadAllData(Food.class);
            System.out.println("All of the ITransactionSets: " + foods);

//            tx.commit();
        } catch (Exception e) {
//            tx.rollback();
            e.printStackTrace();
        }
    }
}


FoodDao.java:
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.mycompany.myapp;

import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import java.util.LinkedList;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.Transaction;

public class FoodDao {
    private static FoodDao transactionSetDao = null;
    
    private FoodDao() {}
    
    public static FoodDao getInstance() {
        if(transactionSetDao == null) {
            transactionSetDao = new FoodDao();
        }
        
        return transactionSetDao;
    }
    
    public void save(Food transactionSet) {
        Transaction tx = null;
        
        try( Session session = HibernateUtil.getSessionFactory().openSession() ) {
            tx = session.beginTransaction();
            
            session.merge(transactionSet);
            
            tx.commit();
        }
    }
    
    public <T> List<T> loadAllData(Class<T> type) {
        Transaction tx = null;
        
        try( Session session = HibernateUtil.getSessionFactory().openSession() ) {
            tx = session.beginTransaction();
            
            CriteriaBuilder builder = session.getCriteriaBuilder();
            CriteriaQuery<T> criteria = builder.createQuery(type);
            criteria.from(type);

            List<T> data = session.createQuery(criteria).getResultList();

            tx.commit();
            
            return data;
        }
    }
}