1 Reply Latest reply on Sep 18, 2007 4:52 PM by cyril gonnot

    jsp error : No Java compiler available

    cyril gonnot Newbie

      Hi,

      I am trying to deploy an application in jboss 4.2.1, I have the error below when I try to access a JSP file. The application runs fine when I use Tomcat 6.0.14 as a standalone server but not in jboss. I have set JAVA_HOME to a JDK 1.5 folder but my understanding is that it should work even with a JRE as there is an included compiler. Anyone had this issue before ?

      thanks,

      Cyril

      java.lang.IllegalStateException: No Java compiler available
      org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:229)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:561)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

        • 1. Re: jsp error : No Java compiler available
          cyril gonnot Newbie

          I still have this issue, however when setting jboss logs to debug I see the 2 NoClassDefFoundError exceptions below. I checked and the first class is in jasper-jdt.jar in the web deployer while the second one I could not find it, so I dropped ant.jar which contains it in the web deployer, but still it doesn't find any of the class. Any idea of what is wrong here ? Is jboss missing some files ?

          Throwable
          java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/env/INameEnvironment
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:164)
          at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:238)
          at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:217)
          at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:561)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

          Throwable
          java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildListener
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:164)
          at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:238)
          at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:219)
          at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:561)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)