In karaf I've installed http and war feature [0], I was trying a
hello-world-gwt example (I've also tried with a simple hello world
servlet).

karaf@root> la
START LEVEL 100 , List Threshold: 0
   ID   State         Blueprint      Level  Name
[   0] [Active     ] [            ] [    0] System Bundle (3.0.9)
[   1] [Active     ] [            ] [    5] OPS4J Pax Url - wrap: (1.2.8)
[   2] [Active     ] [            ] [    5] OPS4J Pax Url - mvn: (1.2.8)
[   3] [Active     ] [            ] [    8] OPS4J Pax Logging - Service
(1.6.3)
[   4] [Active     ] [            ] [    8] OPS4J Pax Logging - API (1.6.3)
[   5] [Active     ] [            ] [   10] Apache Felix Configuration
Admin Service (1.2.8)
[   6] [Active     ] [            ] [   11] Apache Felix File Install
(3.1.10)
[   7] [Active     ] [            ] [   20] Apache Aries Proxy Bundle
(0.3.0)
[   8] [Active     ] [            ] [   20] Apache Aries Util (0.3.0)
[   9] [Active     ] [Created     ] [   20] Apache Aries Blueprint Bundle
(0.3.1)
[  10] [Active     ] [            ] [   20] Apache ServiceMix :: Bundles ::
asm (3.3.0.2)
[  11] [Active     ] [Created     ] [   30] Apache Karaf :: Deployer ::
Blueprint (2.2.5)
[  12] [Active     ] [Created     ] [   30] Apache Karaf :: Diagnostic ::
Management (2.2.5)
[  13] [Active     ] [Created     ] [   30] Apache Karaf :: Admin ::
Management (2.2.5)
[  14] [Active     ] [Created     ] [   30] Apache Karaf :: Shell ::
Console (2.2.5)
[  15] [Active     ] [Created     ] [   30] Apache Karaf :: Deployer ::
Karaf Archive (.kar) (2.2.5)
[  16] [Active     ] [Created     ] [   30] Apache Karaf :: Features ::
Core (2.2.5)
[  17] [Active     ] [Created     ] [   30] Apache Karaf :: Diagnostic ::
Command (2.2.5)
[  18] [Active     ] [            ] [   30] Apache Mina SSHD :: Core (0.5.0)
[  19] [Active     ] [            ] [   30] Apache Aries JMX Blueprint
Bundle (0.3.0)
[  20] [Active     ] [Created     ] [   30] Apache Karaf :: Management
(2.2.5)
[  21] [Active     ] [Created     ] [   30] Apache Karaf :: Deployer ::
Wrap Non OSGi Jar (2.2.5)
[  22] [Active     ] [Created     ] [   30] Apache Karaf :: Shell ::
Development Commands (2.2.5)
[  23] [Active     ] [Created     ] [   30] Apache Karaf :: Admin ::
Command (2.2.5)
[  24] [Active     ] [            ] [   30] Apache Aries JMX Bundle (0.3.0)
[  25] [Active     ] [Created     ] [   30] Apache Karaf :: Deployer ::
Spring (2.2.5)
[  26] [Active     ] [Created     ] [   30] Apache Karaf :: Features ::
Command (2.2.5)
[  27] [Active     ] [Created     ] [   30] Apache Karaf :: Shell ::
PackageAdmin Commands (2.2.5)
[  28] [Active     ] [Created     ] [   30] Apache Karaf :: Shell :: OSGi
Commands (2.2.5)
[  29] [Active     ] [            ] [   30] Apache Karaf :: Diagnostic ::
Core (2.2.5)
[  30] [Active     ] [            ] [   30] Apache MINA Core (2.0.1)
[  31] [Active     ] [Created     ] [   30] Apache Karaf :: JAAS :: Config
(2.2.5)
[  32] [Active     ] [Created     ] [   30] Apache Karaf :: Shell :: SSH
(2.2.5)
[  33] [Active     ] [Created     ] [   30] Apache Karaf :: Admin :: Core
(2.2.5)
[  34] [Active     ] [Created     ] [   30] Apache Karaf :: Deployer ::
Features (2.2.5)
[  35] [Active     ] [Created     ] [   30] Apache Karaf :: Jaas :: Command
(2.2.5)
[  36] [Active     ] [Created     ] [   30] Apache Karaf :: Diagnostic ::
Common (2.2.5)
[  37] [Active     ] [Created     ] [   30] Apache Karaf :: Shell ::
Various Commands (2.2.5)
[  38] [Active     ] [Created     ] [   30] Apache Karaf :: Features ::
Management (2.2.5)
[  39] [Active     ] [Created     ] [   30] Apache Karaf :: Shell :: Log
Commands (2.2.5)
[  40] [Active     ] [Created     ] [   30] Apache Karaf :: JAAS :: Modules
(2.2.5)
[  41] [Active     ] [Created     ] [   30] Apache Karaf :: Shell ::
ConfigAdmin Commands (2.2.5)
[  42] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: System (2.2.5)
[  43] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Bundles (2.2.5)
[  44] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Services (2.2.5)
[  45] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Config (2.2.5)
[  46] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Log (2.2.5)
[  47] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Packages (2.2.5)
[  48] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Dev (2.2.5)
[  49] [Active     ] [            ] [   30] Apache ServiceMix :: Specs ::
Activation API 1.4 (1.9.0)
[  50] [Active     ] [            ] [   30] geronimo-servlet_2.5_spec
(1.1.2)
[  51] [Active     ] [            ] [   30] JavaMail API (compat) (1.4.4)
[  52] [Active     ] [            ] [   30] geronimo-jta_1.1_spec (1.1.1)
[  53] [Active     ] [            ] [   30] Jetty :: Utilities
(7.5.4.v20111024)
[  54] [Active     ] [            ] [   30] Jetty :: IO Utility
(7.5.4.v20111024)
[  55] [Active     ] [            ] [   30] Jetty :: Http Utility
(7.5.4.v20111024)
[  56] [Active     ] [            ] [   30] Jetty :: Asynchronous HTTP
Client (7.5.4.v20111024)
[  57] [Active     ] [            ] [   30] Jetty :: Continuation
(7.5.4.v20111024)
[  58] [Active     ] [            ] [   30] Jetty :: JMX Management
(7.5.4.v20111024)
[  59] [Active     ] [            ] [   30] Jetty :: Server Core
(7.5.4.v20111024)
[  60] [Active     ] [            ] [   30] Jetty :: Security
(7.5.4.v20111024)
[  61] [Active     ] [            ] [   30] Jetty :: Servlet Handling
(7.5.4.v20111024)
[  62] [Active     ] [            ] [   30] Jetty :: Utility Servlets and
Filters (7.5.4.v20111024)
[  63] [Active     ] [            ] [   30] Jetty :: XML utilities
(7.5.4.v20111024)
[  64] [Active     ] [            ] [   30] Jetty :: Webapp Application
Support (7.5.4.v20111024)
[  65] [Active     ] [            ] [   30] Jetty :: JNDI Naming
(7.5.4.v20111024)
[  66] [Active     ] [            ] [   30] Jetty :: Plus (7.5.4.v20111024)
[  67] [Active     ] [            ] [   30] OPS4J Pax Web - API (1.0.8)
[  68] [Active     ] [            ] [   30] OPS4J Pax Web - Service SPI
(1.0.8)
[  69] [Active     ] [            ] [   30] OPS4J Pax Web - Runtime (1.0.8)
[  70] [Active     ] [            ] [   30] OPS4J Pax Web - Jetty (1.0.8)
[  71] [Active     ] [Created     ] [   30] Apache Karaf :: Shell :: Web
Commands (2.2.5)
[  72] [Active     ] [Created     ] [   30] Apache Karaf :: Management ::
MBeans :: Web (2.2.5)
[  73] [Active     ] [            ] [   30] OPS4J Pax Web - Jsp Support
(1.0.8)
[  74] [Active     ] [            ] [   30] OPS4J Pax Web - Extender - WAR
(1.0.8)
[  75] [Active     ] [            ] [   30] OPS4J Pax Web - Extender -
Whiteboard (1.0.8)
[  76] [Active     ] [            ] [   30] OPS4J Pax Web - FileInstall
Deployer (1.0.8)
[  77] [Active     ] [            ] [   30] OPS4J Pax Url - war (1.2.8)
[ 102] [Active     ] [            ] [   60] GWT Maven Archetype
(1.0.0.SNAPSHOT)


