0

I create 2 opengrok project on the server following the instruction in How-to-install-OpenGrok.

Each project have its own name: project1 and project 2.

After I create the index, deploy my projects and restart my tomcat. Only the first project that I viewed on browser works. The other project will prompt error:

HTTP Status 500 - org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.opensolaris.opengrok.analysis.AnalyzerGuru

type Exception report

message org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.opensolaris.opengrok.analysis.AnalyzerGuru

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.opensolaris.opengrok.analysis.AnalyzerGuru org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:555) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:461) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:401) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:345) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.opensolaris.opengrok.web.StatisticsFilter.doFilter(StatisticsFilter.java:55) org.opensolaris.opengrok.web.AuthorizationFilter.doFilter(AuthorizationFilter.java:66)

For example: If I view Project 1 first, Project 2 will prompt error. The only way to make Project 2 work is to restart tomcat and view project 2 first.

The version of OpenGrok that I'm using is V1.0. Tomcat version 8.

Command that I use to create index is list below:

OPENGROK_VERBOSE=true OPENGROK_WEBAPP_CONTEXT=${webapp name} OPENGROK_INSTANCE_BASE=${path_to_store_index_files} ./OpenGrok index ${directory_of_source_code}
T-Heron
  • 5,385
  • 7
  • 26
  • 52
  • URL that I use to view these two project is different. One using localhost:8080/project1, the other using localhost:8080/project2 – Ling Guo Apr 15 '17 at 12:21

2 Answers2

0

if jdk is oracle one 1.8 , then this looks like a bug - feel free to open one on https://github.com/OpenGrok/OpenGrok/issues

foo
  • 26
  • 1
0

I encountered the same problem with the second OpenGrok (1.1 rc11) instance on Tomcat8 on Ubuntu 16.04.

It looks like an insufficient memory problem. I tried below steps and the problem disappeared.

  1. Set a larger heap size for Tomcat8 in file /etc/default/tomcat8. Here it's set to 8g. (There is total 32GB RAM on my machine)

    JAVA_OPTS="-Djava.awt.headless=true -Xmx8g -XX:+UseConcMarkSweepGC"

  2. Restart the tomcat8 service

    sudo service tomcat8 restart

Hope above help.

Mmt
  • 1
  • 1