1.
javax.servlet.ServletException: Servlet.init()
for
servlet dispatcher threw exception
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1213
)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
808
)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
129
)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191
)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128
)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102
)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109
)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
286
)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
845
)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:
583
)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447
)
at java.lang.Thread.run(Thread.java:
662
)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'urlMapping'
defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'userController'
defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean
class
[org.androidpn.server.console.controller.UserController]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
480
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$
1
.run(AbstractAutowireCapableBeanFactory.java:
409
)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
380
)
at org.springframework.beans.factory.support.AbstractBeanFactory$
1
.getObject(AbstractBeanFactory.java:
264
)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
222
)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
261
)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
185
)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
164
)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
429
)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:
728
)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
380
)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:
402
)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:
316
)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:
282
)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:
126
)
at javax.servlet.GenericServlet.init(GenericServlet.java:
212
)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1172
)
...
11
more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'userController'
defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean
class
[org.androidpn.server.console.controller.UserController]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:
883
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:
839
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
440
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$
1
.run(AbstractAutowireCapableBeanFactory.java:
409
)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
380
)
at org.springframework.beans.factory.support.AbstractBeanFactory$
1
.getObject(AbstractBeanFactory.java:
264
)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
222
)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
261
)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
185
)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
164
)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:
880
)
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:
297
)
at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandlers(SimpleUrlHandlerMapping.java:
129
)
at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext(SimpleUrlHandlerMapping.java:
103
)
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:
119
)
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:
69
)
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:
73
)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:
70
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:
350
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:
1331
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
473
)
...
28
more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean
class
[org.androidpn.server.console.controller.UserController]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:
115
)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:
61
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:
877
)
...
49
more
Caused by: java.lang.NullPointerException
at org.androidpn.server.xmpp.XmppServer.getBean(XmppServer.java:
122
)
at org.androidpn.server.service.ServiceLocator.getUserService(ServiceLocator.java:
47
)
at org.androidpn.server.console.controller.UserController.(UserController.java:
42
)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39
)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27
)
at java.lang.reflect.Constructor.newInstance(Constructor.java:
513
)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:
100
)
...
51
more
解决方案:
netstat -anp|grep 5222
查看 5222是否被占用
如果被占用就会出现上面问题
先关掉 tomcat
/usr/local/tomcat/bin$ . shutdown.sh
然后 kill -9 pidXXX
杀掉占用5222的进程
上面问题就会解决。
查看 5222是否被占用
如果被占用就会出现上面问题
先关掉 tomcat
/usr/local/tomcat/bin$ . shutdown.sh
然后 kill -9 pidXXX
杀掉占用5222的进程
上面问题就会解决。
2.设备注册不上
androidpn.properties中的xmppHost的值写的不对.
3.页面打不开
jdbc.properties中的数据库配置不对.
https://github.com/msdx/androidpn/blob/master/README.md
相关推荐
### AndroidPN消息推送-Tomcat版详解 #### 一、概述 **AndroidPN消息推送-Tomcat版**是一种用于Android设备的消息推送系统,它利用XMPP协议实现了客户端与服务器之间的实时通讯。本系统分为客户端和服务端两大部分...
AndroidPN(Android Push Notification)是一个开源项目,旨在为Android应用程序提供简单、高效的后台推送通知服务。这个项目通常需要与服务器端的组件配合工作,其中Tomcat作为常用的Java应用服务器,常常被用于...
这与AndroidPN推送方案相比较,可能采用了类似的方式。在开发时需要注意这一点,确保推送消息的到达。 第三种推送方案是使用IQ插件形式来开发推送模块。这种方式的优点是模块耦合度低,符合Openfire的设计理念,...
描述中提到,开发者在尝试使用AndroidPN(Android Push Notification)但遇到了DNS配置问题,最终选择自建一个简化版本的消息推送服务,并采用了Struts2框架。Struts2是一个流行的Java Web框架,用于构建MVC(Model-...
8. **故障排查**:在部署和运行AndroidPN-tomcat时,可能会遇到各种问题,如网络连接问题、服务器配置错误或客户端兼容性问题。掌握基本的故障排查技巧非常重要。 9. **性能优化**:为了提供良好的用户体验,开发者...
Androidpn是一款开源的Android消息推送系统,它的核心功能是实现在服务器端与客户端之间的实时消息传递。理解Androidpn的源代码对于开发者来说,有助于掌握消息推送服务的工作原理,以及如何在自己的应用中实现类似...
AndroidPN,全称为Android Push Notification,是一个开源的Android平台上的推送通知服务,它允许服务器向设备发送消息,即使应用程序在后台或完全关闭时也是如此。在本文中,我们将深入探讨如何解决AndroidPN服务端...
"AndroidPN Tomcat版服务器+安卓客户端"是一个集成的解决方案,旨在为Android设备提供推送通知服务。这个项目可能源于开发者在尝试使用不同的源代码或教程时遇到的各种问题,所以他们进行了整合,创建了一个相对完整...
在Android系统中,从5.0(Lollipop)版本升级到7.0(Nougat)版本可能会遇到一系列的问题,特别是在实现推送服务方面。本文将深入探讨这些常见问题以及如何进行修复,主要关注XMPP(Extensible Messaging and ...