I have been facing below issue during the ANT build of my older project with JAVA 17. The build.xml is created using .vm(Velocity Template file).
Error: [exec] Error: java.lang.NoClassDefFoundError: java/sql/SQLException
In Details Error : _build.xml:394: java.lang.NoClassDefFoundError: java/sql/SQLException [gide] at .apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116) [gide] at .apache.tools.ant.Task.perform(Task.java:348) [gide] at .apache.tools.ant.Target.execute(Target.java:435) [gide] at .apache.tools.ant.Target.performTasks(Target.java:456) [gide] at .apache.tools.ant.Project.executeSortedTargets(Project.java:1405) [gide] at .apache.tools.ant.Project.executeTarget(Project.java:1376)
I've tried to use --add-modules and checked if anything is restricting modules from being imported I didn't get anything for this particular error.