users@glassfish.java.net

Re: Error while running sample websocket project

From: Arun Gupta <arun.p.gupta_at_oracle.com>
Date: Fri, 18 Jan 2013 06:02:50 -0800

Hi Neil,

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

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

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_at_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