Atmosphere 3.0.x samples. For 2.7.x sample, see branch main
atmosphere / atmosphere-samples Goto Github PK
View Code? Open in Web Editor NEWAtmosphere's samples.
Atmosphere's samples.
Atmosphere 3.0.x samples. For 2.7.x sample, see branch main
The chat sample description says the following:
This sample demonstrates the use of WebSocket (falling back to SSE and Long-Polling) using the @managedservice annotation.
This is not correct/true. The sample only has one fallback transport configured (long-polling), as in most atmosphere samples.
The sample also demonstrates how to detect which transport are supported by the client and server by negotiating with the server.
This is also not correct/true. The sample does nothing of the sort. In fact, I couldn't find a single sample that does the above, despite this text being included on multiple samples.
I am trying to learn about fallbacks in atmosphere, how to configure them, and how to support more than just two fallbacks. But apart from the isolated code shown here (which I do not know how to integrate into my applicaton), I can't find any example of supporting multiple fallbacks.
The above code sample has the following text:
Download the atmosphere-chat to demo live.
I am not sure whether the atmosphere-chat demo included this code in an older version, but if you could include a sample that demonstrates detecting/falling back to multiple transports it would be much appreciated.
I cloned this example and deployed the WAR file on Tomcat 7.0.42. I uncommented atmosphere-redis dependency inside pom.xml and added broadcaster = RedisBroadcaster.class inside the @managedservice annotation for class Chat.
maven could build the .war file which I manually copied over to Tomcat's webapps directory.
Tomcat could successfully deploy the war file. when I ran index.html in Firefox 23.0.1, I can see the following error inside firebug.
The error is tagged on atmosphere.js line 962 - due to this error, the page can not connect to the websocket and the page stays in the state of "Connecting"
I cant get the chat example to run, netbeans and jdeveloper both fail when trying to deploy that sample.
Is their anything that is not in the tutorials that I need to do?
Is There a download of a full working example?
Readme.md says
`### Using the sample
bash
% mvn
% cd target
% unzip nettosphere-jersey-chat.jar
% chmod a+x ./bin/nettosphere.sh
% ./bin/nettosphere.sh
`
But the jar created by maven doesn't even have a /bin/ inside of it. Manually running org.nettosphere.samples.chat.NettosphereJerseyChat seems to work otherwise, but browsers pointed to 127.0.0.1:8080 cannot find atmosphere.js. Naturally, the chat functionality doesn't work either.
I wanted to try long-polling transport so I edited application.js:
var transport = 'long-pooling';
var fallbackTransport = 'htmlfile';
I used jetty server (mvn jetty:run) and chromium (32.0.1700.107) but application is dead (cannot choose chatroom). Works the same on firefox.
Neither atmosphere or the atmosphere extension mentioned in the base pom.xml exist in maven. This makes the sample unbuildable.
<atmosphere-version>2.3.0-SNAPSHOT</atmosphere-version>
<extensions-version>2.3.0-SNAPSHOT</extensions-version>
I want to transfer blob to/from browser, without 33% overhead of base64. How shall I do that?
I found GWT 2.0 sample to send object using RPC Serializer and it is working fine.
I want to send binary data to and from server (Tomcat 7). Can anyone suggest me the way how can i write byte[] to and from the server. I tried to set below init param in web.xml
org.atmosphere.websocket.binaryWrite
true
and rpcRequestConfig.setHeader("X-Atmosphere-Binary", "true"); on client side but it is not working.
Status code higher or equal than 400. Unable to deliver the websocket messages to installed component. Status 404 Message Not Found
Windows 7, x64
Java 1.8.0_25, x64
Tomcat 8.0.15 or 8.0.17, x64
It's working on Tomcat 7.0.57.
I have been trying to test SockJS together with atmosphere by looking at the SockJS sample.
The sample brings in the atmosphere-sockjs
package, and mentions SockJsAtmosphereInterceptor
in the comments at the top of the SockjsChat
class, but does not actually use it in the ManagedService
annotation (it uses SuspendTrackerInterceptor
instead).
Is this intentional or an error in the sample?
Chat sample ( https://github.com/Atmosphere/atmosphere-samples/tree/master/samples/chat ) doesn't receive messages from the server when using long-polling and the message sent contained for example ร .
I've had a similar problem with a REST app, and I had to call HttpSerlvetResponse.setCharacterEncoding("UTF-8"). For the chat sample I couldn't easily figure out where you can obtain the associated ServletResponse.
(Sample running under Tomcat 7)
LE: changed HttpSerlvetRequest to HttpSerlvetResponse
Originally raised in google group:
https://groups.google.com/forum/#!topic/atmosphere-framework/-v9SFkGuW3I
Hi,
Thanks in advance for the help. Hopefully this is the right place for this.
The setup is long-polling on IBM websphere 8.5.5.4 with atmosphere version 2.4.2. When I send multiple messages to be broadcast (say 25 one after another) or occasionally a freak occurrence where two messages are to be broadcast immediately one after the other the resource cannot be acquired.
Using a class with
@ManagedService(path = "/broadcast")
to handle connections and create an AtmosphereSession for each connection
I am then using AtmosphereSession objects to acquire the resource:
AtmosphereResource resource = session.tryAcquire(5);
And then get the broadcaster from the resource:
Broadcaster broadcaster = resource.getBroadcaster();
But the first call fails. If I increase the timeout it can reduce the problem but can take up to 15 seconds to get the resource or still fail.
My atmosphere configuration is as follows:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
</dependency>
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>${serviceName}-${serviceVersion}</display-name>
<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.cpr.packages</param-name>
<param-value>com.test.project.broadcast.atmosphere</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.dropAccessControlAllowOriginHeader</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.AtmosphereInterceptor</param-name>
<param-value>org.atmosphere.interceptor.HeartbeatInterceptor, org.atmosphere.interceptor.PaddingAtmosphereInterceptor , org.atmosphere.interceptor.SSEAtmosphereInterceptor, org.atmosphere.interceptor.CacheHeadersInterceptor, org.atmosphere.interceptor.AndroidAtmosphereInterceptor, org.atmosphere.interceptor.JSONPAtmosphereInterceptor, org.atmosphere.interceptor.JavaScriptProtocol, org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor, org.atmosphere.interceptor.OnDisconnectInterceptor, org.atmosphere.interceptor.IdleResourceInterceptor</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterLifeCyclePolicy</param-name>
<param-value>IDLE_DESTROY</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcaster.shareableThreadPool</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcaster.maxProcessingThreads</param-name>
<param-value>10</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads</param-name>
<param-value>10</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.Broadcaster.supportOutOfOrderBroadcast</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>
<param-value>org.atmosphere.container.Servlet30CometSupport</param-value>
</init-param>
<init-param>
<param-name>com.ibm.ws.webcontainer.async-supported</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/broadcast/*</url-pattern>
</servlet-mapping>
After some more investigation when this happens the re-established long poll from the client seems to be hung from that point onwards, any broadcasts during that time fails. Our load balancer seems to kill the connection after a minute and the long-poll reconnects and works fine. If the load balancer is turned off the connection stays up until the default timeout on the atmosphere client kicks in and closes the connection.
During this time if I close the client the following exception is thrown in the atmosphere logs:
2016-08-02 15:02:17,812 [WebContainer : 8] atmosphere.cpr.AsynchronousProcessor ERROR - Failed to cancel resource: 361cc603-5ece-433d-a573-ffef70a12e5c
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.atmosphere.util.Utils.invoke(Utils.java:209)
at org.atmosphere.config.managed.ManagedAtmosphereHandler.invoke(ManagedAtmosphereHandler.java:335)
at org.atmosphere.config.managed.ManagedAtmosphereHandler.onStateChange(ManagedAtmosphereHandler.java:209)
at org.atmosphere.cpr.AsynchronousProcessor.invokeAtmosphereHandler(AsynchronousProcessor.java:544)
at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:486)
at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:340)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:199)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115)
at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:68)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2285)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:191)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:177)
ie8 error :org.atmosphere.cpr.AtmosphereFramework - AtmosphereFramework exception
java.lang.IllegalStateException: !asyncSupported
chrom console log: Protocol data not sent by the server. If you enable protocol on client side, be sure to install JavascriptProtocol interceptor on server side.Also note that atmosphere-runtime 2.2+ should be used.
Entering a single quote in the message text of the sockjs-chat example fails with a javascript syntax error.
Don't know if the issue is in the chat example or in atmosphere-sockjs implementation.
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<async-supported>true</async-supported>
async-supported
is Servlet 3.0 or greater.
I grabbed the zip and tried four samples in a row. none of them worked. I raised issues against three of them.
I was excited about idea of atmosphere as it seems to be 'write once, run everywhere' but the quality of these samples is 'write once, broke everywhere'.
I know that this is opensource and stuff gets bit rot and sometimes things break and that folks like me should send a PR. However if I were the company selling commercial support for this though I would be really worried about the message that this is sending out. A few apps that really work is a good thing. A huge amount of apps where four in a row picked at random and are broken is such a bad thing that you need to take them offline until you get them fixed.
Maybe I will try again tomorrow but right now I just want to walk away and not come back.
๐
It is because of the the default "/*" broadcaster
When I'm running atmosphere-socketio-chat in the Tomcat 7.0.68,It appears javax.servlet.ServletException.
javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.onStartup(WebSocketServerContainerInitializer.java:146)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5573)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.onStartup(WebSocketServerContainerInitializer.java:146)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5573)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
http://stackoverflow.com/questions/32202344/javax-servlet-servletexception-not-running-on-jetty-jsr-356-support-unavailabl
I find this and it's not helping.
And the environment is :
JRE 1.8
Tomcat 7.0.68
Andbody can help me ?
Hi,
I'm trying to run the gwt20-managed-rpc sample to understand how to integrate atmosphere into my GWT application.
According to README.md (https://github.com/Atmosphere/atmosphere-samples/blob/master/README.md), I have to compile the project, then execute "mvn jetty:run". This works fine, but what after that? I visited the running webserver under http://localhost:8080/ and there actually is a page titled "GWT RPC demo for atmosphere" with an empty text box and nothing else (no buttons).
How do I trigger messages? According to samples.client.GwtRpcDemo.java, there should be a Button added to a div named "buttonbar", but apparently, nothing happens:
How do I test if there is a service made ready on the server side? Is there any "bootstrap" code that instantiates and initializes samples.server.ManagedGWTResource? When trying to integrate the code into my application, I finally had some success using:
Config.Builder builder = new Config.Builder();
builder.resource(ManagedGWTResource.class);
...
I cannot find such a construct in gwt20-managed-rpc.
I could successfully run the gwt20-websockets sample (as described in https://github.com/Atmosphere/atmosphere-samples/blob/master/extensions-samples/gwt/gwt20-websockets/README.md).
But I am not interested in implementing an only websocket implementation. I want to use a ManagedService that transparently manages the message protocols used.
After mentioning my tries to integrate the code into my project, I might as well tell about the problems that made me try troubleshoot the sample again.
When running my custom implementation, the call to "subsribe" on the Atmosphere object results in the following error (on client side): "Breaking on exception: TypeError: Cannot read property 'subscribe' of undefined"
Here is the respective call in my application, which is directly derivated from the call in the client sample code in samples.client.GwtRpcDemo.java:
Atmosphere atmosphere = Atmosphere.create();
final AtmosphereRequest jerseyRpcRequest = atmosphere.subscribe(jerseyRpcRequestConfig);
The error happens within subscribe(...) while calling org.atmosphere.gwt20.client.Atmosphere:subscribeImpl(RequestConfig requestConfig) which has a native implementation.
I'm not sure (since I don't get debugging running in gwt20-managed-rpc), but I think it's likely that this particular call to subscribe is successfully traversed in my running instance of gwt20-managed-rpc. At least, onModuleLoad() should be called and no error arises. I can only assume that there must be a version conflict in my configuration so that the native implementation cannot be found in the compiled code because it might have been renamed.
Here is the dependency excerpt from my pom.xml:
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.7.0-beta1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.7.0-beta1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.atmosphere.extensions</groupId>
<artifactId>atmosphere-gwt20-client</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>nettosphere</artifactId>
<version>2.1.1</version>
</dependency>
(Note that I am using 2.3.0-SNAPSHOT of atmosphere-gwt20-client. I cloned the project and compiled it myself, as compatibility with version 2.7.0-beta1 of GWT was integrated there only 3 days ago.)
Best regards
ternite
Hey guys,
I'm getting this error while starting my application.
My current configuration
I have tried suppressing JSR356 detection by adding the following init param to CXF servlet
servletRegistration.setInitParameter("org.atmosphere.websocket.suppressJSR356", "true");
The above didn't worked as a VoidServletConfig is created instead of using the CXF one.
Stacktrace:-
[INFO] [talledLocalContainer] [local] [] [DEBUG] [2017-03-15T16:48:45,184] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Found javax.servlet.AsyncListener
[INFO] [talledLocalContainer] [local] [] [DEBUG] [2017-03-15T16:48:45,185] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Found javax.websocket.Endpoint
[INFO] [talledLocalContainer] [local] [] [ WARN] [2017-03-15T16:48:45,191] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Failed to create AsyncSupport class: class org.atmosphere.container.JSR356AsyncSupport, error: java.lang.reflect.InvocationTargetException
[INFO] [talledLocalContainer] [local] [] [ERROR] [2017-03-15T16:48:45,192] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Real error: Unable to configure jsr356 at that stage. ServerContainer is null
[INFO] [talledLocalContainer] java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null
[INFO] [talledLocalContainer] at org.atmosphere.container.JSR356AsyncSupport.(JSR356AsyncSupport.java:51) ~[atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.atmosphere.container.JSR356AsyncSupport.(JSR356AsyncSupport.java:40) ~[atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:235) [atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:306) [atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:292) [atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2083) [atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:914) [atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:825) [atmosphere-runtime-2.4.9.jar:2.4.9]
[INFO] [talledLocalContainer] at org.apache.cxf.transport.websocket.atmosphere.AtmosphereWebSocketServletDestination.(AtmosphereWebSocketServletDestination.java:65) [cxf-rt-transports-websocket-3.1.7.jar:3.1.7]
[INFO] [talledLocalContainer] at org.apache.cxf.transport.websocket.WebSocketDestinationFactory.createDestination(WebSocketDestinationFactory.java:96) [cxf-rt-transports-websocket-3.1.7.jar:3.1.7]
[INFO] [talledLocalContainer] at org.apache.cxf.transport.websocket.WebSocketTransportFactory.getDestination(WebSocketTransportFactory.java:136) [cxf-rt-transports-websocket-3.1.7.jar:3.1.7]
[INFO] [talledLocalContainer] at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:84) [cxf-core-3.1.7.jar:3.1.7]
[INFO] [talledLocalContainer] at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:63) [cxf-core-3.1.7.jar:3.1.7]
[INFO] [talledLocalContainer] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:170) [cxf-rt-frontend-jaxrs-3.1.7.jar:3.1.7]
[INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) [spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4851) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816) [catalina.jar:8.0.41]
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_111]
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_111]
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
[INFO] [talledLocalContainer] [local] [] [DEBUG] [2017-03-15T16:48:45,203] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Found org.apache.catalina.comet.CometFilterChain
[INFO] [talledLocalContainer] [local] [] [DEBUG] [2017-03-15T16:48:45,204] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Found org.apache.coyote.http11.Http11NioProcessor
[INFO] [talledLocalContainer] [local] [] [ WARN] [2017-03-15T16:48:45,208] [ocalhost-startStop-1] [pr.DefaultAsyncSupportResolver] Found multiple containers, please specify which one to use: org.atmosphere.container.Tomcat7CometSupport, org.atmosphere.container.TomcatCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.Tomcat7CometSupport
[INFO] [talledLocalContainer] [local] [] [ INFO] [2017-03-15T16:48:45,209] [ocalhost-startStop-1] [sphere.cpr.AtmosphereFramework] Installing Default AtmosphereInterceptors
If I deploy the same application on Jetty 8/9 it works perfectly.
The parameter :
param-name : org.atmosphere.annotation.packages
param-value : org.atmosphere.samples.chat.custom
is missing in file web.xml for atmosphere-chat sample. The SampleConfig class is not processed.
Hi,
I deployed sample application on tomcat 7.0.47. it is working fine but JOB 2 is not responding to second subscriber. It is sending message to first subscriber only. It should send message to second subscriber.
Correct class in pom.xml to
org.nettosphere.samples.chat.NettosphereJerseyChat
Downloading the github zip link this hour then trying to run the latest chat app with
cd atmosphere-samples-master/nettosphere-samples/chat
mvn exec:java
it comes up and when I try to enter my name with to go into the chat room on either Chrome or Firefox on latest Mac OXS the server logs:
20:50:22.676 [nioEventLoopGroup-3-2] WARN o.a.c.m.ManagedAtmosphereHandler - AtmosphereRequest{ method=POST contextPath= servletPath= pathInfo=/chat requestURI=/chat requestURL=http://127.0.0.1:8080/chat AtmosphereResource UUID=38229694-5554-4a96-9e13-b4c58876b473 destroyable=false} received an empty body
and the GUI is dead. Looking at the process I am running with JDK 1.8.0_60 and latest maven 3.3.3:
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -classpath /usr/local/Cellar/maven333/boot/plexus-classworlds-2.5.2.jar -Dclassworlds.conf=/usr/local/Cellar/maven333/bin/m2.conf -Dmaven.home=/usr/local/Cellar/maven333 -Dmaven.multiModuleProjectDirectory=/Users/simbo/projects/trex/atmosphere-samples-master/nettosphere-samples/chat org.codehaus.plexus.classworlds.launcher.Launcher exec:java
Hi,
tried to run the stomp pubsub sample on the stomp/pubsub dir using mvn jetty:run
always get the following error:
217 [main] ERROR org.atmosphere.cpr.AtmosphereFramework - Failed to initialize Atmosphere Framework
java.lang.NoSuchMethodError: org.atmosphere.cpr.AtmosphereResourceSessionFactory.getDefault()Lorg/atmosphere/cpr/AtmosphereResourceSessionFactory;
at org.atmosphere.stomp.interceptor.FrameInterceptor.configure(FrameInterceptor.java:183)
.....
any idea on that ? (codebase is master)
using nettosphere yields the same result :-(
thanks a lot
Originally raised in google group:
https://groups.google.com/forum/#!topic/atmosphere-framework/XQ9OUm-y-XA
Hi,
Having this issue using the latest server side Atmosphere 2.4.5 whereby the initial long polling subscribe GET returns the resource Id correctly but then the next GET request for the initial long poll throws the following:
o.atmosphere.cpr.DefaultBroadcaster - Duplicate resource c5c03578-8f8d-431c-b1ac-665cf5ac4912. Could be caused by a dead connection not detected by your server. Replacing the old one with the fresh one
10:45:41.112 [Default Executor-thread-791] ERROR o.a.cpr.AsynchronousProcessor - Interceptor Atmosphere LifeCycle crashed. Processing will continue with other interceptor.
java.lang.ClassCastException: java.lang.String cannot be cast to org.atmosphere.cpr.AtmosphereResource
at org.atmosphere.cpr.AtmosphereRequestImpl.resource(AtmosphereRequestImpl.java:854)
I am using the default interceptors. Have also tried adding the following: org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor, org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor, org.atmosphere.interceptor.AtmosphereResourceStateRecovery, org.atmosphere.interceptor.AtmosphereResourceStateRecovery.BroadcasterTracker, org.atmosphere.interceptor.AtmosphereResourceStateRecovery.OnAlwaysSuspend,
But if I manually do the same calls and do a POST for the initial subscribe and the first long poll is still a GET then it connects fine and the open event in the managed service is fired successfully and I can broadcast to that resource.
Also have now tested editing the atmosphere.js to make a POST request initially which also resolves the issue but ideally I don't want to do that.
The setup is long-polling on IBM websphere 8.5.5.4
What could be the cause of this?
Thanks,
Lee
Some samples are still using jquery.atmosphere.js
extensions-samples/guice/chat-guice
extensions-samples/gwt
extensions-samples/spring/spring-websocket
samples/async-annotation-pubsub
samples/embedded-jetty-websocket-chat
samples/jquery-websockethandler-pubsub
samples/meteor-chat
samples/scala-chat
samples/sse-rest-chat
samples/twitter-live-feed
samples/webrtc-atmospherehandler
samples/webrtc-jersey
stomp
we need to update them ...
the currently available atmosphere-stomp expects AtmosphereRequest/Resource as objects and not as interfaces (as they are now in 2.4.x).
so we need to disable stomp sample until atmosphere-stomp is updated to support atmosphere 2.4.x.
Is 2.5.0 still on the roadmap?
I'm looking to find a way where a message received in the broadcast method could be sent over Vertx's event bus
Example:
@post
@produces("application/json")
public Response broadcast(Message message) {
// it appears vertx object is only available in the Verticle object, not in the resource object
EventBus eb = vertx.eventBus();
// Send message received over vertx event bus
eb.send("test.address', "Got message");
return new Response(message.author, message.message);
}
I looked at both PlatformManager and VertxFactory, but results were inconclusive since the event bus is started asynchronously. Is there a better way to access the event bus from the resource?
Some samples fail to build (for example chat): https://buildhive.cloudbees.com/job/Atmosphere/job/atmosphere-samples/308/console
message : Failed to execute goal on project atmosphere-chat:
Could not resolve dependencies for project org.atmosphere.samples:atmosphere-chat:war:2.1.0-SNAPSHOT:
Could not find artifact org.atmosphere.client:javascript:war:2.1.2-SNAPSHOT in oss.sonatype.org (http://oss.sonatype.org/content/repositories/releases)
In https://github.com/Atmosphere/atmosphere-samples/blob/master/pom.xml#L385 <client-version>2.1.2-SNAPSHOT</client-version>
should be <client-version>2.1.2</client-version>
There is only 2.1.2 in http://oss.sonatype.org/content/repositories/releases/org/atmosphere/client/javascript/ .
Downloading the github zip link this hour then trying to run the latest chat app with
cd atmosphere-samples-master/samples/spring-boot-sample-atmosphere
mvn package spring-boot:run
does not start giving error
[INFO] Attaching agents: []
Listening for transport dt_socket at address: 9009
Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.core.ResolvableType.forInstance(Ljava/lang/Object;)Lorg/springframework/core/ResolvableType;
at org.springframework.context.event.SimpleApplicationEventMulticaster.resolveDefaultEventType(SimpleApplicationEventMulticaster.java:142)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:119)
at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:100)
at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:54)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:277)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at org.atmosphere.samples.springboot.AtmosphereApplication.main(AtmosphereApplication.java:80)
I am running with JDK 1.8.0_60 and latest maven 3.3.3:
Pro:spring-boot-sample-atmosphere simbo$ mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T12:57:37+01:00)
Maven home: /usr/local/Cellar/maven333
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11", arch: "x86_64", family: "mac"
Pro:spring-boot-sample-atmosphere simbo$
Hey,
With latest news that JsInterop is the future and that JSNI will be deprecated are you planning on updating this library? Is this something other people would be interested in pursuing? There is a "simple" angular example here: https://github.com/jDramaix/AngularGwtExample
Strange GWT compiler error, so the sample are excluded from the release.
[INFO] --- gwt-maven-plugin:2.5.1:compile (default) @ gwt20-managed-rpc ---
[INFO] Compiling module org.atmosphere.samples.GwtRpcDemo
[INFO] [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:434)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:403)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:900)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:625)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:640)
[INFO] at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO] Caused by: java.lang.NoSuchMethodError: com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.<init>(Lcom/google/gwt/core/ext/TreeLogger;Lcom/google/gwt/core/ext/GeneratorContext;)V
[INFO] at org.atmosphere.gwt20.rebind.SerializerGenerator.generateIncrementally(SerializerGenerator.java:87)
[INFO] at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:651)
[INFO] at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
[INFO] at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:355)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] ... 37 more
[INFO] [ERROR] at GwtRpcDemo.java(83): GWT.create(RPCSerializer.class)
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at GwtRpcDemo.java(83): (RPCSerializer) GWT.create(RPCSerializer.class)
[INFO] com.google.gwt.dev.jjs.ast.JCastOperation
[INFO] [ERROR] at GwtRpcDemo.java(83): RPCSerializer rpc_serializer = (RPCSerializer) GWT.create(RPCSerializer.class)
[INFO] com.google.gwt.dev.jjs.ast.JDeclarationStatement
[INFO] [ERROR] at GwtRpcDemo.java(51): {
[INFO] GWT.setUncaughtExceptionHandler(new GwtRpcDemo$1(this));
[INFO] HorizontalPanel buttons = new HorizontalPanel();
[INFO] final TextBox messageInput = new TextBox();
Can you please add a sample for polling
We should detect the correct RTCPeerConnection object so that the sample works on both Chrome and Firefox.
ERROR org.atmosphere.socketio.cpr.SocketIOAtmosphereInterceptor -
java.lang.NullPointerException
at org.atmosphere.cache.SessionBroadcasterCache.retrieveFromCache(SessionBroadcasterCache.java:73)
at org.atmosphere.cpr.DefaultBroadcaster.retrieveTrackedBroadcast(DefaultBroadcaster.java:1026)
at org.atmosphere.cpr.DefaultBroadcaster.checkCachedAndPush(DefaultBroadcaster.java:931)
at org.atmosphere.cpr.DefaultBroadcaster.cacheAndSuspend(DefaultBroadcaster.java:1417)
at org.atmosphere.cpr.DefaultBroadcaster.addAtmosphereResource(DefaultBroadcaster.java:1385)
at org.atmosphere.cpr.AtmosphereResourceImpl.suspend(AtmosphereResourceImpl.java:408)
at org.atmosphere.socketio.transport.WebSocketTransport.handle(WebSocketTransport.java:91)
at org.atmosphere.socketio.cpr.SocketIOAtmosphereInterceptor.inspect(SocketIOAtmosphereInterceptor.java:238)
at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:310)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:175)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:104)
at org.atmosphere.container.Jetty9AsyncSupportWithWebSocket.service(Jetty9AsyncSupportWithWebSocket.java:180)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2079)
at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:570)
at org.atmosphere.websocket.DefaultWebSocketProcessor.open(DefaultWebSocketProcessor.java:215)
at org.atmosphere.container.Jetty9WebSocketHandler.onWebSocketConnect(Jetty9WebSocketHandler.java:62)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onConnect(JettyListenerEventDriver.java:87)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.openSession(AbstractEventDriver.java:220)
at org.eclipse.jetty.websocket.common.WebSocketSession.open(WebSocketSession.java:406)
at org.eclipse.jetty.websocket.server.WebSocketServerConnection.onOpen(WebSocketServerConnection.java:63)
at org.eclipse.jetty.server.HttpConnection.completed(HttpConnection.java:339)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:444)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
at java.lang.Thread.run(Thread.java:745)
https://github.com/Atmosphere/atmosphere-samples/blob/master/samples/chat/src/main/webapp/javascript/application.js#L5
<!-- For demonstration of how you can customize the fallbackTransport using the onTransportFailure function -->
should be
// For demonstration of how you can customize the fallbackTransport using the onTransportFailure function
We can upgrade Amosphere 2.3.x samples to use jackson2 instead of jackson 1.x.
I cloned the sample project but there were a lot of failures when I tried building everything. Starting with
atmosphere-chat
with error
[ERROR] Failed to execute goal on project atmosphere-chat: Could not resolve dependencies for project org.atmosphere.samples:atmosphere-chat:war:2.2.0-SNAPSHOT: The following artifacts could not be resolved: org.atmosphere.client:javascript:war:2.2.3-SNAPSHOT, org.atmosphere:atmosphere-runtime:jar:2.2.0-SNAPSHOT: Failure to find org.atmosphere.client:javascript:war:2.2.3-20140710.134038-2 in https://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss has elapsed or updates are forced -> [Help 1]
I get the same error when I try to build other projects too like
atmosphere-jersey-pubsub
When I try building async-annotation-pubsub I get this error
[ERROR] Failed to execute goal on project atmosphere-annotation-pubsub: Could not resolve dependencies for project org.atmosphere.samples:atmosphere-annotation-pubsub:war:2.2.0-SNAPSHOT: Failure to find org.atmosphere:atmosphere-jersey:jar:2.2.0-20140721.154308-196 in https://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss has elapsed or updates are forced -> [Help 1]
~/workspace/atmosphere-samples$ mvn -X
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project atmosphere-jersey2-chat: Compilation failure
[ERROR] /home/mskacel/workspace/atmosphere-samples/samples/jersey2-chat/src/main/java/org/atmosphere/samples/chat/jersey/Jersey2Resource.java:[45,26] error: cannot find symbol
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project atmosphere-jersey2-chat: Compilation failure
/home/mskacel/workspace/atmosphere-samples/samples/jersey2-chat/src/main/java/org/atmosphere/samples/chat/jersey/Jersey2Resource.java:[45,26] error: cannot find symbol
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
/home/mskacel/workspace/atmosphere-samples/samples/jersey2-chat/src/main/java/org/atmosphere/samples/chat/jersey/Jersey2Resource.java:[45,26] error: cannot find symbol
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :atmosphere-jersey2-chat
I've tried to replace Jersey in rest-chat sample by using Apache CXF 2.7.8 . The changes involved the following files:
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.atmosphere.samples</groupId>
<artifactId>atmosphere-samples</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.atmosphere.samples</groupId>
<artifactId>atmosphere-cxf-chat</artifactId>
<packaging>war</packaging>
<version>2.1.0-SNAPSHOT</version>
<name>cxf-rest-chat</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback-version}</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-annotations</artifactId>
<version>${atmosphere-version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
<version>2.7.8</version>
</dependency>
</dependencies>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<description>Atmosphere REST Chat</description>
<display-name>Atmosphere REST Chat</display-name>
<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>jaxrs.serviceClasses</param-name>
<param-value>
org.atmosphere.samples.chat.cxf.ChatResource
</param-value>
</init-param>
<init-param>
<param-name>jaxrs.providers</param-name>
<param-value>org.codehaus.jackson.jaxrs.JacksonJsonProvider</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.websocket.messageContentType</param-name>
<param-value>application/json</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/chat/*</url-pattern>
</servlet-mapping>
</web-app>
atmosphere.xml
<atmosphere-handlers>
<!-- CXF -->
<atmosphere-handler support-session="false"
context-root="/*"
class-name="org.atmosphere.handler.ReflectorServletProcessor">
<property name="servletClassName"
value="org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet"/>
</atmosphere-handler>
</atmosphere-handlers>
Besides, I removed the JerseyBroadcaster dependency used in @AtmosphereService.
When I run the sample with Jetty 8.1.3 everything looks fine, but when I entered the url http://localhost:8080 the chat sample show the message Sorry, but there's some problem with your socket or the server is down
The log prints the following trace:
22:01:04.962 [qtp938857350-20] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <> type 22:01:04.962 [qtp938857350-20] DEBUG o.a.c.t.servlet.ServletController - Service http request on thread: Thread[qtp938857350-20,5,main] 22:01:04.962 [qtp938857350-20] DEBUG o.a.c.t.http.AbstractHTTPDestination - Create a new message for processing 22:01:04.963 [qtp938857350-20] DEBUG o.apache.cxf.transport.http.Headers - Request Headers: {Cache-Control=[no-cache], connection=[Upgrade], content-type=[application/json], Cookie=[JSESSIONID=02270813-7ad9-456b-becc-9ef103db4960; rememberMe=x1oyQd8NdPcmEcKhMDjFzvpkIO54DTPzRg+URGhmT8XnPoQOlwoS12XWHkZzSBUmF4dNnmnLX3vOo3hDEKXgv3PO2VfML+k/Mi3gjH9fmDrucND/hWbtJLmPOpNVox5KToY1aQt4dbS5mkWJsWF41L4w7SHWcg9jP6nhJbWufAvD66tSMlKXRfxEKEAVCyhf39s96jXiDLzkvGNmQrms1nzlPIKs1mH2wpmPSjyXbLogcpsEyTSbMaT9LRd+MplE8q+m4RegkBxiph09rfnAvt/HAjBW1VwTdngFojW4rJZQEzOoCpSmsF2O6V6HXue9/kMW3a/WI4GMNRHsAUTBSC++m4EV1t4CKWmHXiRmOBbQJvaOZIGMlGOIX5/GH1+T1B8AiFRnYWvnM+PdTnEz5nfMH+E+3u1gCOykqLfGJkv/tb4JzPKwTGUtZ2nw/alqgjk/APr30fDbDDECfj3LuK4/5z2EzBMx1ypl54FEfFlFKCtkE8l7pwFUao8+c5Agj4TpAkmP4J3Twoaw+oEyF+8rGxCAUb+qN8mSuptgnvkySS+xsVzkSvCqtYWlqALm], Host=[localhost:8080], Origin=[http://localhost:8080], Pragma=[no-cache], Sec-WebSocket-Extensions=[x-webkit-deflate-frame], Sec-WebSocket-Key=[8BVo8MaKpyC3dHnUiowdmA==], Sec-WebSocket-Version=[13], Upgrade=[websocket], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36], X-atmo-protocol=[], X-Atmosphere-Framework=[2.0.0-jquery], X-Atmosphere-tracking-id=[0], X-Atmosphere-TrackMessageSize=[true], X-Atmosphere-Transport=[websocket], X-Cache-Date=[0]} 22:01:04.964 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 to phase pre-stream 22:01:04.964 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@29b22d99 was created. Current flow: pre-stream [CertConstraintsInterceptor] unmarshal [JAXRSInInterceptor] pre-logical [OneWayProcessorInterceptor] invoke [ServiceInvokerInterceptor] post-invoke [OutgoingChainInterceptor] 22:01:04.964 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 22:01:04.964 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@22e85825 22:01:04.964 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource class, request path : / 22:01:04.964 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource operation on the resource class org.atmosphere.samples.chat.cxf.ChatResource 22:01:04.965 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend may get selected 22:01:04.965 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - No method match, method name : broadcast, request path : /, method @Path : /, HTTP Method : GET, method HTTP Method : POST, ContentType : */*, method @Consumes : */*,, Accept : */*,, method @Produces : application/json,. 22:01:04.965 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend on the resource class org.atmosphere.samples.chat.cxf.ChatResource has been selected 22:01:04.965 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request path is: / 22:01:04.965 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request HTTP method is: GET 22:01:04.965 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request contentType is: application/json 22:01:04.965 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Accept contentType is: */* 22:01:04.965 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Found operation: suspend 22:01:04.965 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@67de0c09 22:01:04.966 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@127e5130 22:01:04.966 [qtp938857350-20] DEBUG o.a.c.s.invoker.AbstractInvoker - Invoking method public java.lang.String org.atmosphere.samples.chat.cxf.ChatResource.suspend() on object org.atmosphere.samples.chat.cxf.ChatResource@c45aa2c with params []. 22:01:04.966 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OutgoingChainInterceptor@23042fcc 22:01:04.966 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by bus: [] 22:01:04.966 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by service: [] 22:01:04.966 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by endpoint: [org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7] 22:01:04.966 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by binding: [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984] 22:01:04.967 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@70cfad31 was created. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] 22:01:04.967 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7 22:01:04.967 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf to phase prepare-send-ending 22:01:04.967 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@70cfad31 was modified. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] prepare-send-ending [MessageSenderEndingInterceptor] 22:01:04.967 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984 22:01:04.968 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSOutInterceptor - Response content type is: application/octet-stream 22:01:04.968 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf 22:01:04.969 [qtp938857350-20] DEBUG o.a.c.t.servlet.ServletController - Finished servicing http request on thread: Thread[qtp938857350-20,5,main] 22:01:04.969 [qtp938857350-20] WARN o.a.w.DefaultWebSocketProcessor - AtmosphereResource was null 22:01:05.048 [qtp938857350-21] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <> type 22:01:05.049 [qtp938857350-21] DEBUG o.a.c.t.servlet.ServletController - Service http request on thread: Thread[qtp938857350-21,5,main] 22:01:05.049 [qtp938857350-21] DEBUG o.a.c.t.http.AbstractHTTPDestination - Create a new message for processing 22:01:05.049 [qtp938857350-21] DEBUG o.apache.cxf.transport.http.Headers - Request Headers: {Cache-Control=[no-cache], connection=[Upgrade], content-type=[application/json], Cookie=[JSESSIONID=02270813-7ad9-456b-becc-9ef103db4960; rememberMe=x1oyQd8NdPcmEcKhMDjFzvpkIO54DTPzRg+URGhmT8XnPoQOlwoS12XWHkZzSBUmF4dNnmnLX3vOo3hDEKXgv3PO2VfML+k/Mi3gjH9fmDrucND/hWbtJLmPOpNVox5KToY1aQt4dbS5mkWJsWF41L4w7SHWcg9jP6nhJbWufAvD66tSMlKXRfxEKEAVCyhf39s96jXiDLzkvGNmQrms1nzlPIKs1mH2wpmPSjyXbLogcpsEyTSbMaT9LRd+MplE8q+m4RegkBxiph09rfnAvt/HAjBW1VwTdngFojW4rJZQEzOoCpSmsF2O6V6HXue9/kMW3a/WI4GMNRHsAUTBSC++m4EV1t4CKWmHXiRmOBbQJvaOZIGMlGOIX5/GH1+T1B8AiFRnYWvnM+PdTnEz5nfMH+E+3u1gCOykqLfGJkv/tb4JzPKwTGUtZ2nw/alqgjk/APr30fDbDDECfj3LuK4/5z2EzBMx1ypl54FEfFlFKCtkE8l7pwFUao8+c5Agj4TpAkmP4J3Twoaw+oEyF+8rGxCAUb+qN8mSuptgnvkySS+xsVzkSvCqtYWlqALm], Host=[localhost:8080], Origin=[http://localhost:8080], Pragma=[no-cache], Sec-WebSocket-Extensions=[x-webkit-deflate-frame], Sec-WebSocket-Key=[k94YBXHpZW/PaMkWmKATpw==], Sec-WebSocket-Version=[13], Upgrade=[websocket], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36], X-atmo-protocol=[true], X-Atmosphere-Framework=[2.0.0-jquery], X-Atmosphere-tracking-id=[], X-Atmosphere-TrackMessageSize=[true], X-Atmosphere-Transport=[websocket], X-Cache-Date=[88]} 22:01:05.050 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 to phase pre-stream 22:01:05.050 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@26cd2192 was created. Current flow: pre-stream [CertConstraintsInterceptor] unmarshal [JAXRSInInterceptor] pre-logical [OneWayProcessorInterceptor] invoke [ServiceInvokerInterceptor] post-invoke [OutgoingChainInterceptor] 22:01:05.050 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 22:01:05.050 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@22e85825 22:01:05.050 [qtp938857350-21] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource class, request path : / 22:01:05.051 [qtp938857350-21] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource operation on the resource class org.atmosphere.samples.chat.cxf.ChatResource 22:01:05.051 [qtp938857350-21] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend may get selected 22:01:05.051 [qtp938857350-21] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - No method match, method name : broadcast, request path : /, method @Path : /, HTTP Method : GET, method HTTP Method : POST, ContentType : */*, method @Consumes : */*,, Accept : */*,, method @Produces : application/json,. 22:01:05.051 [qtp938857350-21] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend on the resource class org.atmosphere.samples.chat.cxf.ChatResource has been selected 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request path is: / 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request HTTP method is: GET 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request contentType is: application/json 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.j.i.JAXRSInInterceptor - Accept contentType is: */* 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.j.i.JAXRSInInterceptor - Found operation: suspend 22:01:05.052 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@67de0c09 22:01:05.052 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@127e5130 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.s.invoker.AbstractInvoker - Invoking method public java.lang.String org.atmosphere.samples.chat.cxf.ChatResource.suspend() on object org.atmosphere.samples.chat.cxf.ChatResource@c45aa2c with params []. 22:01:05.052 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OutgoingChainInterceptor@23042fcc 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by bus: [] 22:01:05.052 [qtp938857350-21] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by service: [] 22:01:05.053 [qtp938857350-21] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by endpoint: [org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7] 22:01:05.053 [qtp938857350-21] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by binding: [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984] 22:01:05.053 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@6405ce40 was created. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] 22:01:05.053 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7 22:01:05.053 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf to phase prepare-send-ending 22:01:05.053 [qtp938857350-20] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <> type 22:01:05.053 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@6405ce40 was modified. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] prepare-send-ending [MessageSenderEndingInterceptor] 22:01:05.053 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984 22:01:05.053 [qtp938857350-20] DEBUG o.a.c.t.servlet.ServletController - Service http request on thread: Thread[qtp938857350-20,5,main] 22:01:05.053 [qtp938857350-20] DEBUG o.a.c.t.http.AbstractHTTPDestination - Create a new message for processing 22:01:05.054 [qtp938857350-21] DEBUG o.a.c.j.i.JAXRSOutInterceptor - Response content type is: application/octet-stream 22:01:05.054 [qtp938857350-20] DEBUG o.apache.cxf.transport.http.Headers - Request Headers: {Cache-Control=[no-cache], connection=[Upgrade], content-type=[application/json], Cookie=[JSESSIONID=02270813-7ad9-456b-becc-9ef103db4960; rememberMe=x1oyQd8NdPcmEcKhMDjFzvpkIO54DTPzRg+URGhmT8XnPoQOlwoS12XWHkZzSBUmF4dNnmnLX3vOo3hDEKXgv3PO2VfML+k/Mi3gjH9fmDrucND/hWbtJLmPOpNVox5KToY1aQt4dbS5mkWJsWF41L4w7SHWcg9jP6nhJbWufAvD66tSMlKXRfxEKEAVCyhf39s96jXiDLzkvGNmQrms1nzlPIKs1mH2wpmPSjyXbLogcpsEyTSbMaT9LRd+MplE8q+m4RegkBxiph09rfnAvt/HAjBW1VwTdngFojW4rJZQEzOoCpSmsF2O6V6HXue9/kMW3a/WI4GMNRHsAUTBSC++m4EV1t4CKWmHXiRmOBbQJvaOZIGMlGOIX5/GH1+T1B8AiFRnYWvnM+PdTnEz5nfMH+E+3u1gCOykqLfGJkv/tb4JzPKwTGUtZ2nw/alqgjk/APr30fDbDDECfj3LuK4/5z2EzBMx1ypl54FEfFlFKCtkE8l7pwFUao8+c5Agj4TpAkmP4J3Twoaw+oEyF+8rGxCAUb+qN8mSuptgnvkySS+xsVzkSvCqtYWlqALm], Host=[localhost:8080], Origin=[http://localhost:8080], Pragma=[no-cache], Sec-WebSocket-Extensions=[x-webkit-deflate-frame], Sec-WebSocket-Key=[/XbdHPM5/8zXOjrbOfsUAw==], Sec-WebSocket-Version=[13], Upgrade=[websocket], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36], X-atmo-protocol=[true], X-Atmosphere-Framework=[2.0.0-jquery], X-Atmosphere-tracking-id=[], X-Atmosphere-TrackMessageSize=[true], X-Atmosphere-Transport=[websocket], X-Cache-Date=[96]} 22:01:05.054 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 to phase pre-stream 22:01:05.054 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@3927ff0d was created. Current flow: pre-stream [CertConstraintsInterceptor] unmarshal [JAXRSInInterceptor] pre-logical [OneWayProcessorInterceptor] invoke [ServiceInvokerInterceptor] post-invoke [OutgoingChainInterceptor] 22:01:05.054 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 22:01:05.054 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@22e85825 22:01:05.055 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource class, request path : / 22:01:05.055 [qtp938857350-21] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf 22:01:05.055 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource operation on the resource class org.atmosphere.samples.chat.cxf.ChatResource 22:01:05.055 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend may get selected 22:01:05.056 [qtp938857350-21] DEBUG o.a.c.t.servlet.ServletController - Finished servicing http request on thread: Thread[qtp938857350-21,5,main] 22:01:05.056 [qtp938857350-21] WARN o.a.w.DefaultWebSocketProcessor - AtmosphereResource was null 22:01:05.056 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - No method match, method name : broadcast, request path : /, method @Path : /, HTTP Method : GET, method HTTP Method : POST, ContentType : */*, method @Consumes : */*,, Accept : */*,, method @Produces : application/json,. 22:01:05.056 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend on the resource class org.atmosphere.samples.chat.cxf.ChatResource has been selected 2013-12-23 22:01:05.056:WARN:oeji.nio:java.io.IOException: Broken pipe22:01:05.056 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request path is: / 22:01:05.056 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request HTTP method is: GET 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request contentType is: application/json 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Accept contentType is: */* 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Found operation: suspend 22:01:05.057 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@67de0c09 22:01:05.057 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@127e5130 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.s.invoker.AbstractInvoker - Invoking method public java.lang.String org.atmosphere.samples.chat.cxf.ChatResource.suspend() on object org.atmosphere.samples.chat.cxf.ChatResource@c45aa2c with params []. 22:01:05.057 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OutgoingChainInterceptor@23042fcc 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by bus: [] 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by service: [] 22:01:05.057 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by endpoint: [org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7] 22:01:05.058 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by binding: [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984] 22:01:05.058 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@7bf52460 was created. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] 22:01:05.058 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7 22:01:05.058 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf to phase prepare-send-ending 22:01:05.058 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@7bf52460 was modified. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] prepare-send-ending [MessageSenderEndingInterceptor] 22:01:05.058 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984 22:01:05.059 [qtp938857350-22] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <> type 22:01:05.059 [qtp938857350-22] DEBUG o.a.c.t.servlet.ServletController - Service http request on thread: Thread[qtp938857350-22,5,main] 22:01:05.059 [qtp938857350-22] DEBUG o.a.c.t.http.AbstractHTTPDestination - Create a new message for processing 22:01:05.059 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSOutInterceptor - Response content type is: application/octet-stream 22:01:05.060 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf 22:01:05.060 [qtp938857350-22] DEBUG o.apache.cxf.transport.http.Headers - Request Headers: {Cache-Control=[no-cache], connection=[Upgrade], content-type=[application/json], Cookie=[JSESSIONID=02270813-7ad9-456b-becc-9ef103db4960; rememberMe=x1oyQd8NdPcmEcKhMDjFzvpkIO54DTPzRg+URGhmT8XnPoQOlwoS12XWHkZzSBUmF4dNnmnLX3vOo3hDEKXgv3PO2VfML+k/Mi3gjH9fmDrucND/hWbtJLmPOpNVox5KToY1aQt4dbS5mkWJsWF41L4w7SHWcg9jP6nhJbWufAvD66tSMlKXRfxEKEAVCyhf39s96jXiDLzkvGNmQrms1nzlPIKs1mH2wpmPSjyXbLogcpsEyTSbMaT9LRd+MplE8q+m4RegkBxiph09rfnAvt/HAjBW1VwTdngFojW4rJZQEzOoCpSmsF2O6V6HXue9/kMW3a/WI4GMNRHsAUTBSC++m4EV1t4CKWmHXiRmOBbQJvaOZIGMlGOIX5/GH1+T1B8AiFRnYWvnM+PdTnEz5nfMH+E+3u1gCOykqLfGJkv/tb4JzPKwTGUtZ2nw/alqgjk/APr30fDbDDECfj3LuK4/5z2EzBMx1ypl54FEfFlFKCtkE8l7pwFUao8+c5Agj4TpAkmP4J3Twoaw+oEyF+8rGxCAUb+qN8mSuptgnvkySS+xsVzkSvCqtYWlqALm], Host=[localhost:8080], Origin=[http://localhost:8080], Pragma=[no-cache], Sec-WebSocket-Extensions=[x-webkit-deflate-frame], Sec-WebSocket-Key=[PzeMB9dQeTQlUHNn3WL4Nw==], Sec-WebSocket-Version=[13], Upgrade=[websocket], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36], X-atmo-protocol=[true], X-Atmosphere-Framework=[2.0.0-jquery], X-Atmosphere-tracking-id=[], X-Atmosphere-TrackMessageSize=[true], X-Atmosphere-Transport=[websocket], X-Cache-Date=[101]} 22:01:05.060 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 to phase pre-stream 22:01:05.061 [qtp938857350-20] DEBUG o.a.c.t.servlet.ServletController - Finished servicing http request on thread: Thread[qtp938857350-20,5,main] 22:01:05.061 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@3987f9f1 was created. Current flow: pre-stream [CertConstraintsInterceptor] unmarshal [JAXRSInInterceptor] pre-logical [OneWayProcessorInterceptor] invoke [ServiceInvokerInterceptor] post-invoke [OutgoingChainInterceptor] 22:01:05.061 [qtp938857350-20] WARN o.a.w.DefaultWebSocketProcessor - AtmosphereResource was null 22:01:05.061 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 22:01:05.061 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@22e85825 2013-12-23 22:01:05.061:WARN:oeji.nio:java.io.IOException: Broken pipe 22:01:05.061 [qtp938857350-22] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource class, request path : / 22:01:05.061 [qtp938857350-22] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource operation on the resource class org.atmosphere.samples.chat.cxf.ChatResource 22:01:05.062 [qtp938857350-22] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend may get selected 22:01:05.062 [qtp938857350-22] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - No method match, method name : broadcast, request path : /, method @Path : /, HTTP Method : GET, method HTTP Method : POST, ContentType : */*, method @Consumes : */*,, Accept : */*,, method @Produces : application/json,. 22:01:05.062 [qtp938857350-22] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend on the resource class org.atmosphere.samples.chat.cxf.ChatResource has been selected 22:01:05.062 [qtp938857350-22] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request path is: / 22:01:05.062 [qtp938857350-22] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request HTTP method is: GET 22:01:05.062 [qtp938857350-22] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request contentType is: application/json 22:01:05.062 [qtp938857350-22] DEBUG o.a.c.j.i.JAXRSInInterceptor - Accept contentType is: */* 22:01:05.062 [qtp938857350-22] DEBUG o.a.c.j.i.JAXRSInInterceptor - Found operation: suspend 22:01:05.063 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@67de0c09 22:01:05.063 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@127e5130 22:01:05.063 [qtp938857350-23] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <> type 22:01:05.063 [qtp938857350-22] DEBUG o.a.c.s.invoker.AbstractInvoker - Invoking method public java.lang.String org.atmosphere.samples.chat.cxf.ChatResource.suspend() on object org.atmosphere.samples.chat.cxf.ChatResource@c45aa2c with params []. 22:01:05.063 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OutgoingChainInterceptor@23042fcc 22:01:05.063 [qtp938857350-22] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by bus: [] 22:01:05.063 [qtp938857350-22] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by service: [] 22:01:05.063 [qtp938857350-23] DEBUG o.a.c.t.servlet.ServletController - Service http request on thread: Thread[qtp938857350-23,5,main] 22:01:05.063 [qtp938857350-22] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by endpoint: [org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7] 22:01:05.063 [qtp938857350-23] DEBUG o.a.c.t.http.AbstractHTTPDestination - Create a new message for processing 22:01:05.063 [qtp938857350-22] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by binding: [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984] 22:01:05.064 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@1c87093 was created. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] 22:01:05.064 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7 22:01:05.065 [qtp938857350-23] DEBUG o.apache.cxf.transport.http.Headers - Request Headers: {Cache-Control=[no-cache], connection=[Upgrade], content-type=[application/json], Cookie=[JSESSIONID=02270813-7ad9-456b-becc-9ef103db4960; rememberMe=x1oyQd8NdPcmEcKhMDjFzvpkIO54DTPzRg+URGhmT8XnPoQOlwoS12XWHkZzSBUmF4dNnmnLX3vOo3hDEKXgv3PO2VfML+k/Mi3gjH9fmDrucND/hWbtJLmPOpNVox5KToY1aQt4dbS5mkWJsWF41L4w7SHWcg9jP6nhJbWufAvD66tSMlKXRfxEKEAVCyhf39s96jXiDLzkvGNmQrms1nzlPIKs1mH2wpmPSjyXbLogcpsEyTSbMaT9LRd+MplE8q+m4RegkBxiph09rfnAvt/HAjBW1VwTdngFojW4rJZQEzOoCpSmsF2O6V6HXue9/kMW3a/WI4GMNRHsAUTBSC++m4EV1t4CKWmHXiRmOBbQJvaOZIGMlGOIX5/GH1+T1B8AiFRnYWvnM+PdTnEz5nfMH+E+3u1gCOykqLfGJkv/tb4JzPKwTGUtZ2nw/alqgjk/APr30fDbDDECfj3LuK4/5z2EzBMx1ypl54FEfFlFKCtkE8l7pwFUao8+c5Agj4TpAkmP4J3Twoaw+oEyF+8rGxCAUb+qN8mSuptgnvkySS+xsVzkSvCqtYWlqALm], Host=[localhost:8080], Origin=[http://localhost:8080], Pragma=[no-cache], Sec-WebSocket-Extensions=[x-webkit-deflate-frame], Sec-WebSocket-Key=[NPEMoX/35gAxm9fgjvoqdA==], Sec-WebSocket-Version=[13], Upgrade=[websocket], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36], X-atmo-protocol=[true], X-Atmosphere-Framework=[2.0.0-jquery], X-Atmosphere-tracking-id=[], X-Atmosphere-TrackMessageSize=[true], X-Atmosphere-Transport=[websocket], X-Cache-Date=[106]} 22:01:05.065 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf to phase prepare-send-ending 22:01:05.065 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 to phase pre-stream 22:01:05.065 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@1c87093 was modified. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] prepare-send-ending [MessageSenderEndingInterceptor] 22:01:05.065 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984 22:01:05.065 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@6789b939 was created. Current flow: pre-stream [CertConstraintsInterceptor] unmarshal [JAXRSInInterceptor] pre-logical [OneWayProcessorInterceptor] invoke [ServiceInvokerInterceptor] post-invoke [OutgoingChainInterceptor] 22:01:05.065 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 22:01:05.065 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@22e85825 22:01:05.065 [qtp938857350-23] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource class, request path : / 22:01:05.065 [qtp938857350-23] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource operation on the resource class org.atmosphere.samples.chat.cxf.ChatResource 22:01:05.066 [qtp938857350-23] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend may get selected 22:01:05.066 [qtp938857350-22] DEBUG o.a.c.j.i.JAXRSOutInterceptor - Response content type is: application/octet-stream 22:01:05.066 [qtp938857350-23] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - No method match, method name : broadcast, request path : /, method @Path : /, HTTP Method : GET, method HTTP Method : POST, ContentType : */*, method @Consumes : */*,, Accept : */*,, method @Produces : application/json,. 22:01:05.066 [qtp938857350-23] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend on the resource class org.atmosphere.samples.chat.cxf.ChatResource has been selected 22:01:05.066 [qtp938857350-23] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request path is: / 22:01:05.066 [qtp938857350-23] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request HTTP method is: GET 22:01:05.066 [qtp938857350-23] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request contentType is: application/json 22:01:05.066 [qtp938857350-22] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf 22:01:05.066 [qtp938857350-23] DEBUG o.a.c.j.i.JAXRSInInterceptor - Accept contentType is: */* 22:01:05.066 [qtp938857350-23] DEBUG o.a.c.j.i.JAXRSInInterceptor - Found operation: suspend 22:01:05.067 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@67de0c09 22:01:05.067 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@127e5130 22:01:05.067 [qtp938857350-22] DEBUG o.a.c.t.servlet.ServletController - Finished servicing http request on thread: Thread[qtp938857350-22,5,main] 22:01:05.067 [qtp938857350-23] DEBUG o.a.c.s.invoker.AbstractInvoker - Invoking method public java.lang.String org.atmosphere.samples.chat.cxf.ChatResource.suspend() on object org.atmosphere.samples.chat.cxf.ChatResource@c45aa2c with params []. 22:01:05.067 [qtp938857350-22] WARN o.a.w.DefaultWebSocketProcessor - AtmosphereResource was null 22:01:05.067 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OutgoingChainInterceptor@23042fcc 22:01:05.067 [qtp938857350-23] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by bus: [] 2013-12-23 22:01:05.067:WARN:oeji.nio:java.io.IOException: Broken pipe22:01:05.067 [qtp938857350-23] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by service: [] 22:01:05.069 [qtp938857350-23] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by endpoint: [org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7] 22:01:05.069 [qtp938857350-23] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by binding: [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984] 22:01:05.069 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@39edd9b3 was created. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] 22:01:05.069 [qtp938857350-20] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <> type 22:01:05.069 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7 22:01:05.069 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf to phase prepare-send-ending 22:01:05.070 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@39edd9b3 was modified. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] prepare-send-ending [MessageSenderEndingInterceptor] 22:01:05.070 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984 22:01:05.070 [qtp938857350-20] DEBUG o.a.c.t.servlet.ServletController - Service http request on thread: Thread[qtp938857350-20,5,main] 22:01:05.070 [qtp938857350-20] DEBUG o.a.c.t.http.AbstractHTTPDestination - Create a new message for processing 22:01:05.070 [qtp938857350-20] DEBUG o.apache.cxf.transport.http.Headers - Request Headers: {Cache-Control=[no-cache], connection=[Upgrade], content-type=[application/json], Cookie=[JSESSIONID=02270813-7ad9-456b-becc-9ef103db4960; rememberMe=x1oyQd8NdPcmEcKhMDjFzvpkIO54DTPzRg+URGhmT8XnPoQOlwoS12XWHkZzSBUmF4dNnmnLX3vOo3hDEKXgv3PO2VfML+k/Mi3gjH9fmDrucND/hWbtJLmPOpNVox5KToY1aQt4dbS5mkWJsWF41L4w7SHWcg9jP6nhJbWufAvD66tSMlKXRfxEKEAVCyhf39s96jXiDLzkvGNmQrms1nzlPIKs1mH2wpmPSjyXbLogcpsEyTSbMaT9LRd+MplE8q+m4RegkBxiph09rfnAvt/HAjBW1VwTdngFojW4rJZQEzOoCpSmsF2O6V6HXue9/kMW3a/WI4GMNRHsAUTBSC++m4EV1t4CKWmHXiRmOBbQJvaOZIGMlGOIX5/GH1+T1B8AiFRnYWvnM+PdTnEz5nfMH+E+3u1gCOykqLfGJkv/tb4JzPKwTGUtZ2nw/alqgjk/APr30fDbDDECfj3LuK4/5z2EzBMx1ypl54FEfFlFKCtkE8l7pwFUao8+c5Agj4TpAkmP4J3Twoaw+oEyF+8rGxCAUb+qN8mSuptgnvkySS+xsVzkSvCqtYWlqALm], Host=[localhost:8080], Origin=[http://localhost:8080], Pragma=[no-cache], Sec-WebSocket-Extensions=[x-webkit-deflate-frame], Sec-WebSocket-Key=[SpJtINRdjXEgCXIX9qhr+g==], Sec-WebSocket-Version=[13], Upgrade=[websocket], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36], X-atmo-protocol=[true], X-Atmosphere-Framework=[2.0.0-jquery], X-Atmosphere-tracking-id=[], X-Atmosphere-TrackMessageSize=[true], X-Atmosphere-Transport=[websocket], X-Cache-Date=[110]} 22:01:05.071 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 to phase pre-stream 22:01:05.071 [qtp938857350-23] DEBUG o.a.c.j.i.JAXRSOutInterceptor - Response content type is: application/octet-stream 22:01:05.071 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@2e6f947b was created. Current flow: pre-stream [CertConstraintsInterceptor] unmarshal [JAXRSInInterceptor] pre-logical [OneWayProcessorInterceptor] invoke [ServiceInvokerInterceptor] post-invoke [OutgoingChainInterceptor] 22:01:05.071 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@438d460 22:01:05.071 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@22e85825 22:01:05.071 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource class, request path : / 22:01:05.071 [qtp938857350-23] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf 22:01:05.071 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Trying to select a resource operation on the resource class org.atmosphere.samples.chat.cxf.ChatResource 22:01:05.071 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend may get selected 22:01:05.072 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - No method match, method name : broadcast, request path : /, method @Path : /, HTTP Method : GET, method HTTP Method : POST, ContentType : */*, method @Consumes : */*,, Accept : */*,, method @Produces : application/json,. 22:01:05.072 [qtp938857350-23] DEBUG o.a.c.t.servlet.ServletController - Finished servicing http request on thread: Thread[qtp938857350-23,5,main] 22:01:05.072 [qtp938857350-20] DEBUG o.apache.cxf.jaxrs.utils.JAXRSUtils - Resource operation suspend on the resource class org.atmosphere.samples.chat.cxf.ChatResource has been selected 22:01:05.072 [qtp938857350-23] WARN o.a.w.DefaultWebSocketProcessor - AtmosphereResource was null 22:01:05.072 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request path is: / 22:01:05.072 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request HTTP method is: GET 22:01:05.072 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Request contentType is: application/json 22:01:05.072 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Accept contentType is: */* 22:01:05.072 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSInInterceptor - Found operation: suspend 2013-12-23 22:01:05.072:WARN:oeji.nio:java.io.IOException: Broken pipe 22:01:05.072 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@67de0c09 22:01:05.072 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@127e5130 22:01:05.072 [qtp938857350-20] DEBUG o.a.c.s.invoker.AbstractInvoker - Invoking method public java.lang.String org.atmosphere.samples.chat.cxf.ChatResource.suspend() on object org.atmosphere.samples.chat.cxf.ChatResource@c45aa2c with params []. 22:01:05.072 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.OutgoingChainInterceptor@23042fcc 22:01:05.073 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by bus: [] 22:01:05.073 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by service: [] 22:01:05.073 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by endpoint: [org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7] 22:01:05.073 [qtp938857350-20] DEBUG o.a.c.i.OutgoingChainInterceptor - Interceptors contributed by binding: [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984] 22:01:05.073 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@815a3a1 was created. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] 22:01:05.073 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@390e4fd7 22:01:05.073 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf to phase prepare-send-ending 22:01:05.073 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@815a3a1 was modified. Current flow: prepare-send [MessageSenderInterceptor] marshal [JAXRSOutInterceptor] prepare-send-ending [MessageSenderEndingInterceptor] 22:01:05.073 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor@5a9bc984 22:01:05.074 [qtp938857350-20] DEBUG o.a.c.j.i.JAXRSOutInterceptor - Response content type is: application/octet-stream 22:01:05.076 [qtp938857350-20] DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@36e3ffdf 22:01:05.077 [qtp938857350-20] DEBUG o.a.c.t.servlet.ServletController - Finished servicing http request on thread: Thread[qtp938857350-20,5,main] 22:01:05.077 [qtp938857350-20] WARN o.a.w.DefaultWebSocketProcessor - AtmosphereResource was null 2013-12-23 22:01:05.078:WARN:oeji.nio:java.io.IOException: Broken pipe
Hello!
Could you please add a sample that will illustrate the runtime (CDI) injection?
As could be seen from Injecting Atmosphere components and factories using the javax.inject.Inject the InjectIntrospector
might be usefull for this, is this correct?
download zip from front of git hub. then
cd samples/embedded-jetty-websocket-chat
mvn jetty:run
the server fails to start with:
[INFO] Webapp directory = /Users/simbo/projects/thinbus/atmosphere-samples-master/samples/embedded-jetty-websocket-chat/src/main/webapp
[INFO] jetty-9.2.11.v20150529
[WARNING] FATAL@null line:1 col:1 : org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@3e1624c7{/,[file:/Users/simbo/projects/thinbus/atmosphere-samples-master/samples/embedded-jetty-websocket-chat/src/main/webapp/, file:/Users/simbo/projects/thinbus/atmosphere-samples-master/samples/embedded-jetty-websocket-chat/target/tmp/jquery-2_2_11_war1/],null}{file:/Users/simbo/projects/thinbus/atmosphere-samples-master/samples/embedded-jetty-websocket-chat/src/main/webapp/}
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
I am running
Pro:embedded-jetty-websocket-chat simbo$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Pro:embedded-jetty-websocket-chat simbo$ mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T12:57:37+01:00)
Maven home: /usr/local/Cellar/maven333
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11", arch: "x86_64", family: "mac"
Pro:embedded-jetty-websocket-chat simbo$
switching from atmosphere-client to atmosphere.js npm package.
I use gwt20 manage rpc and i want set the transport is websocket and fallbackTransport is long-polling, i run it on Firefox/24.0 and Chrome/34.0, My problem is that both of them have error, only i can user transport is long-polling.
the log as follows:
[ERROR] 501 - GET /ichangtougame/atmosphere/gameshostersevice/?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.0.3-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&Content-Type=text/x-gwt-rpc;%20charset=UTF-8&X-atmo-protocol=true (127.0.0.1)
Request headers
Upgrade: websocket
Connection: Upgrade
Host: 127.0.0.1:8888
Origin: http://127.0.0.1:8888
Pragma: no-cache
Cache-Control: no-cache
Sec-WebSocket-Key: IUUoEk9jEBpvNWsgVCsPgw==
Sec-WebSocket-Version: 13
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits, x-webkit-deflate-frame
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36
Response headers
X-Atmosphere-tracking-id: 95cfc5b0-1984-448d-a6e4-2f97fe371d40
X-Atmosphere-error: Websocket protocol not supported
It seem that Websocket protocol not supported, whether i need configure something?
can anyone help me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.