You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Marcus Stratmann <st...@gmx.de> on 2006/05/05 17:21:48 UTC

Re: solr setup

Yonik Seeley wrote:
> If you start from a normal tomcat distribution, we will be able to
> eliminate that difference.

Yes, I finally got Solr working with Tomcat.
But there are still two minor problems.
The first appears when I try to get the statistics page.
I'm getting this error message:

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 18 in the jsp file: /admin/stats.jsp
Generated servlet error:
/var/lib/tomcat5/work/Catalina/localhost/solr/org/apache/jsp/admin/stats_jsp.java:106: for-each loops are not supported in -source 1.3
(try -source 1.5 to enable for-each loops)
for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {

I guess it's a Tomcat problem, but I don't know where it comes
from and what I can do. I'm using Tomcat 5.0.30 (from debian
testing) with the latest solr.war.


The second problem arises when I call the function "Set Level" in the
"Logging" menu. The error message is

exception

org.apache.jasper.JasperException
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:860)

root cause

java.lang.NullPointerException
        java.io.File.<init>(File.java:194)
        org.apache.jsp.admin.action_jsp._jspService(action_jsp.java:132)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:860)


Well, I don't really need this function, so just take it as an error
report.

Marcus



Re: solr setup

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm getting this error message:
:
: org.apache.jasper.JasperException: Unable to compile class for JSP
: An error occurred at line: 18 in the jsp file: /admin/stats.jsp
: Generated servlet error:
: /var/lib/tomcat5/work/Catalina/localhost/solr/org/apache/jsp/admin/stats_jsp.java:106: for-each loops are not supported in -source 1.3
: (try -source 1.5 to enable for-each loops)
: for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {

This is an issue with TomCat trying to compile the JSPs using Java1.3 --
but Solr requires that it be compiled and run using Java1.5.

I'm notsure why TomCat choose to make hte default 1.3, but you can change
by setting the compilerSourceVM and compilerTargetVM values in your
server config.  They are documented here...

http://tomcat.apache.org/tomcat-5.0-doc/jasper-howto.html#Configuration

: java.lang.NullPointerException
:         java.io.File.<init>(File.java:194)
:         org.apache.jsp.admin.action_jsp._jspService(action_jsp.java:132)

That was definitely a Solr bug.  Chaning the log level uses the
same JSP as togglging the "health check" status -- and that JSP wanted to
make a File object out of the healthCheck file name ... even if there
wasn't one.

I've commited a fix.




-Hoss


Re: solr setup

Posted by Yonik Seeley <ys...@gmail.com>.
On 5/5/06, Marcus Stratmann <st...@gmx.de> wrote:
> Yonik Seeley wrote:
> > If you start from a normal tomcat distribution, we will be able to
> > eliminate that difference.
>
> Yes, I finally got Solr working with Tomcat.
> But there are still two minor problems.
> The first appears when I try to get the statistics page.
> I'm getting this error message:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
> An error occurred at line: 18 in the jsp file: /admin/stats.jsp
> Generated servlet error:
> /var/lib/tomcat5/work/Catalina/localhost/solr/org/apache/jsp/admin/stats_jsp.java:106: for-each loops are not supported in -source 1.3
> (try -source 1.5 to enable for-each loops)

It looks like Tomcat 5.0 doesn't support Java5 in JSPs (out-of-the-box
at least).
Could you try the latest Tomcat 5.5?  It worked fine for me.

You don't need an official package for your OS... it's easiest to
simply download the latest directly from apache, unpack it, and go! 
(no installation is necessary, you just need to have Java5 in your
path).

http://tomcat.apache.org/download-55.cgi#5.5.17


-Yonik