0

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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116) [gide] at org.apache.tools.ant.Task.perform(Task.java:348) [gide] at org.apache.tools.ant.Target.execute(Target.java:435) [gide] at org.apache.tools.ant.Target.performTasks(Target.java:456) [gide] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) [gide] at org.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.

1
  • I was able to resolve this error by myself. I've to correct the tag below. includeruntime = "false" and I needed to update it to "true" due to significant changes done from java 8 to java 17 regarding the java classes. As some of the api such as java.sql moved to modules Commented Mar 26 at 10:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.