GCJ bug causing Tomcat+dbsight error

Submitted by brooksm on Thu, 2006-04-13 23:25.Troubleshooting

I've installed dbsight on tomcat5 but get a http 500 error. All the other webapps run fine. Here is the full error:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.catalina.authenticator.SingleSignOn.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.soxmnsfs.so)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.soxmnsfs.so)
java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)

root cause

java.lang.NoClassDefFoundError: while resolving class: org.apache.velocity.tools.struts.StrutsUtils
java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0)
java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
org.apache.velocity.tools.struts.MessageResourcesTool.init(java.lang.Object) (Unknown Source)
org.apache.velocity.tools.view.ViewToolInfo.getInstance(java.lang.Object) (Unknown Source)
org.apache.velocity.tools.view.servlet.ServletToolboxManager.getToolboxContext(java.lang.Object) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityViewServlet.createContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityLayoutServlet.createContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.catalina.authenticator.SingleSignOn.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.soxmnsfs.so)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.soxmnsfs.so)
java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0 logs.

--------------------------------------------------------------------------------

Apache Tomcat/5.0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by will on Fri, 2006-04-14 00:38.

Velocity is using Log4j. I suspect your tomcat's other application is conflicting with log4j or Velocity.

I would recommend you install DBSight on a fresh Tomcat, which we just tested to verify on Tomcat 5.0.28, and it ran fine. And since DBSight may require a lot of memory if you choose to load index into memory, it's better to have a server for DBSight itself.

If that's difficult to do, you may have to find out which other application is causing the log4j or velocity problem...

You can try the bundled-with-Jetty version also.

Submitted by brooksm on Fri, 2006-04-14 14:46.

Will, thanks for the reply. This is a brand new installation of Fedora Core 4, with the Tomcat 5.0x out of the box installation. I stopped all the other Tomcat webapps, but still get the same error. Can we rule out that Velocity is conflicting with another tomcat app?

Submitted by will on Fri, 2006-04-14 15:24.

We are using Suse + Tomcat 5.0.28

If a fresh installation, I don't think Velocity or log4j will matter if you don't have other application on the same Tomcat.

Submitted by will on Fri, 2006-04-14 15:44.

The only difference now is the Fedora and possibly jdk version.

Our testing java verison is "1.4.2_08".

And what's your jdk version?

Submitted by will on Fri, 2006-04-14 21:21.
Submitted by brooksm on Mon, 2006-04-17 09:40.

So to run DBSight on Fedora Core 4 I need to change my version of JDK to what version? Currently I have jdk1.4-2.0.1.

Submitted by will on Mon, 2006-04-17 09:48.

jdk 1.4 and 1.5 all works fine. No particular minor version requirement.

Let us know if you have any trouble.

Submitted by brooksm on Mon, 2006-04-17 10:07.

I have jdk 1.4. I'm confused as to what I need to change.

Submitted by will on Mon, 2006-04-17 11:32.

From the log like "/usr/lib/libgcj.so.6.0.0", I see you are using GCJ http://gcc.gnu.org/java/

You need to download the Sun's JDK 1.4 or 1.5 http://java.sun.com/j2se/1.4.2/download.html

After installation, check your jdk version by "java -version".

Submitted by brooksm on Mon, 2006-04-17 13:16.

Here is the output of 'java -version':
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

I've restarted Tomcat, but still get errors:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.catalina.authenticator.SingleSignOn.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.sodsus5q.so)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.sodsus5q.so)
java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)

root cause

java.lang.NoClassDefFoundError: org.apache.velocity.tools.struts.StrutsUtils
java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
org.apache.velocity.tools.struts.MessageResourcesTool.init(java.lang.Object) (Unknown Source)
org.apache.velocity.tools.view.ViewToolInfo.getInstance(java.lang.Object) (Unknown Source)
org.apache.velocity.tools.view.servlet.ServletToolboxManager.getToolboxContext(java.lang.Object) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityViewServlet.createContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityLayoutServlet.createContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source)
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.catalina.authenticator.SingleSignOn.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.sodsus5q.so)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.sodsus5q.so)
java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0 logs.

Submitted by will on Mon, 2006-04-17 14:23.

It still seems using "gcj"

 java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)

You may need to consult Tomcat manual. Here is something I found.

 The lines I added to $CATALINA_HOME/bin/setenv.sh are:
  export JAVA_HOME=/usr/lib/j2sdk1.5-sun

Of course, you need to adjust the directory for your settings.

Here is one more link that you may found helpful, which complains about Fedora's GCJ.

http://www.bifrost.org/problems.html

Submitted by brooksm on Wed, 2006-04-19 12:08.

Out of frustration, we changed from Tomcat to Jetty and it's now working. There is another problem that we are seeing in the configuration. The URL Prefix that we are setting up doesn't seem to work. This is what one of my engineers said:

I tried it and got this kind of URL with an "unable to connect" message

http://192.168.111.76/search?id=23045

The thing I found suspicious is that this URL is not using the 8080 port anymore, if it goes directly to the box using the default port 80, it's not going to work because we don't have a web service set up to receive http requests there!

I'd check their forum to see if there is anything there about this problem.

(I tried http://192.168.111.76:8080/search?id=23045 and got a 404 error, /search not found, which means that the config file didn't map the path "/search" to a servlet or cgi application)

Any Ideas?

Brooks

Submitted by will on Wed, 2006-04-19 15:13.

I am not quite clear what system you are trying to search on. The target system needs to have a working URL to render its content.

DBSight will render the URL as you specified in the template. The URL Prefix is just to get an URL there. You can modify the template file in "documents.vm" to customize the URL, or even put some javascripts there.

It's better to try the URL first, then configure the URL in the template.

Submitted by tom on Tue, 2006-05-09 19:15.

Fedora FC4 and Tomcat 5

Did anyone find a solution to this, I really don't want to have to install jetty now, after I just spent hours installing and learning how to use tomcat so I can run dbsight, arrgh!

The heck with this, I've spend weeks going down one dead end trail after another for a viable solution for opensource site search engine. We are trying to move from CFMX to Bluegragon and PHP, since we use a lot of opensource php apps and extend them. This is just the icing on the cake, I thought I'd be saving money by going opensource, that was a huge miscalculation on my part when I now look at the time I've wasted with bluedragon/lucene, zend_search, now dbsight. With verity's engine that's bundled with CFMX I put a fully functional site search engine togther in 1 hour, with ZERO problems.

Submitted by will on Wed, 2006-05-10 02:16.

Hi, you don't need to learn!

Just download the zip file, unzip it, cd to that directory, and type in

 java -jar start.jar

That's it!