Monday, March 24, 2025

eclipse 2025-03: JBoss Tools 4.29.1 issue: An internal error occurred during: "Importing Maven projects". class org.eclipse.jdt.internal.core.JavaNature cannot be cast to class org.eclipse.jdt.core.IJavaProject (org.eclipse.jdt.internal.core.JavaNature and org.eclipse.jdt.core.IJavaProject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @21fd7397)


>CONTEXT

Debian 11, Eclipse 2025-03/Java21 and project using OpenJDK 17.


>PROBLEM

After the installation of JBoss Tools 4.29.1, as follows:

 

, and when importing a jee maven project on Eclipse, the the JBoss Tool plugin returns the following error message:


An internal error occurred during: "Importing Maven projects".

class org.eclipse.jdt.internal.core.JavaNature cannot be cast to class org.eclipse.jdt.core.IJavaProject (org.eclipse.jdt.internal.core.JavaNature and org.eclipse.jdt.core.IJavaProject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @21fd7397)



>SOLUTION

After checking if the OpenJDK 17 is not corrupted, the issue was solved by adding some additional JBoss plugins, pointing to menu, Help, Install New Software.

Fill the "Work with:" input box with:

JBoss Tools - Core + Central Update Site - TOOLS-ssh/photon/stable/composite/4.29.1/ - https://download.jboss.org/jbosstools/photon/stable/composite/4.29.1/