In Apache karaf all my generated war work out-of-the-box, with felix no errors in the console but always 404 error. Can I make felix more verbose about what is going on?
2012/4/16 Jesús García Sáez <[email protected]> > I can't think anything more simple: > > $ tree . > . > ├── META-INF > │ └── MANIFEST.MF > └── WEB-INF > ├── classes > │ └── com > │ └── company > │ └── Hello.class > ├── lib > │ └── javax.servlet-1.0.0.jar > └── web.xml > > > - WEB-INF/web.xml : > > <?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.Hello</servlet-class> > > </servlet> > <servlet-mapping> > <servlet-name>greetServlet</servlet-name> > <url-pattern>/</url-pattern> > </servlet-mapping> > </web-app> > > > - META-INF/MANIFEST.MF: > > 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: 1334324819241 > Bundle-ClassPath: WEB-INF/classes,. > Bundle-ManifestVersion: 2 > Bundle-Name: Hello world servlet > > 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/javax.servlet-1.0.0.jar;g="org.apache. > > felix";a="javax.servlet";v="1.0.0" > Tool: Bnd-1.50.0 > Web-ContextPath: /example > Webapp-Context: /example > > > - Hello.java: > package com.company; > > import java.io.*; > > import javax.servlet.http.*; > import javax.servlet.*; > > public class Hello extends HttpServlet { > public void doGet(HttpServletRequest req, HttpServletResponse res) > throws ServletException, IOException > { > PrintWriter out = res.getWriter(); > out.println("Hello world!"); > out.close(); > } > } > > > This, obviously, works on tomcat/glassfish/* but in felix I do install > file:path/to/example.war and start <bundle_id> and nothing happens. Is > there some place where I can see errors or info about what is going on? > > > On Fri, Apr 13, 2012 at 16:53, Caspar MacRae <[email protected]> wrote: > >> I was able to deploy your WAB to a different framework - the WAB side was >> fine but I got GWT errors. Can you deploy a simple non-GWT WAB using your >> pax runner configuration? >> >> >> >> 2012/4/13 Jesús García Sáez <[email protected]> >> >> > 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] >> > >> > >> > >

