顯示具有 jboss 標籤的文章。 顯示所有文章
顯示具有 jboss 標籤的文章。 顯示所有文章

2008年10月22日 星期三

[備忘記]How to change web port number in Jboss AP Server?

如果我需要同時間在主機上執行兩個以上的 JBoss AP Server,那應該要改動哪些檔案內的 port number 設定?

環境:JBoss AP Server 4.2.3
$JBOSS_HOME 安裝資料夾 (例如: C:\jboss-4.2.3.GA)



























































$JBOSS_HOME/server/default/deploy/jbossweb-tomcat50.sar/server.xml
Portnumber Service
8080 webserver
8009 ajp13
8443 ssl

$JBOSS_HOME/server/default/conf/jboss-service.xml
Portnumber Service
8083 WebService
1099 NamingService
1098 NamingService
4444 RMIObjectPort
4445 ServerBindPort
$JBOSS_HOME/server/default/deploy/jms/uil2-service.xml
Portnumber Service
8093 UILServerILService


參考網站:
http://davide-ficano.sourceforge.net/java/jboss.html
http://www.thedance.net/~roth/TECHBLOG/jbossports.html
http://lijinjoseji.wordpress.com/2008/02/15/how-to-change-post-number-in-jboss-app-server/

2008年8月22日 星期五

[備忘記]JBoss AS 無法自動載入 datasource 檔

剛剛在用 JBoss Developer Stadio 時
執行 JBoss AS 加退專案功能時
忽然無法加入 datasource 檔,百試不得其解(拖拉、關掉 JDS、砸電腦(這當然不可能!!))
最後只好把該檔案先放在 JBoss AS 的 deploy 檔案內暫時解決....

2008年8月14日 星期四

[Seam]重複載入SeamPhaseListener

今天要用JBoss Application Server執行 HRMS 的 Seam 專案時
出現了如下的錯誤訊息
Caused by java.lang.IllegalStateException with message: "No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)"

回去看啟動 log 也發現它有顯示這個錯誤
13:23:30,522 WARN [SeamPhaseListener] There should only be one Seam phase listener per application

上網 google 後找到的解法.....

[8/25更新]
這錯誤困擾我兩個多禮拜,直到今天才解決(應該吧....)
由於我之前使用 war 來建立專案,但卻無法有效執行 TestNG,直到發現問題出在應該以 ear 來建立 EJB3 專案才解決(嗯...這也反映基本功不夠會出現很多笑話)
OK...TestNG 可以過了那就來試試看實際網頁長怎樣
RUN...居然出現...No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)
這是啥呀?
去 google 查,有人說是因為同一時間內載入了兩個以上的 SeamPhaseListener
好....那就來找看看是哪個 jar 檔或設定檔多做了這動作(因為我是直接用精靈產生專案,應該很好找吧!!)
...
...
(光陰似箭....兩個禮拜過去)
......媽呀....居然怎麼都找不到....
死了....不會就這樣專案胎死腹中吧....(這其間還想到要找顧問來解救算了)

