Failed using Comet support?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Failed using Comet support?

akaiser
I can, with certainty, say I'm probably just doing something boneheaded here, but after a minute or so of running my app writes the following message in my log file:

2011-05-05 09:49:10,650  WARN - failed using comet support: org.atmosphere.container.TomcatCometSupport, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
2011-05-05 09:49:10,652  WARN - Using BlockingIOCometSupport.

Now everything seems to be working, but this just worries me.  I do have conf/server.xml in Tomcat set up to use the Http11NioProtocol connector, and my META-INF/context.xml file is present, containing this:

<Context path="${context.path}">
    <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader" />
</Context>

I'm assuming I need to add something to context.xml to specify a Comet app, but I'm having a major Google fail when it comes to trying to find what that needs to be. Any help would be greatly appreciated. Thanks!

Andy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failed using Comet support?

Jeanfrancois Arcand-4
Salut,

On 11-05-05 10:39 AM, akaiser wrote:

> I can, with certainty, say I'm probably just doing something boneheaded here,
> but after a minute or so of running my app writes the following message in
> my log file:
>
> 2011-05-05 09:49:10,650  WARN - failed using comet support:
> org.atmosphere.container.TomcatCometSupport, error: Tomcat failed to detect
> this is a Comet application because context.xml is missing or the
> Http11NioProtocol Connector is not enabled.
> If that's not the case, you can also remove META-INF/context.xml and
> WEB-INF/lib/atmosphere-compat-tomcat.jar
> 2011-05-05 09:49:10,652  WARN - Using BlockingIOCometSupport.
>
> Now everything seems to be working, but this just worries me.

Right, the BlockingIOCometSupport is used instead of the Tomcat one.


  I do have

> conf/server.xml in Tomcat set up to use the Http11NioProtocol connector, and
> my META-INF/context.xml file is present, containing this:
>
> <Context path="${context.path}">
>      <Loader
> loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
> />
> </Context>
>
> I'm assuming I need to add something to context.xml to specify a Comet app,
> but I'm having a major Google fail when it comes to trying to find what that
> needs to be. Any help would be greatly appreciated. Thanks!

Are you using JBoss or pure Tomcat? If you don't set the classloader,
does the same error occurs? Finally, which version of Atmosphere are you
using?

Thanks!

-- Jeanfrancois


>
> Andy
>
> --
> View this message in context: http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Failed-using-Comet-support-tp6334459p6334459.html
> Sent from the Atmosphere users mailling list mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failed using Comet support?

akaiser
I'm using pure Tomcat, and Atmosphere 0.7.1.  When I tried taking out the Loader, the Spring classes in my servlet failed to load.  Upon doing some research, though, based on your suggestion that removing the loader ought to fix the Atmosphere side of things, and looking at the sample context.xml in the atmosphere-chat example, I added a 'delegate="true"' to the Loader:

<Context path="${context.path}">
    <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
        delegate="true"
    />
</Context>

This works perfectly - all the Spring classes load as expected, since the default Loader can't find them and hands off to the Spring Loader defined here, but the Atmosphere TomcatCometSupport class is found by the Default (as it should be) first and is loaded properly without deferring to Spring.  No more warnings, everything's good.

I'll admit I'm a bit of a Java servlet noob, so this setting might have been obvious to folks with more experience, but I'll throw it out there for anyone who might run up against it in the future and find this in a search. Thanks for the help, Jeanfrancois, and keep up the good work - Atmosphere is a great product.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failed using Comet support?

Jeanfrancois Arcand-4
Salut,

apology for the delay

On 11-05-06 1:40 PM, akaiser wrote:

> I'm using pure Tomcat, and Atmosphere 0.7.1.  When I tried taking out the
> Loader, the Spring classes in my servlet failed to load.  Upon doing some
> research, though, based on your suggestion that removing the loader ought to
> fix the Atmosphere side of things, and looking at the sample context.xml in
> the atmosphere-chat example, I added a 'delegate="true"' to the Loader:
>
> <Context path="${context.path}">
>      <Loader
> loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
>          delegate="true"
>      />
> </Context>
>
> This works perfectly - all the Spring classes load as expected, since the
> default Loader can't find them and hands off to the Spring Loader defined
> here, but the Atmosphere TomcatCometSupport class is found by the Default
> (as it should be) first and is loaded properly without deferring to Spring.
> No more warnings, everything's good.
>
> I'll admit I'm a bit of a Java servlet noob, so this setting might have been
> obvious to folks with more experience, but I'll throw it out there for
> anyone who might run up against it in the future and find this in a search.
> Thanks for the help, Jeanfrancois, and keep up the good work - Atmosphere is
> a great product.

Thanks for sharing that. I will remind that one :-) Let me know if you
face any issue...changing the class delegation model shoudn't impact
Atmosphere, but we never know.

Thanks!

-- Jeanfrancois



>
> --
> View this message in context: http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Failed-using-Comet-support-tp6334459p6338335.html
> Sent from the Atmosphere users mailling list mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failed using Comet support?

oscarb
I'm running into the exact same problem. There is one difference though, my context.xml contains the following:

<Context path="/myapp"/>

What could possibly be causing Tomcat to fail to detect this is a Comet application? I have especially a hard time figuring out where I can find information about this. Any help is much appreciated.

FYI I'm trying to get it working on Tomcat 6.0.32 (but Tomcat 7.0.11 has the same issue) using Atmosphere 1.0.






Loading...