为了账号安全,请及时绑定邮箱和手机立即绑定

运行androidpn的tomcat服务器版本时的错误,

错误内容:

{INFO } [2016-04-14 18:39:53,653] <org.hibernate.impl.SessionFactoryImpl> : closing

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ioAcceptor' defined in class path resource [spring-config.xml]: Invocation of init method failed; nested exception is java.net.BindException: Address already in use: bind


at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)

at org.androidpn.server.xmpp.XmppServer.start(XmppServer.java:86)

at org.androidpn.server.xmpp.XmppServer.<init>(XmppServer.java:71)

at org.androidpn.server.xmpp.XmppServer.getInstance(XmppServer.java:57)

at org.androidpn.server.xmpp.session.SessionManager.<init>(SessionManager.java:59)

at org.androidpn.server.xmpp.session.SessionManager.getInstance(SessionManager.java:70)

at org.androidpn.server.xmpp.push.NotificationManager.<init>(NotificationManager.java:48)

at org.androidpn.server.console.api.NotificationApiController.<init>(NotificationApiController.java:25)

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)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)

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)

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:158)

at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1282)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1195)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1085)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5318)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5610)

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(Executors.java:441)


at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:619)

Caused by: java.net.BindException: Address already in use: bind


正在回答

7 回答

我也是这种错误,解决的办法是打开进程管理器,吧Tomcat的进程关了,然后重新将部署,马上搞定

0 回复 有任何疑惑可以回复我~

你的开启的端口被占用,可能是你用startup开启tomcat没有shutdown直接叉掉了,然后又用Myeclipse开一遍就有可能出现这个问题,shutdown一下tomcat就好了,或者你的这个端口被其他程序占用,把其他程序结束掉,或者换过一个端口


0 回复 有任何疑惑可以回复我~

遇到了同样的问题

0 回复 有任何疑惑可以回复我~

我也遇到这个问题 请问是怎么解决的呢 无论怎么改都报错,我跟了下源码 发现 已经绑了 但是select()的时候又去绑

0 回复 有任何疑惑可以回复我~

我也遇到了同样的问题,现在考虑为tomcat被启动了两次,所以无论我怎么改端口都是报这个错误,不过还在找解决方法

0 回复 有任何疑惑可以回复我~

你的这个绑定的端口已经在使用了,你可以关闭正在使用这个端口的程序,或者是换另外一个端口

0 回复 有任何疑惑可以回复我~

创建一个bean 'ioAcceptor“出现错误,在类路径资源定义[spring-config.xml中]:init方法的调用失败;原因是java.net.BindException:地址已在使用:绑定

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
见证Android消息推送时刻
  • 参与学习       48192    人
  • 解答问题       203    个

本课程将一步步教你如何搭建出一个自己的Android推送平台

进入课程

运行androidpn的tomcat服务器版本时的错误,

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信