日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Eclipse中JBOSS莫名其妙自动关闭

發布時間:2024/4/14 编程问答 51 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Eclipse中JBOSS莫名其妙自动关闭 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

經常會碰到在Eclipse啟動時JBOSS時,JBOSS順利啟動后自動就關閉了, 如下提示框

?


(注意要點擊details按鈕,看一下,是不是上面的原因)

?

由于Eclipse對于所有Java 服務器設定的超時為50秒,因此如果JBOSS的啟動時間超過50秒就會被關掉。

解決這個問題要分兩種情況,

一.如果確實是機器比較慢,服務器啟動到一關停止,則設置服務器啟動時間.


1.JBOSS 的超時可以通過其安裝目錄/server/default/conf/jboss-service.xml的TransactionTimeout屬性來設定。默認為Normal,一般夠用了。


2.如果要在Eclipse中直接啟動應用,則需要在ECLIPSE中設置: Windows>Peferences>Server ,在 Server timeout delay 下拉框中選擇Unlimited.


二.當把啟動時間設置為Unlimited后,服務器一直處理starting的狀態,這時需要檢查配置.

原因主要是由于配置不一致造成的,檢查下 eclipse中Jboss server的配置,位置在workspace\.metadata\.plugins\org.eclipse.wst.server.core下的server.xml(也可以在Server view單擊JBOSS,在其中設置相關端口)

?

<?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 usingthe 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 -1to run the NamingService without the JNP invoker listening port.--><attribute name="Port">1099</attribute>

?

確保這里的1099和eclipse中的一致。

?

?

總結, 即你在JBOSS和ECLIPSE的Server view中修改的端口必須保持一致.如果不一致,那么在ECLIPSE中啟動view時,服務器一直處于starting狀態,直到超時,把服務器關閉.

總結

以上是生活随笔為你收集整理的Eclipse中JBOSS莫名其妙自动关闭的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。