Jenkins build Success however received error in console

Jenkins build is a Success however I am receiving an error in the console “Exception in thread “main” java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Also while sending a POST Request I am receiving the below error

Sorry, An error occured while processing the request: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/spi/PersistenceProvider

That message hints that you may be trying to run a Jenkins controller with Java 11 (Java class version 55.0) and use a Jenkins agent that is running Java 8 (Java class version 52.0). That is not supported and does not work. The Jenkins agent needs to run the same Java virtual machine version as the controller.

The “Upgrading to Java 11” page says:

All agents must be running on the same JVM version as the controller due to how controllers and agents communicate. If you’re upgrading your Jenkins controller to run on Java 11, you also need to upgrade the JVM on your agents.

You can validate the version of each agent with the Versions Node Monitors plugin. This plugin provides information about the JVM version of each agent on the node management screen of your Jenkins instance. You can also configure this plugin to automatically disconnect any agent with an incorrect JVM version.

In future questions, it helps others in their attempts to help you if you include these 3 things.

  1. what did you try and what was the environment where you made the attempt?
  2. what did happen? (Error messages, description, outputs, stuff)
  3. what did you expect to happen?

Otherwise, it’s hard for us to get into your context and you’ll have to have someone who is exactly knowledgeable come along.