Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty embedded in JRuby app

Thanks for your feedback!

I'm building a jar, but I'm initialising the server as this, which uses WebAppContext:

    @server =
    # get external path for resources in jar
    static_content=@server.getClass().getClassLoader().getResource("eu/webtoolkit/jwt/wt-resources").toExternalForm(), '/wt-resources')

    context =
    servlet =
    holder =
    context.addServlet(holder, '/')


Is this the correct way to do it?

I added the call to Server.setDumpAfterStart(true), and pasted the output at
I think I could use a hint as to what the problem could be....



On Thu, Jan 16, 2014 at 2:00 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Your linked Paste has no mention of IntrospectionCleaner ?

Anyway, it seems that the InspectionCleaner is not being found.
Note, your stacktrace contains a WebAppClassLoader, which is the webapp isolation classloader, that IntrospectionCleaner class might be filtered or isolated away from being found because of it.
The existence of the StandardDescriptorProcessor also means you are deploying a standard WAR/WebApp, so that might definitely be the case.  

If you can control the Server instance in your JRuby startup, try adding a call to Server.setDumpAfterStart(true) before the server is started, that will show you what is in the classloaders at the server side and at the webapp side, it should help you figure out what is going on.

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Tue, Jan 14, 2014 at 1:39 AM, Raphael Bauduin <rblists@xxxxxxxxx> wrote:

I've developped a JRuby app that starts a Jetty server. The application runs fine from the console, but when I package it as a jar, I get errors about unfound classes org.eclipse.jetty.servlet.listener.ELContextCleaner and org.eclipse.jetty.servlet.listener.IntrospectorCleaner:

2754 [main] WARN org.eclipse.jetty.webapp.StandardDescriptorProcessor - Could not instantiate listener org.eclipse.jetty.servlet.listener.IntrospectorCleaner
java.lang.ClassNotFoundException: org.eclipse.jetty.servlet.listener.IntrospectorCleaner
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
        at org.eclipse.jetty.server.handler.ContextHandler.loadClass(
        at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(

The full error message is available at

The jetty-all-8.1.9 jar file is included in the built jar, and I see those two classes in there.
I can also load the classes in the JRuby code.
The jar is packaged with warbler, and the code of the main class of the jar is

Is there a way to make jetty find these too?

Thx in advance


PS: I asked on the JRuby mailing list, but it seems the setup is ok on the Jruby side. here's the discussion:

jetty-users mailing list

jetty-users mailing list

Web database:
Free Software Developers Meeting:

Back to the top