Skip to main content

Error while running sample websocket project

6 replies [Last post]
neilghosh
Offline
Joined: 2010-04-05
Points: 0

Hi All,

I was trying the sample code given at
https://blogs.oracle.com/arungupta/resource/totd189-whiteboard.zip
Linked from
https://blogs.oracle.com/arungupta/entry/collaborative_whiteboard_using_...

I imported this project in netbeans 7.2 and updated the POM but got the
attached error log in the glassfish server log while running the project.
Screenshot of the UI attached.

--
Thanks and Regards
Neil
http://neilghosh.com

AttachmentSize
Whiteboard_error.png36.7 KB
whiteboard_error_log.txt49.82 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jitu
Offline
Joined: 2003-06-14
Points: 0

That error wouldn't effect your app. There will be new integration of tyrus in couple of days, afterwards try it. However, some changes may require for the code posted in the blog as API might have changed since then.

neilghosh
Offline
Joined: 2010-04-05
Points: 0

Dear All,

Please review this error log.

http://www.java.net/forum/topic/glassfish/glassfish/error-while-running-...

--
Thanks and Regards
Neil
http://neilghosh.com

neilghosh
Offline
Joined: 2010-04-05
Points: 0

You are right, I had to upgrade the code to make it work.
I am still curious why this exception occurs in glassfish log everytime I run the project

SEVERE: WebModule[/whiteboard]Exception sending context destroyed event to listener instance of class org.glassfish.tyrus.oldservlet.WebSocketServerWebIntegration
java.lang.NullPointerException
at org.glassfish.tyrus.oldservlet.WebSocketServerWebIntegration.contextDestroyed(WebSocketServerWebIntegration.java:186)
at org.apache.catalina.core.StandardContext.contextListenerStop(StandardContext.java:5405)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:6069)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:725)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1172)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2457)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2412)
at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:191)
at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:161)
at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:306)
at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:324)
at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:1056)
at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1096)
at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:400)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:529)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:525)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:357)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:524)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:548)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1425)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1400(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1746)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1676)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:273)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:818)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:562)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:542)
at java.lang.Thread.run(Thread.java:722)

arungupta
Offline
Joined: 2003-06-13
Points: 0

Hi Neil,

As discussed on IM, the correct location of the code is at:

https://blogs.oracle.com/arungupta/resource/totd189-whiteboard-glassfish...

Please make sure you clean and build the project. I've tested this on
build 70 and this exception should not occur.

Arun

On 1/17/13 10:21 PM, forums@java.net wrote:
> You are right, I had to upgrade the code to make it work. I am still
> curious
> why this exception occurs in glassfish log everytime I run the project
> SEVERE: WebModule[/whiteboard]Exception sending context destroyed
> event to
> listener instance of class
> org.glassfish.tyrus.oldservlet.WebSocketServerWebIntegration
> java.lang.NullPointerException at
> org.glassfish.tyrus.oldservlet.WebSocketServerWebIntegration.contextDestroyed(WebSocketServerWebIntegration.java:186)
>
> at
> org.apache.catalina.core.StandardContext.contextListenerStop(StandardContext.java:5405)
>
> at
> org.apache.catalina.core.StandardContext.stop(StandardContext.java:6069)
> at com.sun.enterprise.web.WebModule.stop(WebModule.java:725) at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1172)
>
> at
> com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2457)
>
> at
> com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2412)
>
> at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:191) at
> org.glassfish.internal.data.EngineRef.stop(EngineRef.java:161) at
> org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:306) at
> org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:324)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:1056)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1096)
>
> at
> org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:400)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:529)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:525)
>
> at java.security.AccessController.doPrivileged(Native Method) at
> javax.security.auth.Subject.doAs(Subject.java:357) at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:524)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:548)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1425)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1400(CommandRunnerImpl.java:109)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1746)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1676)
>
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
>
> at
> org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
>
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113)
>
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236)
>
> at
> org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
>
> at
> org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175)
>
> at
> org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:273)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
>
> at
> org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at
> org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:818)
>
> at
> org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
>
> at
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
>
> at
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
>
> at
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
>
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:562)
>
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:542)
>
> at java.lang.Thread.run(Thread.java:722)
>
> --
>
> [Message sent by forum member 'neilghosh']
>
> View Post: http://forums.java.net/node/893926
>
>

--
http://twitter.com/arungupta
http://blogs.oracle.com/arungupta

pavel_bucek
Offline
Joined: 2008-10-24
Points: 0

please don't mind that.

org.glassfish.tyrus.oldservlet.WebSocketServerWebIntegration won't be present in glassfish after next tyrus integration.

neilghosh
Offline
Joined: 2010-04-05
Points: 0