In felix I have the following bundles installed (I've downloaded all
pax-web*.jar I've found):

   ID|State      |Level|Name
    0|Active     |    0|System Bundle (4.0.2)
    1|Active     |
1|file:/home/blaxter/tmp/felix-framework-4.0.2/bundle/gwt-dev-2.4.0.jar
(0.0.0)
    3|Active     |
1|file:/home/blaxter/tmp/felix-framework-4.0.2/bundle/gwt-user-2.4.0.jar
(0.0.0)
    4|Active     |    1|JXSE (2.7.0)
    5|Active     |    1|Apache Felix Bundle Repository (1.6.6)
    6|Active     |    1|Apache Felix Configuration Admin Service (1.2.8)
    7|Active     |    1|Apache Felix EventAdmin (1.2.14)
    9|Resolved   |    1|Apache Felix Security Provider (2.0.1)
   10|Active     |    1|Apache Felix Gogo Command (0.12.0)
   11|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
   12|Active     |    1|Apache Felix Gogo Shell (0.10.0)
   13|Active     |    1|Apache Felix Http Api (2.2.0)
   14|Active     |    1|Apache Felix Http Base (2.2.0)
   15|Active     |    1|Apache Felix Http Bridge (2.2.0)
   16|Active     |    1|Apache Felix Http Bundle (2.2.0)
   17|Active     |    1|Apache Felix Http Jetty (2.2.0)
   18|Active     |    1|Apache Felix Log Service (1.0.1)
   19|Active     |    1|Apache Felix Shell Service (1.4.2)
   49|Active     |    1|Apache Felix Web Management Console (3.1.8)
   83|Active     |
1|file:/home/blaxter/tmp/felix-framework-4.0.2/bundle/servlet-api-2.5.jar
(0.0.0)
   84|Active     |
1|file:/home/blaxter/tmp/felix-framework-4.0.2/bundle/gwt-servlet-2.4.0.jar
(0.0.0)
   90|Active     |    1|OPS4J Pax Web - Extender - WAR (1.0.9)
   91|Active     |    1|OPS4J Pax Web - Extender - Whiteboard (1.0.9)
   92|Active     |    1|OPS4J Pax Web - Jetty (1.0.9)
   93|Active     |    1|OPS4J Pax Web - Jetty Bundle (1.0.9)
   94|Active     |    1|OPS4J Pax Web - Jsp Support (1.0.9)
   95|Active     |    1|OPS4J Pax Web - Service SPI (1.0.9)
   98|Active     |    1|OPS4J Pax Web - API (1.0.9)
  100|Active     |    1|OPS4J Pax Web - Runtime (1.0.9)
  101|Active     |    1|GWT Maven Archetype (1.0.0.SNAPSHOT)


I have log level set to 4 (debug), but when I stop/start the bundle, there
are no errors, exactly it's like a new web context is created fine (I get
the same output in karaf):
g! stop 101
2012-04-17 14:17:15.985:INFO:oejsh.ContextHandler:stopped
HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@e2fbeb
}
g! start 101
2012-04-17 14:17:17.793:INFO:oejsh.ContextHandler:started
HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@10f34cc
}
DEBUG: Bundle org.ops4j.pax.web.pax-web-jsp [94]
META-INF/services/javax.xml.parsers.DocumentBuilderFactory not found by
org.ops4j.pax.web.pax-web-jsp [94]



