项目在nutz.web 启动没有问题,而在项目启动就出问题,问题出在我写的日志,报NULL指针,下面是tomcat日志
01-Apr-2019 10:15:25.415 信息 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Shiro environment
01-Apr-2019 10:15:26.430 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [startFilter]
java.lang.NullPointerException
at cn.wizzer.common.webservice.StartFilter.startWebsocketInstantMsg(StartFilter.java:44)
at cn.wizzer.common.webservice.StartFilter.init(StartFilter.java:36)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4615)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1852)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
01-Apr-2019 10:15:31.220 信息 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Cleaning up Shiro Environment
01-Apr-2019 10:15:31.495 信息 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
01-Apr-2019 10:15:31.495 信息 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
01-Apr-2019 10:15:31.496 信息 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@69914ad1')
日志指出的代码:
Web web = Mvcs.ctx().getDefaultIoc().get(WebImpl.class);
Endpoint.publish("http://192.168.43.6:9089/ws_server/weather", web);
大佬帮忙看一下,万分感谢!