Jetty Runner. PWC6349: Cannot find a java compiler for compilation

I was deploying my application to a jetty runner however this exception showed everytime I access a JSP

  PWC6349: Cannot find a java compiler for compilation.  If running with JDK 5 or before, Ant or JDT compiler can be used, if the corresponding jars and bridge classes (org.apache.jasper.compiler.AntJavaCompiler or org.apache.jasper.compiler.JDTJavaCompiler) are included
            at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
            at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
            at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
            at org.apache.jasper.compiler.Compiler.initJavaCompiler(Compiler.java:773)
            at org.apache.jasper.compiler.Compiler.<init>(Compiler.java:140)
            at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:288)
            at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:622)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
            at org.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:103)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
            at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800)
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
            at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
            at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
            at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
            at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
            at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:131)
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
            at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
            at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
            at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
            at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
            at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
            at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
            at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
            at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
            at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
            at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
            at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
            at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
            at org.eclipse.jetty.server.Server.handle(Server.java:497)
            at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
            at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)
            at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
            at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
            at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
            at java.lang.Thread.run(Unknown Source)

Whenever I echo %JAVA_HOME%
This shows up
enter image description here

So my path is definitely correct.

and here’s my POM.xml

        <!-- Servlet 3.0 API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <!-- Spring Framework Dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
            <!--Exclude the default logging used by Spring.
                Which will be replaced by JCL logback
            -->
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- LogBack dependencies -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${jcloverslf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP-java6</artifactId>
            <scope>compile</scope>
        </dependency>
        <!-- Use this only if you're running on Java 8 or onwards
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP-java</artifactId>
            <version>2.2.5</version>
            <scope>compile</scope>
        </dependency>-->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <!--User Type core, extended, and SPI are dependencies of Hibernate and Joda Time Integrator-->
        <dependency>
            <groupId>org.jadira.usertype</groupId>
            <artifactId>usertype.core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.jadira.usertype</groupId>
            <artifactId>usertype.extended</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jadira.usertype</groupId>
            <artifactId>usertype.spi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.webutilities</groupId>
            <artifactId>webutilities</artifactId>
            <version>0.0.7</version>
        </dependency>
        <!-- SPring Security Tag libs -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
        </dependency>
        <!-- test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <!--Supposed to be on the admin-core module, however this is a workaround
        since it's requried when building hte war-->
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
        </dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-jsp</artifactId>
    <version>9.2.7.v20150116</version>
</dependency>

    </dependencies>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>   <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>${java-version}</source>
                <target>${java-version}</target>
            </configuration>
        </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.version}</version>
                <configuration>
                    <systemProperties>
                        <systemProperty>
                            <name>jetty.port</name>
                            <value>8081</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
    </build>


Source: jsp

Leave a Reply