0

I have a spring boot application with SQLite3 database, that I need to convert into a JAR and run it. But the problem which I am facing while running the JAR is values are not going to update into the SQLite DB. I thought it may be a code issue but when debugging or running the Spring Boot app values were updated successfully. I am not understanding the problem with the JAR.

I thought like while running the JAR may be it is lossing the connection with db. I have used entitymanager.isOpen() method to check the db connection and it is returning the true.

@Transactional()
public FileTransferStatusDetailsEntity saveFileTransferStatusDetails(
            FileTransferStatusDetailsEntity fileTransferStatusDetailsEntity) {

        logger.info(" FileTransferStatusDetailsRepositoryImpl.saveFileTransferStatusDetails()");
        try {


            fileTransferStatusDetailsEntity = entityManager.merge(fileTransferStatusDetailsEntity);


        } catch (Exception e) {
            logger.error("Exception  saveFileTransferStatusDetails() in  FileTransferStatusDetailsRepositoryImpl:"
                    + ExceptionUtils.getFullStackTrace(e));
        } finally {
            entityManager.flush();
            entityManager.clear();
        }
        return fileTransferStatusDetailsEntity;

    }

It got stuck at entityManager.merge(entity) method.

Bulat
  • 720
  • 7
  • 15

0 Answers0