不死心地上 google 再拜一次(其實每天都在拜)
這次用 "jbds seamphaselistener" 當 keyword,幸運的讓我在 [url=http://seamframework.org/Community/ProblemWithJboss423]jboss community[/url] 找到有人也發生這錯誤,也有人沒有發生這錯誤
依據內容,我就想試試看是不是 JBoss AS 的問題
果不其然,再將 JBoss AS 4.2.3 換成 JBoss As 4.2.2 以後就沒有這問題了

雖然問題解決了,但心中還是有不踏實的感覺

2008年7月14日 星期一

[備忘記]啟動 JBoss 出現:Could not instantiate dialect class 錯誤

這個錯誤是因為有載入重複的 jar 檔導致。
找出重複的檔案並刪除即可。

就我遇到的情況來說
是因為 JBoss Developer Studio 中設定了 JPA 為 Hibernate
但是預設載入 JBoss 時專案又會將 JPA 再裝載一次 Hibernate 的 jar 檔
因此造成重複載入的如下錯誤:
java.lang.ClassCastException: org.hibernate.dialect.MySQL5InnoDBDialect

2008年7月10日 星期四

[備忘記]JBoss Developer Studio 無法載入 org.richfaces.renderkit.html.images.SpinnerButtonDown

org.richfaces.renderkit.html.images.SpinnerButtonDown
這個錯誤遇到兩次了

現在把它寫下來以免以後每次都要再從頭找一次解法(可見記憶力多不可靠...)

在匯入 richfaces 的 jar 檔時
要同時匯入以下三個檔案
richfaces-api-3.2.0.SR1.jar
richfaces-impl-3.2.0.SR1.jar(這就是SpinnerButtenDown的實作檔)
richfaces-ui-3.2.0.SR1.jar

不要只匯入 richfaces-ui-3.2.0.SR1.jar 而已......

[備忘記]JBoss Developer Studio 初始設定

進入 Window/preferences
1. General/Content Types:全部檔案類別的編碼都改為 UTF-8。
2.General/Editors/Text Editors:
 a.Displayed tab width 改為 2。
 b.Show line number 勾選。
3.General/Editors/Text Editors/Spelling:
 Dictionaries/Encoding 改為 UTF-8。
4.General/Keys:
 a.delete line 設定 Ctrl + D 範圍 In Windows。
 *找出自動完成並設定為 Alt + /。
5.General/Workspace:
 a.Text file encoding 改為 UTF-8。
 b.New text file line delimiter 改為 UTF-8。
6.Connectivity/Driver Definitions:
 在使用的資料庫內增加連線設定(記得下載該 JDBC jar 檔)。
7.Java/Build Path:
 修改 Source and output folder/Folder/Output folder name 為 classes。
8.Java/Code Style:
 勾選 Automatically add comments for new methods and types。
9.Java/Code Style/Clean Up:
 增加新的程式碼模版設定→pogi
 ‧Remove 'this' qualifier for non static method accesses
 ‧Change non static accesses to static members using declaring type
 ‧Change indirect accesses to static members to direct accesses (accesses through subtypes)
 ‧Convert for loops to enhanced for loops
 ‧Remove unused imports
 ‧Remove unused private methods
 ‧Remove unused private constructors
 ‧Remove unused private types
 ‧Remove unused private fields
 ‧Remove unused local variables
 ‧Add missing '@Override' annotations
 ‧Add missing '@Deprecated' annotations
 ‧Add missing serial version ID (generated)
 ‧Remove unnecessary casts
 ‧Remove unnecessary '$NON-NLS$' tags
 ‧Organize imports
 ‧Format source code
10.Java/Code Style/Code Templates:
 修改 Comments files
 /**
  * @建立者 ${user}
 * @建立時間 ${date} ${time}
  * @版權所有 ©Elitech 2008 - ${year}
  */
11.Java/Code Style/Formatter:
 增加新的格式化設定→pogi。
12.JBoss jBPM/Runtime Locations:
 增加新的來源 jBPM-runtime,用jbpm-jpdl-3.2.2。
13.JBoss Tools/Web/Seam:
 增加 Seam 2.0來源。
14.Web and XML:
 a.CSS Files/Creating files/Encoding 改為 UTF-8。
 b.HTML Files/Creating files/Encoding 改為 UTF-8。
 c.JSP Files/Creating files/Encoding 改為 UTF-8。
15.XDoclet:
 來源設為 1.2.3 版,並指定路徑。
16.Server / Installed Runtime:
 將 JBoss AS Server 的配置設定改為 All(這樣才會載入全部的 jar 檔)。

2008年6月16日 星期一

[Seam]Component.xml 的 event tag

寫這篇的時候我還不清楚 component.xml 到底是在 seam 內負責啥功能?
所以在看到 event tag 的時候自然會有一種疑問.....
這些事件是哪來的呀?

雖然文件內的說明指出它是內建的
但是看了 API 卻還是不曉得其對應關係是怎樣?

事件名稱:org.jboss.seam.notLoggedIn
API:org.jboss.seam.security.NoLoggedInException

事件名稱:
org.jboss.seam.postAuthenticate
API:找不到

整一個搞不清楚中......@@