NPE in grizzly while launching my project with the atmosphere-spade-server

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

NPE in grizzly while launching my project with the atmosphere-spade-server

This post has NOT been accepted by the mailing list yet.
I am playing with atmosphere in a GWT/GXT project. Based on the GWTDemo example provided with atmosphere distribution, I managed to get my project working in hosted mode in my IDE.

Versions : gwt 2.4.0, atmosphere 0.9.7

Now I would like to package my war and execute it with the atmosphere-spade-server (version 0.7.2). I build my project with maven (gwt-maven-plugin 2.4.0 + maven-war-plugin 2.2) and then I launch

java -jar atmosphere-spade-server.jar -p 8888 -a mywar.war

and I get

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
10 ao¹t 2012 09:34:17 com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer launch
GRAVE: Error while launching deployer.
com.sun.grizzly.http.deployer.DeployException: Error parsing web.xml for 'file:/C:/WORKSPACE/SANDBOX/GwtExt/war/target/war.war'.
        at com.sun.grizzly.http.servlet.deployer.WarDeployer.parseWebXml(
        at com.sun.grizzly.http.servlet.deployer.WarDeployer.fromURI(
        at com.sun.grizzly.http.servlet.deployer.WarDeployer.fromURI(
        at com.sun.grizzly.http.deployer.FromURIDeployer.deploy(
        at com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer.deployWar(
        at com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer.deployWar(
        at com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer.deployApplication(
        at com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer.deployApplications(
        at com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer.launch(
        at org.atmosphere.grizzly.AtmosphereDeployer.main(
Caused by: java.lang.NullPointerException
        at com.sun.grizzly.http.webxml.parser.JAXBWebXml_3_0Parser.populate(
        at com.sun.grizzly.http.webxml.parser.JAXBWebXml_3_0Parser.parse(
        at com.sun.grizzly.http.webxml.WebappLoader.extractWebXmlInfo(
        at com.sun.grizzly.http.webxml.WebappLoader.load(
        at com.sun.grizzly.http.servlet.deployer.WarDeployer.parseWebXml(
        ... 9 more

First of all, I don't understand the complain about slf4j as slf4j-api-1.6.6.jar is in the WEB-INF\lib folder of my war. No logger pb when I launch the app in hosted mode.

And second, I can't figure out what's wrong with my web.xml :

<web-app version="3.0" xmlns="" xmlns:xsi=""



Here is the structure of my war :

|- com.foopackage.myapp
| L …
| |- atmosphere.xml
| |- classes
| | L …
| |- deploy
| | L …
| |- lib
| | |- atmosphere-compat-jbossweb-0.9.7.jar
| | |- atmosphere-compat-tomcat-0.9.7.jar
| | |- atmosphere-compat-tomcat7-0.9.7.jar
| | |- atmosphere-gwt-client-0.9.7.jar
| | |- atmosphere-gwt-common-0.9.7.jar
| | |- atmosphere-gwt-server-0.9.7.jar
| | |- atmosphere-runtime-0.9.7.jar
| | |- gwt-servlet-2.4.0.jar
| | |- gwt-user-2.4.0.jar
| | |- gxt-3.0.0-rc2.jar
| | |- slf4j-api-1.6.6.jar
| | |- slf4j-simple-1.6.6.jar
| | L …
| L web.xml
L index.html

I tried different things, like adding/removing context.xml file from/to META-INF and WEB-INF (the documentation  is unclear about the requirement of this file for grizzly), with no sucess.

I am pretty sure something is wrong in my configuration but I can't figure out what. Thanks for your help.