JBOSS发布工程报错

jboss启动时候报错

09:37:25,488 INFO  [TomcatDeployer] deploy, ctxPath=/eservice, warUrl=file:/C:/J
ava/1/jboss-4.0.2/server/default/deploy/eservice.ear/eservice.war/
com.taifook.framework.application.service.ServiceLocatorException: Exception thr
own from getService method of ServiceLocator class of given status : local/ExchangeRate
        at com.taifook.framework.application.service.ServiceLocator.getNewServic
e(ServiceLocator.java:171)
        at com.taifook.framework.application.service.ServiceLocator.getService(S
erviceLocator.java:147)
        at com.taifook.framework.application.service.BizServiceLocator.lookupLoc

 

local/ExchangeRate是配置的一个jndi名称

 

查找出原因 原来是..\jboss-4.0.2\server\default\conf下的jboss-service.xml下的端口占用了

<mbean code="org.jboss.naming.NamingService"
      name="jboss:service=Naming"
      xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
      <!-- The call by value mode. true if all lookups are unmarshalled using
      the caller's TCL, false if in VM lookups return the value by reference.
      -->
      <attribute name="CallByValue">false</attribute>
      <!-- The listening port for the bootstrap JNP service. Set this to -1
        to run the NamingService without the JNP invoker listening port.
      -->
      <attribute name="Port">1099</attribute>
      <!-- The bootstrap JNP server bind address. This also sets the default
      RMI service bind address. Empty == all addresses
       -->
      <attribute name="BindAddress">${jboss.bind.address}</attribute>
      <!-- The port of the RMI naming service, 0 == anonymous -->
      <attribute name="RmiPort">1098</attribute>
      <!-- The RMI service bind address. Empty == all addresses
       -->
      <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
      <!-- The thread pool service used to control the bootstrap lookups -->
      <depends optional-attribute-name="LookupPool"
         proxy-type="attribute">jboss.system:service=ThreadPool</depends>
   </mbean>

解决方法

第一:cmd 进入命令行  netstat -ano 列出所有正在运行程序的端口及PID查看1099对应的PID

第二:任务管理器上 查看--》选择项 把PID这项勾上 就可以看到PID对应的程序了,把上部pid对应的程序结束掉。

第三:再次启动jboss就可以成功启动了。

 

我的1099端口是被msn占用了 msn是随机占用的这个端口,关了再开发现占用的端口是1111。

这个问题弄快两天,哎,终于解决了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值