Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7807849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:59:07+00:00 2026-06-02T02:59:07+00:00

I’m trying to deploy an application to Apache Felix. It was a gwt application

  • 0

I’m trying to deploy an application to Apache Felix. It was a gwt application but I’ve been simplifying the problem until just a hello world html file so my problem is to deploy any kind of web application in a war file. I’ve also tried to deploy the generated wars in Apache Karaf and they worked without any problems (once you install feature war).

So, right now I have this:

blaxter@duffman:~/devel/webapp $ tree
.
├── pom.xml
├── src
    └── main
        ├── resources
        └── webapp
            ├── foobar.html
            └── WEB-INF
                └── web.xml

The pom.xml is pretty straightforward, the interesting part is related with felix plugin, but for this war without any compiled code it doesn’t matter…

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>webapp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>webapp Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
    <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
    <scope>provided</scope>
    </dependency>
</dependencies>
<build>
    <finalName>webapp</finalName>

    <plugins>
    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
        <executions>
        <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
            <goal>manifest</goal>
            </goals>
        </execution>
        </executions>
        <configuration>
        <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>bundle</supportedProjectType>
            <supportedProjectType>war</supportedProjectType>
        </supportedProjectTypes>
        <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
            <Embed-Directory>WEB-INF/lib</Embed-Directory>
            <Embed-Transitive>true</Embed-Transitive>
            <Import-Package>*;resolution:=optional</Import-Package>
            <Web-ContextPath>/sample</Web-ContextPath>
            <Webapp-Context>/sample</Webapp-Context>
            <_wab>src/main/webapp</_wab>
        </instructions>
        </configuration>
    </plugin>


    <plugin>
        <groupId>org.ops4j</groupId>
        <artifactId>maven-pax-plugin</artifactId>
        <configuration>
        <provision>
            <param>--platform=felix</param>
            <param>--profiles=compendium,web,war,log</param>
            <param>--log=debug</param>
        </provision>
        </configuration>
    </plugin>

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <executions>
        <execution>
            <phase>compile</phase>
            <goals>
            <goal>exploded</goal>
            </goals>
        </execution>
        </executions>
        <configuration>
        <webappDirectory>${webappDirectory}</webappDirectory>
        <archive>
            <!-- add the generated manifest to the war -->
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
        </archive>
        </configuration>
    </plugin>

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
        <source>1.6</source>
        <target>1.6</target>
        </configuration>
    </plugin>
</plugins>
</build>
</project>

The pax plugin is also there because I’ve tried to run the application with that, but I got the same result. The web.xml is an empty one:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Archetype Created Web Application</display-name>
  <welcome-file-list>
    <welcome-file>foobar.html</welcome-file>
  </welcome-file-list>
</web-app>

Once you execute mvn package to generate the war file, if I deploy it in Apache Felix I get no errors, the bundle state is active but I only get 404 errors trying to access /sample paths. I’ve tried put both sample and /sample as context path values. The same behaviour happens running mvn pax:run. If I deploy the war in Apache karaf, it works so I’d assume I’m doing something really wrong with felix.

My current list of bundles is:

g! lb
START LEVEL 1
ID|State      |Level|Name
 0|Active     |    0|System Bundle (4.0.2)
 1|Active     |    1|JXSE (2.7.0)
 2|Active     |    1|Apache Felix Bundle Repository (1.6.6)
 3|Active     |    1|Apache Felix Configuration Admin Service (1.2.8)
 4|Active     |    1|Apache Felix EventAdmin (1.2.14)
 5|Active     |    1|Apache Felix File Install (3.2.0)
 7|Resolved   |    1|Apache Felix Security Provider (2.0.1)
 8|Active     |    1|Apache Felix Gogo Command (0.12.0)
 9|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
10|Active     |    1|Apache Felix Gogo Shell (0.10.0)
11|Active     |    1|Apache Felix Http Api (2.2.0)
12|Active     |    1|Apache Felix Http Base (2.2.0)
13|Active     |    1|Apache Felix Http Bridge (2.2.0)
14|Active     |    1|Apache Felix Http Bundle (2.2.0)
15|Active     |    1|Apache Felix Http Jetty (2.2.0)
16|Active     |    1|Apache Felix Log Service (1.0.1)
17|Active     |    1|Apache Felix Shell Service (1.4.2)
18|Active     |    1|OPS4J Pax Logging - API (1.6.3)
19|Active     |    1|OPS4J Pax Logging - Service (1.6.3)
20|Active     |    1|OPS4J Pax Url - mvn: (1.2.8)
21|Active     |    1|OPS4J Pax Url - war (1.2.8)
22|Active     |    1|OPS4J Pax Url - wrap: (1.2.8)
23|Active     |    1|OPS4J Pax Web - API (1.0.9)
24|Active     |    1|OPS4J Pax Web - FileInstall Deployer (1.0.9)
25|Active     |    1|OPS4J Pax Web - Extender - WAR (1.0.9)
26|Active     |    1|OPS4J Pax Web - Extender - Whiteboard (1.0.9)
27|Active     |    1|OPS4J Pax Web - Jetty Bundle (1.0.9)
28|Active     |    1|OPS4J Pax Web - Jsp Support (1.0.9)
29|Active     |    1|OPS4J Pax Web - Runtime (1.0.9)
30|Active     |    1|OPS4J Pax Web - Service SPI (1.0.9)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:59:12+00:00Added an answer on June 2, 2026 at 2:59 am

    The bundles that were doing the work were OPS4J-* ones, but the ones running jetty were the org.apache.felix.http.*. Once I removed org.apache.felix.http.* bundles everything started to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.