eclipse中启动jboss超时解决方法

 

超时的原因主要是由于配置不一致造成的,检查下 eclipse中Jboss server的配置,位置在workspace\.metadata\.plugins\org.eclipse.wst.server.core下的server.xml

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<servers>
  <server hostname="localhost" id="JBoss v4.0 at localhost" name="JBoss v4.0 at localhost" runtime-id="JBoss v4.0" server-type="org.eclipse.jst.server.generic.jboss4" server-type-id="org.eclipse.jst.server.generic.jboss4" start-timeout="50" stop-timeout="15" timestamp="1">
    <map jndiPort="1099" key="generic_server_instance_properties" port="8080" serverAddress="127.0.0.1" serverConfig="default"/>
    <list key="modules" value0="order_query::org.eclipse.jst.j2ee.server:order_query::jst.web::2.4"/>
    <list key="Generic_Server_Modules_List" value0="org.eclipse.jst.j2ee.server:order_query"/>
  </server>
</servers>
 

确定这里的Jndi port 和port是否和jboss中的对应配置相同,如果不相同,就会导致虽然JBoss已经启动完成,然而eclipse不能查询到服务器的状态,所以在eclipse中服务器一直显示为starting状态,最后超时。

查看jboss中的配置

jbosspath\server\default\deploy\jbossweb-tomcat55.sar 中的server.xml 的

 

<Connector port="8080" address="${jboss.bind.address}"
         maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
         emptySessionPath="true"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="GBK" server="www.yeepay.com" />

确保这里的端口号为8080 

最后查看jndi的端口号,位置 jbosspath\server\default\conf中的 jboss-service.xml

 <!-- ==================================================================== -->

   <!-- JNDI                                                                 -->
   <!-- ==================================================================== -->

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

确保这里的1099和eclipse中的一致。

猜你喜欢

转载自tianwenbo.iteye.com/blog/1483195