SpringBoot的web项目使用JRebel启动错误

解决办法:pom.xml中加入以下依赖

    <dependency>
            <groupId>org.eclipse.jdt.core.compiler</groupId>
            <artifactId>ecj</artifactId>
            <version>4.6.1</version>
            <scope>provided</scope>
        </dependency>

错误描述:如下

2020-08-13 13:51:33 JRebel: ERROR Class 'org.apache.jasper.compiler.AntCompiler' could not be processed by org.zeroturnaround.javarebel.integration.jasper.resource.AntCompilerCBP@java.net.URLClassLoader@db4316: org.zeroturnaround.bundled.javassist.CannotCompileException: [source error] no such class: org.apache.tools.ant.types.Path
    at org.zeroturnaround.bundled.javassist.expr.MethodCall.replace(SourceFile:257)
    at org.zeroturnaround.javarebel.integration.jasper.resource.AntCompilerCBP$1.edit(AntCompilerCBP.java:20)
    at org.zeroturnaround.bundled.javassist.expr.ExprEditor.loopBody(SourceFile:197)
    at org.zeroturnaround.bundled.javassist.expr.ExprEditor.doit(SourceFile:96)
    at org.zeroturnaround.bundled.javassist.CtBehavior.instrument(SourceFile:744)
Caused by: compile error: no such class: org.apache.tools.ant.types.Path
    at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.searchImports(SourceFile:479)
    at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.lookupClass(SourceFile:422)
    at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.lookupClassByJvmName(SourceFile:329)
    at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(SourceFile:711)
    at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(SourceFile:170)
    at org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(SourceFile:49)
2020-08-13 13:51:33.089||ERROR||[jsp]||main||9d3iqn6hzqhkx9||a038ab47-a853-4008-8808-dc4cb69e6a59||10.15.20.243||13480||Servlet.service() for servlet [jsp] threw exception
java.lang.IllegalStateException: No Java compiler available for configuration options compilerClassName: [null] and compiler: [null]
    at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:235) ~[tomcat-embed-jasper-9.0.22.jar:9.0.22]
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:595) ~[tomcat-embed-jasper-9.0.22.jar:9.0.22]
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399) ~[tomcat-embed-jasper-9.0.22.jar:9.0.22]
    at org.apache.jasper.servlet.JspServlet._serviceJspFile(JspServlet.java:385) ~[tomcat-embed-jasper-9.0.22.jar:9.0.22]
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:40001) ~[tomcat-embed-jasper-9.0.22.jar:9.0.22]
原文地址:https://www.cnblogs.com/Payne-SeediqBale/p/13495996.html