[0]
http://karaf.apache.org/manual/latest-2.2.x/users-guide/web-applications.html

On Tue, Apr 17, 2012 at 11:50, Achim Nierbeck <[email protected]>wrote:

> Just to give a little hint here,
> Karaf where it seemed to work does use Pax-Web [1]
>
> regards, Achim
>
> [1] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>
> 2012/4/17 Felix Meschberger <[email protected]>:
> > Hi,
> >
> > Do you Web Application Bundle support available in your framework ?
> >
> > Apache Felix itself does not have such support. You would have to use
> something like the Pax Web bundles.
> >
> > Regards
> > Felix
> >
> > Am 13.04.2012 um 16:03 schrieb Jesús García Sáez:
> >
> >> Same result :-/
> >>
> >> On Fri, Apr 13, 2012 at 14:39, Caspar MacRae <[email protected]> wrote:
> >>> Hi,
> >>>
> >>> You must put a leading slash:   /gui
> >>>
> >>> HTH,
> >>> Caspar
> >>>
> >>> 2012/4/13 Jesús García Sáez <[email protected]>
> >>>
> >>>> Hi,
> >>>>
> >>>> this is my first attempt in osgi world. I've been trying to deploy a
> >>>> war file (exactly a gwt hello world app) but no luck so far.
> >>>>
> >>>> I've been using mvn to generate a war file osgi-compatible (or at
> >>>> least I think it is). After that I run felix, install the generated
> >>>> war, and start the new bundle installed. No errors are shown but if I
> >>>> try to access to the context path I get 404 error. My generated
> >>>> MANIFEST.MF is:
> >>>>
> >>>> Manifest-Version: 1.0
> >>>> Archiver-Version: Plexus Archiver
> >>>> Created-By: Apache Maven Bundle Plugin
> >>>> Built-By: blaxter
> >>>> Build-Jdk: 1.6.0_26
> >>>> Bnd-LastModified: 1334310016750
> >>>> Bundle-ClassPath: WEB-INF/classes,.,WEB-INF/classes,WEB-INF/lib/gwt-se
> >>>>  rvlet-2.4.0.jar,WEB-INF/lib/org.osgi.compendium-1.4.0.jar,WEB-INF/lib
> >>>>  /org.osgi.core-1.4.0.jar,WEB-INF/lib/javax.servlet-1.0.0.jar,WEB-INF/
> >>>>  lib/org.osgi.foundation-1.2.0.jar
> >>>> Bundle-ManifestVersion: 2
> >>>> Bundle-Name: GWT Maven Archetype
> >>>> Bundle-SymbolicName: example
> >>>> Bundle-Version: 1.0.0.SNAPSHOT
> >>>> Embed-Dependency: *;scope=compile|runtime
> >>>> Embed-Directory: WEB-INF/lib
> >>>> Embed-Transitive: true
> >>>> Embedded-Artifacts: WEB-INF/lib/gwt-servlet-2.4.0.jar;g="
> com.google.gw
> >>>>  t";a="gwt-servlet";v="2.4.0",WEB-INF/lib/org.osgi.compendium-1.4.0.ja
> >>>>  r;g="org.apache.felix";a="org.osgi.compendium";v="1.4.0",WEB-INF/lib/
> >>>>  org.osgi.core-1.4.0.jar;g="org.apache.felix";a="org.osgi.core";v="1.4
> >>>>  .0",WEB-INF/lib/javax.servlet-1.0.0.jar;g="org.apache.felix";a="javax
> >>>>  .servlet";v="1.0.0",WEB-INF/lib/org.osgi.foundation-1.2.0.jar;g="org.
> >>>>  apache.felix";a="org.osgi.foundation";v="1.2.0"
> >>>> Export-Package: com.company.client;uses:="com.company.shared";version=
> >>>>  "1.0.0.SNAPSHOT",com.company.server;uses:="com.company.client,
> com.com
> >>>>  pany.shared";version="1.0.0.SNAPSHOT",com.company.shared;version="1.0
> >>>>  .0.SNAPSHOT"
> >>>> Import-Package: com.google.gwt.benchmarks;resolution:=optional,com.goo
> >>>>  gle.gwt.core.ext;resolution:=optional,com.google.gwt.core.ext.linker;
> >>>>  resolution:=optional,com.google.gwt.core.ext.typeinfo;resolution:=opt
> >>>>  ional,com.google.gwt.core.linker;resolution:=optional,com.google.gwt.
> >>>>  dev.cfg;resolution:=optional,com.google.gwt.dev.jjs;resolution:=optio
> >>>>  nal,com.google.gwt.dev.resource;resolution:=optional,com.google.gwt.d
> >>>>  ev.util.collect;resolution:=optional,com.google.gwt.dev.util.log;reso
> >>>>  lution:=optional,com.google.gwt.dev.util.log.speedtracer;resolution:=
> >>>>  optional,com.google.gwt.i18n.rebind.keygen;resolution:=optional,com.g
> >>>>  oogle.gwt.json.client;resolution:=optional,com.google.gwt.junit;resol
> >>>>  ution:=optional,com.google.gwt.lang;resolution:=optional,com.google.g
> >>>>  wt.thirdparty.guava.common.base;resolution:=optional,com.google.gwt.t
> >>>>  hirdparty.streamhtmlparser;resolution:=optional,com.google.gwt.uibind
> >>>>  er.rebind;resolution:=optional,com.google.gwt.uibinder.rebind.message
> >>>>  s;resolution:=optional,com.google.gwt.uibinder.rebind.model;resolutio
> >>>>  n:=optional,com.google.gwt.user.rebind;resolution:=optional,com.googl
> >>>>  e.gwt.user.rebind.rpc;resolution:=optional,com.google.gwt.util.tools;
> >>>>  resolution:=optional,javax.annotation.processing;resolution:=optional
> >>>>  ,javax.imageio;resolution:=optional,javax.imageio.metadata;resolution
> >>>>  :=optional,javax.imageio.stream;resolution:=optional,javax.lang.model
> >>>>  ;resolution:=optional,javax.lang.model.element;resolution:=optional,j
> >>>>  avax.lang.model.type;resolution:=optional,javax.lang.model.util;resol
> >>>>  ution:=optional,javax.security.auth.x500;resolution:=optional,javax.t
> >>>>  ools;resolution:=optional,javax.validation.bootstrap;resolution:=opti
> >>>>  onal,javax.validation.constraints;resolution:=optional,javax.validati
> >>>>  on.groups;resolution:=optional,javax.validation.metadata;resolution:=
> >>>>  optional,javax.validation.spi;resolution:=optional,javax.xml.parsers;
> >>>>  resolution:=optional,junit.framework;resolution:=optional,org.json;re
> >>>>  solution:=optional,org.w3c.css.sac;resolution:=optional,org.w3c.dom;r
> >>>>  esolution:=optional,org.w3c.flute.parser;resolution:=optional,sun.mis
> >>>>  c;resolution:=optional
> >>>> Tool: Bnd-1.50.0
> >>>> Web-ContextPath: gui
> >>>> Webapp-Context: gui
> >>>>
> >>>>
> >>>> And the web.xml is pretty simple:
> >>>>
> >>>> <?xml version="1.0" encoding="UTF-8"?>
> >>>> <!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>
> >>>>  <servlet>
> >>>>    <servlet-name>greetServlet</servlet-name>
> >>>>
>  <servlet-class>com.company.server.GreetingServiceImpl</servlet-class>
> >>>>  </servlet>
> >>>>
> >>>>  <servlet-mapping>
> >>>>    <servlet-name>greetServlet</servlet-name>
> >>>>    <url-pattern>/foobar/greet</url-pattern>
> >>>>  </servlet-mapping>
> >>>>
> >>>>  <welcome-file-list>
> >>>>    <welcome-file>foobar.html</welcome-file>
> >>>>  </welcome-file-list>
> >>>> </web-app>
> >>>>
> >>>> Once the bundle is running in felix console I can see it in a "lb"
> command
> >>>>   ...
> >>>>   47|Active     |    1|GWT Maven Archetype (1.0.0.SNAPSHOT)
> >>>>   ...
> >>>>
> >>>> I've read a lot of blog post about this topic (war files in felix) and
> >>>> the only explication to me is I have something wrong in my felix
> >>>> instance, "something" without configure.
> >>>> I have a github repo with all this [0] but it's a simple hello world.
> >>>> Any help would be appreciate, thanks!
> >>>>
> >>>>
> >>>> [0] https://github.com/blaxter/gwt-osgi-example
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [email protected]
> >>>> For additional commands, e-mail: [email protected]
> >>>>
> >>>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to