After following Otis' and Thorsten's advice, I still get:

HTTP ERROR: 500 No Java compiler available

running http://localhost:8280/solr/admin out of the Debian solr-jetty package.

I have *both* the sun 5 and 6 JDK and JRE installed and both have javac

/usr/lib/jvm/java-1.5.0-sun/bin/javac
/usr/lib/jvm/java-6-sun/bin/javac

I get the same error with JAVA_HOME set to either the sun JDK 5 or 6.

I have made sure to stop and start Jetty so it reads the environment.

% echo $JAVA_HOME
/usr/lib/jvm/java-1.5.0-sun

% echo $PATH
/usr/lib/jvm/java-1.5.0-sun:/usr/lib/jvm/java-1.5.0-sun/bin:/root/local/bin:/l/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

% which javac
/usr/lib/jvm/java-1.5.0-sun/bin/javac

% javac -version
javac 1.5.0_13

% cd /etc/init.d
% ./jetty stop
Stopping Jetty servlet engine: ...jetty.

% ./jetty start
Starting Jetty servlet engine: jetty.

% firefox http://localhost:8280/solr/admin &
HTTP ERROR: 500 No Java compiler available


I see in /etc/jetty/start.config some lines to put tools.jar into the classpath:

$(java.home)/lib/tools.jar    ! available com.sun.tools.javac.Main
$(java.home)/../lib/tools.jar ! available com.sun.tools.javac.Main

and noticed that java.home was not defined in this file.  I defined:

java.home=/usr/lib/jvm/java-1.5.0-sun

No change.

I see in /etc/jetty/webdefault.xml JSP servlet definition a note about compilers:

The JSP page compiler and execution servlet, which is the mechanism
used by Tomcat to support JSP pages.  Traditionally, this servlet is
mapped to URL patterh "*.jsp".  This servlet supports the following
initialization parameters (default values are in square brackets):

[...]
compiler Which compiler Ant should use to compile JSP pages. See the Ant documenation for more information. [javac]

I added "compiler" to the definition so in full that looks like:

  <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
        <param-name>logVerbosityLevel</param-name>
        <param-value>DEBUG</param-value>
    </init-param>
    <init-param>
        <param-name>fork</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>xpoweredBy</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>compiler</param-name>
        <param-value>javac</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>

I still get the error.


Can anyone suggest where I go from here?

Thanks,

Phil



Thorsten Scherler wrote:
On Tue, 2007-11-20 at 22:50 -0800, Otis Gospodnetic wrote:
Phillip,

I won't go into details, but I'll point out that the
>> Java compiler is called javac and if memory serves me well,
>> it is defined in one of Jetty's XML config files in its
>> etc/ dir.  The java compiler is used to compile JSPs that Solr
>> uses for the admin UI.  So, make sure you have javac and make
>> sure Jetty can find it.

e.g.
cd ~
vim .bashrc

...
export JAVA_HOME=/home/thorsten/opt/java
export PATH=$JAVA_HOME/bin:$PATH

The important thing is that $JAVA_HOME points to the JDK and it is first
in your path!

salu2

Otis

--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

----- Original Message ----
From: Phillip Farber <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, November 20, 2007 5:55:27 PM
Subject: Help with Debian solr/jetty install?


Hi,

I've successfully run as far as the example admin page on Debian linux
 2.6.

So I installed the solr-jetty packaged for Debian testing which gives
me Jetty 5.1.14-1 and Solr 1.2.0+ds1-1. Jetty starts fine and so does the Solr home page at http://localhost:8280/solr

But I get an error when I try to run http://localhost:8280/solr/admin

HTTP ERROR: 500
No Java compiler available

I have sun-java6-jre and sun-java6-jdk packages installed. I'm new to servlet containers and java webapps. What should I be looking for to fix this or what information could I provide the list to get me moving forward from here?

I've included the trace from the Jetty log, and the java properties
dump from the example below.

Thanks,
Phil

---

Java properties (from the example):
----------------------------------

sun.boot.library.path = /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386
java.vm.version = 1.6.0-b105
java.vm.name = Java HotSpot(TM) Client VM
user.dir = /tmp/apache-solr-1.2.0/example
java.runtime.version = 1.6.0-b105
os.arch = i386
java.io.tmpdir = /tmp

java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
java.class.version = 50.0
jetty.home = /tmp/apache-solr-1.2.0/example
sun.management.compiler = HotSpot Client Compiler
os.version = 2.6.22-2-686
java.class.path = /tmp/apache-solr-1.2.0/example:/tmp/apache-solr-1.2.0/example/lib/jetty-6.1.3.jar:/tmp/apache-solr-1.2.0/example/lib/jetty-util-6.1.3.jar:/tmp/apache-solr-1.2.0/example/lib/servlet-api-2.5-6.1.3.jar:/tmp/apache-solr-1.2.0/example/lib/jsp-2.1/ant-1.6.5.jar:/tmp/apache-solr-1.2.0/example/lib/jsp-2.1/core-3.1.1.jar:/tmp/apache-solr-1.2.0/example/lib/jsp-2.1/jsp-2.1.jar:/tmp/apache-solr-1.2.0/example/lib/jsp-2.1/jsp-api-2.1.jar:/usr/share/ant/lib/ant.jar
java.home = /usr/lib/jvm/java-6-sun-1.6.0.00/jre
java.version = 1.6.0
java.ext.dirs = /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ext:/usr/java/packages/lib/ext sun.boot.class.path = /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/classes




Jetty log (from the error under Debian Solr/Jetty):
----------------------------------------------------

org.apache.jasper.JasperException: No Java compiler available
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:367)
    at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
    at
 org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:286)
    at
 org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171)
    at org.mortbay.jetty.servlet.Default.handleGet(Default.java:302)
    at org.mortbay.jetty.servlet.Default.service(Default.java:223)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
    at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
    at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
getRootCause():
java.lang.IllegalStateException: No Java compiler available
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:225) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:560) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
    at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
    at
 org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:286)
    at
 org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171)
    at org.mortbay.jetty.servlet.Default.handleGet(Default.java:302)
    at org.mortbay.jetty.servlet.Default.service(Default.java:223)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
    at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
    at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

20:50:00.509 ERROR! [SocketListener0-9] org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:593) >11> /solr/admin/:
java.lang.IllegalStateException: No Java compiler available
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:225) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:560) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
    at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
    at
 org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:286)
    at
 org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171)
    at org.mortbay.jetty.servlet.Default.handleGet(Default.java:302)
    at org.mortbay.jetty.servlet.Default.service(Default.java:223)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
    at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
    at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)




Reply via email to