Reference Guide

Class Loader


  1. All Plugins
    1. Apache/IIS can't contact servlet runner
    2. I just get a 404 for JSP or Servlets!
    3. browser returns test.jsp source
    5. File not found
    6. Resin uses the wrong JDK version
    7. How do I pass JVM arguments like -ms48m?
    8. NoSuchMethodError: org.w3c.dom.Node: method = getNamespaceURI()Ljava/lang/String; not found
  2. IIS
    1. caucho-status fails on IIS
    2. How to use index.jsp as default document on IIS?
  3. Apache
    1. Apache won't start on Win32
    2. Apache doesn't find my resin.conf
    3. mod_caucho caucho-status returns no data
    4. Can I use mod_rewrite with Resin?
  4. Linux/Unix
    1. not found
    2. How do I install Resin as a Linux service?

All Plugins

Apache/IIS can't contact servlet runner

The particular error message is something like:

Cannot connect to servlet runner at localhost:6802

The servlet runner process needs to be started. In resin-2.1/bin the httpd executable will start the servlet runner.

The httpd executable will start Java and wait for connections from the web server.

I just get a 404 for JSP or Servlets!

Make sure you try the following:

  1. First, check your configuration with the standalone httpd. Both httpd and srun use the same configuration file, so the results should be identical.
  2. Check http://localhost/caucho-status. That will tell if mod_caucho has properly read the resin.conf.
  3. The srun hosts should be green and the mappings should match your resin.conf.
  4. If caucho-status fails on Apache, the problem is in the mod_caucho/iis_srun installation and the Apache httpd.conf.
  5. If caucho-status fails on IIS, try http://localhost/scripts/iis_srun.dll/caucho-status directly. If this fails, IIS can't find iis_srun.dll.
    • Check that iis_srun.dll is in c:\inetpub\scripts.
    • Make sure that your IIS host has a mapping from /scripts to c:\inetpub\scripts.
    • Make sure that the /scripts has execute permissions.
  6. If caucho-status shows the wrong mappings, there's something wrong with the resin.conf or the pointer to resin.conf in httpd.conf.
  7. If caucho-status shows a red servlet runner, then hasn't properly started.
  8. If you get a "cannot connect to servlet engine", caucho-status will show red, and httpd hasn't started properly.
  9. If httpd doesn't start properly, you should look at the logs in resin2.0/log. You should start httpd -verbose to get more information.
  10. If you get Resin's file not found, the Apache configuration is good but the resin.conf probably points to the wrong directories.
  11. If the error message is from Resin, your app-dir is probably set wrong. Remember servlets belong in "app-dir"/WEB-INF/classes.

Before you ask any questions on the list, you should be able to answer the following questions:

  • Does httpd standalone work?
  • What does the /caucho-status show?
  • Is the 404 coming from your web server or from Resin?

If you don't answer these questions in your mail, the mail will probably be ignored.

Victor A. Salaman writes:

This may sound elementary... But check for these common pitfalls:

  1. Check in your browser that it's not configured to use a proxy server.. and if it is, make it bypass local accesses or disable proxying altogether (If you are using IE, just go to Tool/Options/Connection and at the bottom you'll see the proxy stuff!
  2. Make you are running httpd.exe.... A lot of people try to use "srun.exe", and this is just a servlet runner....
  3. Modify your resin.conf file and add this line right after "<>" <log id="/" href="stderr:"/>

After you do this, execute httpd.exe and see what pops up....

browser returns test.jsp source

If you're running Resin with IIS or Apache, the web server might not know how to handle *.jsp files. On Apache, the httpd.conf needs to add Resin. On IIS, the IIS configuration needs to dispatch *.jsp files to srun_iis.dll.

Both may need restarting to see the changes.

To test if this is the problem, stop the srun executable. If you browse http://localhost/test.jsp, you should get the 'Cannot connect to servlet runner' message.

You'll get this exception if you try to start two Resin instances using the same port. You'll need to stop the first one. Normally, stop or stop wil do the trick.

On Unix, the dramatic way of stopping Resin is to kill the script:

unix> ps auxw | grep
ferg     1314   ...  perl resin/bin/
ferg     1340   ...  grep
unix> kill 1314

Because the 'ps' differs on different flavors of Unix, e.g. ps -ef, you may need to consult 'man ps'.

File not found

The web server (IIS or Apache) and the servlet runner (httpd), need to find the web pages. The resin.conf file configures srun. You need to add a 'app-dir' property, to tell httpd where to look for the root directory.

  <http-server app-dir='d:\InetPub\wwwroot'>
    <servlet-mapping url-pattern='*.jsp'

Resin uses the wrong JDK version

On Win32, Resin tries to find Java in the following order:

  • The command-line argument, -java_home
  • The environment variable JAVA_HOME
  • The registry, using JavaSoft's CurrentVersion of the JDK.
  • Following the PATH of the java executable.

To find out which Java version Caucho JSP is using, use the '-version' argument on the command line:

resin-2.1> bin/httpd -version

How do I pass JVM arguments like -ms48m?

You can pass them on the command line like: -J-ms40m. You don't need to escape -Dfoo=bar. If you're on Unix, you can also add them to in the args variable. You may need to quote the assignment:

args="-J-ms40m -Dfoo=bar"

NoSuchMethodError: org.w3c.dom.Node: method = getNamespaceURI()Ljava/lang/String; not found

This is caused by an incompatibility in the XML libraries. Resin's XSL needs the XML DOM v2. The dom.jar in resin1.2/lib implements that interface. Unfortunately, some JDKs and XML applications (e.g. JAXP) put an obsolete XML API (DOM v1) in the system classpath, overriding the newer DOM API.

You will need to look in your system classpath for the old DOM implementation (likely jaxp.jar) and remove it.


caucho-status fails on IIS

Try looking at http://localhost/scripts/iis_srun.dll/caucho-status. If this fails, IIS can't use the iis_srun.dll plugin. The problem is probably one of the following:

  • iis_srun.dll isn't in c:\inetpub\scripts.
  • The IIS host is missing the /scripts virtual directory.
  • /scripts doesn't have proper execute permissions.

Resin's IIS module needs the /scripts virtual directory to contain iis_srun.dll. If you create a new IIS virtual host, you must create a /scripts virtual directory that points to d:\inetpub\scripts.

When the Resin ISAPI filter detects a JSP page or servlet, it rewrites the URL to /scripts/iis_srun.dll/test.jsp. IIS will then execute iis_srun.dll as an ISAPI extension. If your virtual site is missing the /scripts directory, IIS can't find the ISAPI extension.

How to use index.jsp as default document on IIS?

Stefan Wesner writes,

Activating index.jsp as the default document is a matter of configuration of IIS.

On IIS4.0 you could the following steps:

  1. Open the property dialog for the "Default Web Site" (or any other Web-Site or VirtualDirectorx).
  2. Go to the "Home Directory" Tab for the Default Web Site" or the "Virtual Directory" Tab for a virtual Directory.
  3. Select "Configuration"
  4. add an application mapping from .xtp and .jsp for your iis_srun.dll (I use also PUT,DELETE exlusion like it is done for asp mappings but I do not know why, just copied it) Close this sub-dialog
  5. Select the "Documents" tab and add index.jsp and index.xtp to the list of default documents.
  6. Try http://yourhost/


Apache won't start on Win32

The error message might be something like:

"Syntax error on line 785 of
Cannot load c:\resin-2.1\libexec\win32-1.3.6\mod_caucho.dll into server:"

Usually, this is a path problem, for example, you may have used "win-1.3.6" instead of "win32-1.3.6".

It will also happen if the dll is incompatible with the Apache version. Apache 1.3.6 is compatible with Apache 1.3.9. If you're using a different version, send us a message and we'll make sure you get the right compiled version.

Apache doesn't find my resin.conf

On Windows, the argument to CauchoConfigFile should be enclosed in quotes. Also, since Apache treats '\' as an escape, you'll need either to use forward slashes or double the backslashes.

mod_caucho caucho-status returns no data

This may be due to an "EAPI" conflict. If your Apache is compiled with EAPI, but Resin is compiled without it, the mod_caucho may crash.

The Apache log will have lines like

[Tue Aug  8 15:33:24 2000] [notice] caught SIGTERM, shutting down
[Tue Aug  8 15:33:24 2000] [warn] Loaded DSO /etc/httpd/modules/
  uses plain Apache 1.3 API, this module might crash under EAPI! (please
  recompile it with -DEAPI)

Normally, the ./configure script can determine if EAPI is needed automatically, but if it fails, you can run it as:

unix> ./configure --with-apache-eapi

Can I use mod_rewrite with Resin?

Yes, but you need to make sure to use the passthrough flag so Resin can get control after mod_rewrite.

RewriteEngine on
RewriteRule ^/hello.html$ /hello.jsp [L,PT]

Linux/Unix not found contains some small JNI routines for Unix. It should be compiled when you call configure; make. For some reason, the JVM isn't picking the library up. You'll probably want to check LD_LIBRARY_PATH both in your environment and in

For many sites, a missing isn't a big deal. It just grabs some CPU statistics. However, it also enabled the setuid needed by user-name and group-name. So if you're using user-name to change the user from root, you'll need to get running.

How do I install Resin as a Linux service?

Stephen Kuo asks:

This should be a very basic question for those Linux guru.

In my Red Hat 6.2, I put the following line in the /etc/rc.d/rc.local file to make Resin as a service:

/usr/local/resin1.1/bin/ start

But when I reboot the system, Resin does not start up.

Guy Tal reponds:

You should also set your environment params in the rc file (when you execute from the command line, they are ready from your own environment, however rc files are run as root so these will not be set). Add the following (with the appropriate settings for your own machine):

export PATH

export JAVA_HOME



You can also set those environment variables in the itself or in the

Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.