• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

com.sun.jersey.api.container.ContainerException: No WebApplication provider is present

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been trying to downgrade my web app from servlet3.0 to 2.5 to make it compatible with tomcat 6.0.37 (was using tomcat 7 earlier and the web app works fine).

I was initially using atmosphere-jersey 1.0.12 and kept getting containerInitialization error as there were some javax.servlet 3.0 references somewhere. I now downgraded to 0.9 of atmosphere-jersey and get the below error:


15392 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory class: org.atmosphere.cpr.DefaultBroadcasterFactory
15405 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting atmosphere handlers /WEB-INF/classes/
15424 [http-8080-2] WARN org.atmosphere.cpr.AtmosphereFramework - Missing META-INF/atmosphere.xml but found the Jersey runtime. Starting Jersey
15430 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory class: org.atmosphere.cpr.DefaultBroadcasterFactory
15471 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path: /*
15471 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
15522 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.TomcatCometSupport running under container: Apache Tomcat/6.0.37
15522 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
15551 [http-8080-2] INFO org.atmosphere.handler.ReflectorServletProcessor - Installing Servlet com.sun.jersey.spi.container.servlet.ServletContainer
15590 [http-8080-2] ERROR org.atmosphere.cpr.AtmosphereFramework - Failed to initialize Atmosphere Framework
com.sun.jersey.api.container.ContainerException: No WebApplication provider is present
at com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:69)
at com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:391)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:306)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:124)
at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.init(ReflectorServletProcessor.java:291)
at org.atmosphere.handler.ReflectorServletProcessor.init(ReflectorServletProcessor.java:182)
at org.atmosphere.cpr.AtmosphereFramework.initAtmosphereHandler(AtmosphereFramework.java:775)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:506)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:191)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760)
at java.lang.Thread.run(Unknown Source)



Here is my dependency list:

 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks suspicious:


15471 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
15522 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.TomcatCometSupport running under container: Apache Tomcat/6.0.37
15522 [http-8080-2] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol


According to http://tomcat.apache.org/whichversion.html, Tomcat only supports WebSockets starting with Tomcat 7 (assuming that whatever Atmosphere refers to as "WebSocket" is the standard WebSocket).
 
Prathy Maroor
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh. Thanks! I missed it earlier.

Is there a way to exclude websockets from atmosphere? Because right now I do not need it but may need later.
 
Prathy Maroor
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I tried to make atmosphere use comet instead of websockets:



But I still get the same error. I am not sure what the problem is anymore.
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the first thing about atmosphere. You're listing Servlet API 2.4, as a dependency, though - you said you wanted a 2.5 web app.

Of course, if atmosphere normally needs something like "atmosphere-compat-tomcat7" for TC 7, chances are it needs something similar for TC 6.
 
Prathy Maroor
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.servlet 2.4 or 2.5 does not matter here as I was using 2.4 for 3.0 web app. But I did change that to 2.5 and try again - no difference.

I am not very sure about atmosphere as well - because I am kind of working on someone else's project trying to fix it. atmosphere-compat-tomcat7 wasnt required when I ran it on tomcat 7. I have been trying various things tp downgrade it to 6 and it was part of the trials. that jar doesn't help anyway.
 
He's giving us the slip! Quick! Grab this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!