Symptom
- Build failure occurs during SAP Commerce Cloud build process with below exception.
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/tagext/TagLibraryValidator - Error message displayed similar to: "ERROR compiling for maintenanceweb: Generation completed with [1] errors in [83] milliseconds."
- Recommendation to disable precompilation process to prevent errors with below detailed exception stack trace and error message.
stdout: [jasper2] SEVERE: Compilation errorstdout: [jasper2] java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/tagext/TagLibraryValidatorstdout: [jasper2] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)stdout: [jasper2] at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)stdout: [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1482)stdout: [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)stdout: [jasper2] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)stdout: [jasper2] at java.base/java.lang.reflect.Method.invoke(Method.java:580)stdout: [jasper2] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)stdout: [jasper2] at org.apache.tools.ant.Task.perform(Task.java:350)stdout: [jasper2] at java.base/java.util.Vector.forEach(Vector.java:1359)stdout: [jasper2] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)stdout: [jasper2] ... 160 morestdout: [jasper2] Caused by: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/tagext/TagLibraryValidatorstdout: [jasper2] at java.base/java.lang.ClassLoader.defineClass1(Native Method)stdout: [jasper2] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)stdout: [jasper2] at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1172)stdout: [jasper2] at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1340)stdout: [jasper2] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)stdout: [jasper2] at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1357)stdout: [jasper2] ... 31 morestdout: [jasper2] Caused by: java.lang.ClassNotFoundException: jakarta.servlet.jsp.tagext.TagLibraryValidatorstdout: [jasper2] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1402)stdout: [jasper2] at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1357)stdout: [jasper2] at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1112)stdout: [jasper2] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)stdout: [jasper2] ... 36 morestdout: [jasper2]stdout: [jasper2] Error count: [1]sterr: [echo]sterr: [echo]sterr: [echo]sterr: [echo]sterr: [echo]sterr: [echo]sterr: [echo] ERROR compiling jsp's for maintenanceweb: Generation completed with [1] errors in [104] millisecondssterr: [echo] NOTE: To avoid these error(s) you can disable the jsp precompilationsterr: [echo] by setting the jspcompile-tag in your extensioninfo.xml to: jspcompile="false"sterr: [echo]sterr: [echo]sterr:sterr: BUILD FAILEDsterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/build.xml:13: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/compiling.xml:95: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/compiling.xml:136: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/util.xml:42: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/util.xml:44: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/compiling.xml:143: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/compiling.xml:333: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/compiling.xml:557: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/compiling.xml:763: The following error occurred while executing this line:sterr: /opt/workspace/build/commerce-suite/hybris/bin/platform/resources/ant/deploying.xml:361: jsp errorsterr:sterr: Total time: 30 seconds
**Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.**
Read more...
Environment
SAP Commerce cloud 2211 for JDK21
Product
SAP Commerce Cloud 2211 for JDK21
Keywords
build failure, precompilation error, jspcompile, extensioninfo.xml, java.lang.NoClassDefFoundError, jakarta/servlet/jsp/tagext/TagLibraryValidator, TagLibraryValidator, JDK21, tomcat, bundled.tomcat.version , KBA , CEC-SCC-CLA-BUI , Build Process , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview