Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] (no subject)

Thanks Jan - org.eclipse.jetty.osgi.boot.jsp in the list of plugins within the launcher, but as a fragment I can't make that a dependency - it shows in OSGi as being resolved (bundle 56 below) and not active though, even though the master bundle (26 -  org.eclipse.jetty.osgi.boot) is active and shows that it has the fragment there ("ss" output below).

At first look through the tests I notice the pom generates a manifest that imports all jetty packages so maybe I'm just missing something - just needing to figure out what.

I'll take a further look through the tests tomorrow and see if I can figure out what's going on - whatever it is, it's consistent though as my Mac with Eclipse Oxygen and Java 8, and my Windows 10 machine with Java 11 and Eclipse 2020.06 both fail at the same point!


id State       Bundle

0 ACTIVE      org.eclipse.osgi_3.12.100.v20180210-1608

            Fragments=34, 13

1 RESOLVED    org.eclipse.jetty.servlet_9.4.30.v20200611

2 RESOLVED    org.objectweb.asm.tree.analysis_8.0.1

4 ACTIVE      org.eclipse.equinox.common_3.9.0.v20170207-1454

5 RESOLVED    org.objectweb.asm_8.0.1

6 RESOLVED    org.eclipse.osgi.services_3.6.0.v20170228-1906

7 RESOLVED    org.apache.xml.serializer_2.7.1.v201005080400

8 RESOLVED    org.mortbay.jasper.apache-el_8.5.54

9 ACTIVE      org.eclipse.core.runtime_3.13.0.v20170207-1030

10 RESOLVED    org.objectweb.asm.util_8.0.1

11 ACTIVE      org.eclipse.jdt.core_3.13.102.v20180330-0919

            Fragments=23, 43

12 RESOLVED    org.eclipse.jetty.plus_9.4.30.v20200611

13 RESOLVED    org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513


14 ACTIVE      org.eclipse.core.jobs_3.9.3.v20180115-1757

15 RESOLVED    org.apache.xerces_2.9.0.v201101211617

16 STARTING    org.eclipse.core.filesystem_1.7.0.v20170406-1337


17 RESOLVED    org.eclipse.jetty.xml_9.4.30.v20200611

18 RESOLVED    org.objectweb.asm.tree_8.0.1

19 RESOLVED    javax.annotation-api_1.3.0

21 RESOLVED    org.eclipse.jetty.io_9.4.30.v20200611

22 RESOLVED    org.eclipse.jetty.security_9.4.30.v20200611

23 RESOLVED    org.eclipse.jdt.compiler.apt_1.3.110.v20180329-0935


25 ACTIVE      org.eclipse.equinox.preferences_3.7.0.v20170126-2132

26 ACTIVE      org.eclipse.jetty.osgi.boot_9.4.30.v20200611


30 RESOLVED    org.apache.xml.resolver_1.2.0.v201005080400

31 RESOLVED    org.eclipse.core.commands_3.9.0.v20170530-1048

32 RESOLVED    org.eclipse.text_3.6.100.v20170203-0814

33 RESOLVED    org.eclipse.core.filesystem.macosx_1.3.0.v20140124-1940


34 RESOLVED    javax.transaction_1.1.1.v201105210645


35 RESOLVED    javax.xml_1.3.4.v201005080400

36 RESOLVED    org.eclipse.jetty.util_9.4.30.v20200611

37 ACTIVE      org.eclipse.equinox.registry_3.7.0.v20170222-1344

38 RESOLVED    org.eclipse.jetty.schemas_3.1.0.M0

39 RESOLVED    org.eclipse.jetty.http_9.4.30.v20200611

40 ACTIVE      org.apache.felix.gogo.runtime_0.10.0.v201209301036

41 ACTIVE      org.eclipse.core.contenttype_3.6.0.v20170207-1037

42 RESOLVED    org.w3c.dom.events_3.0.0.draft20060413_v201105210656

43 RESOLVED    org.eclipse.jdt.compiler.tool_1.2.101.v20180329-0935



45 RESOLVED    jetty-config-bundle_1.0.0.qualifier

46 ACTIVE      org.apache.felix.gogo.command_0.10.0.v201209301215

47 ACTIVE      org.eclipse.core.resources_3.12.0.v20170417-1558

48 RESOLVED    org.apache.aries.spifly.dynamic.bundle_1.3.0

49 RESOLVED    org.eclipse.jetty.server_9.4.30.v20200611

50 ACTIVE      org.eclipse.equinox.app_1.3.400.v20150715-1528

51 RESOLVED    org.eclipse.jetty.deploy_9.4.30.v20200611

52 RESOLVED    org.eclipse.osgi.util_3.4.0.v20170111-1608

53 RESOLVED    org.mortbay.jasper.apache-jsp_8.5.54

54 RESOLVED    org.objectweb.asm.commons_8.0.1

55 STARTING    org.eclipse.core.expressions_3.6.0.v20170207-1037

56 RESOLVED    org.eclipse.jetty.osgi.boot.jsp_9.4.30.v20200611


57 RESOLVED    org.eclipse.jetty.webapp_9.4.30.v20200611

59 RESOLVED    org.eclipse.jetty.jndi_9.4.30.v20200611

60 ACTIVE      org.eclipse.jetty.annotations_9.4.30.v20200611

65 ACTIVE      org.apache.taglibs.taglibs-standard-spec_1.2.5

68 RESOLVED    org.apache.servicemix.bundles.bcel_5.2.0.4

69 ACTIVE      org.apache.taglibs.standard-impl_1.2.5

74 RESOLVED    org.apache.servicemix.bundles.xalan_2.7.1.4

75 RESOLVED    org.apache.servicemix.bundles.xalan-serializer_2.7.2.1

77 ACTIVE      org.apache.felix.gogo.shell_0.10.0.v201212101605

78 ACTIVE      org.eclipse.equinox.console_1.1.300.v20170512-2111

82 RESOLVED    org.eclipse.jetty.apache-jsp_9.4.30.v20200611

83 RESOLVED    org.eclipse.jetty.apache.jstl_9.4.30.v20200611

85 RESOLVED    org.eclipse.jetty.continuation_9.4.30.v20200611

86 RESOLVED    javax.servlet-api_3.1.0

100 RESOLVED    test-product_1.0.0.qualifier

101 ACTIVE      common_1.0.0.qualifier

On Sun, 5 Jul 2020 at 13:51, Jan Bartel <janb@xxxxxxxxxxx> wrote:
I don't see the org.eclipse.jetty.osgi.jetty-osgi-boot-jsp bundle on your list of dependencies. You should use that, then you won't have to mess around with ServletContainerIntializersStarters, org.eclipse.jetty.containerInitializers or any of the things you've added to your jetty-web.xml file. In fact, I think the jetty-web.xml file would be interpreted too late to be of use here.

Also might be useful to take a look at our osgi tests to see which bundles we deploy along with the WAB:


On Sun, 5 Jul 2020 at 11:12, Gordon Jahn <gjahn@xxxxxxxxxxxxxxxxx> wrote:

Good morning!

(This is a repost of a Stack Overflow question I posted on Friday - I then realised this was a better place to ask..)

I'm trying to get Jetty 9.4.30 running as an OSGi Service (following this: with updated versions) that can host WebApp Bundles. I can deploy and servlets work fine, but JSPs aren't working and I keep hitting an exception for TLD loading caused by:

Caused by: 
    at org.apache.jasper.JspCompilationContext.getTldResourcePath(
    at org.apache.jasper.compiler.Parser.parseTaglibDirective(
    at org.apache.jasper.compiler.Parser.parseDirective(

The problem is almost exactly that described at, except that in this case the author is using Jetty as Embedded and is able to set org.eclipse.jetty.containerInitializers using code where the server is started.

In OSGi, I don't have a place where I'm starting it - it's all happening in the bundles. After a lot of tweaking (and untweaking) config files the closest I feel I've got is when I copied the configuration performed in code into the jetty-web.xml file (which would be deployed in each WAB and isn't ideal in itself) as follows:

<Configure id="webappctxt" class="org.eclipse.jetty.webapp.WebAppContext">
    <New id="initList" class="java.util.ArrayList"></New>
    <Call name="setAttribute">
            <Call class="java.util.Arrays" name="asList">
                <Array type="">
                                <New class="org.eclipse.jetty.apache.jsp.JettyJasperInitializer"></New>
    <Call name="addBean">
            <New class="org.eclipse.jetty.annotations.ServletContainerInitializersStarter">
                    <Ref refid="webappctxt" />
    <Get name="ServletContext">
        <Call name="setAttribute">
                <New class="org.apache.tomcat.SimpleInstanceManager"></New>

When running, I can see the org.eclipse.jetty.annotations.ServletContainerInitializersStarter, and it has the TLDs from the platform (so all my dependencies seem to be there!) but the XML version of the code fails because there are two constructors for

ContainerInitializer(java.lang.ClassLoader loader, java.lang.String toString)   
ContainerInitializer(javax.servlet.ServletContainerInitializer target, java.lang.Class<?>[] classes)

...and the Jetty XML code picks the first one and throws a "java.lang.IllegalArgumentException: argument type mismatch".

Plugins currently "required" by my WAB are:

Require-Bundle: org.eclipse.jetty.jndi;bundle-version="9.4.30",

Back to the top