2005/09/07
[troubleshooting] admin console密碼更改的問題
關於admin console的帳號密碼更改的問題,在admin console所變更的密碼,其不會同步更新到boot.properties這個file,所以,如果有變更密碼,就需要重新編輯此檔案(boot.properties)。
[troubleshooting] how to retrieve client's IP if WLS had plugin apache
For non-clustered servers that will receive proxied requests, this attribute may be set at the server level, on the Server -->Configuration-->General tab-->Advanced Options
把server instance的這個值enable起來,然後server要restart
reference: domain_cluster_config_general.html
把server instance的這個值enable起來,然後server要restart
reference: domain_cluster_config_general.html
[troubleshooting] Connection has already been created in this tx context for pool
scenario:
database:mysql
They had two mysql database connections. The first one is used to read data, and the second one is used to write data into another database. And they also check "Emulate Two-Phase Commit for non-XA driver" this option, but it still does not work.
Exception in context_onAcquire
java.sql.SQLException: Connection has already been created in this tx context for pool named dbsvr1_mysql. Illegal attempt to create connection from another pool: wssvr1_wsclub
According to the exception message, it means you can't use more than one non-XA connection pool in distributed transaction.
If you want to implement one user control calling two DB controls, you will have one transaction using two connections at the same time.
Only an XA transaction with 2PC support can do the job. You need to use XA driver.
I searched for the doc MYSQL, and find MYSQL 5.1 will support XA. But unfortunately, now the latest version of MYSQL is 5.0.
I think there's no good method on weblogic side which can handle the two connection pools with two non-xa drivers condition.
http://e-docs.bea.com/wls/docs81/faq/JTA.html#738373
database:mysql
They had two mysql database connections. The first one is used to read data, and the second one is used to write data into another database. And they also check "Emulate Two-Phase Commit for non-XA driver" this option, but it still does not work.
Exception in context_onAcquire
java.sql.SQLException: Connection has already been created in this tx context for pool named dbsvr1_mysql. Illegal attempt to create connection from another pool: wssvr1_wsclub
According to the exception message, it means you can't use more than one non-XA connection pool in distributed transaction.
If you want to implement one user control calling two DB controls, you will have one transaction using two connections at the same time.
Only an XA transaction with 2PC support can do the job. You need to use XA driver.
I searched for the doc MYSQL, and find MYSQL 5.1 will support XA. But unfortunately, now the latest version of MYSQL is 5.0.
I think there's no good method on weblogic side which can handle the two connection pools with two non-xa drivers condition.
http://e-docs.bea.com/wls/docs81/faq/JTA.html#738373
2005/09/02
2005/08/30
2005/08/25
[troubleshooting] Resolve Too Many Open Files
Resolve Too Many Open Files
Troubleshooting Guidance Support Diagnostic Patterns
之前一直發現rlim_fd_max這個值始終都是預設的1024這個值,並不是user設定後的值,原來是在啟動的時候,他會去跑commEvn.sh裡頭的resetFd()這個function,裡頭會把值還原成1024,把它comment掉就好了。
Troubleshooting Guidance Support Diagnostic Patterns
之前一直發現rlim_fd_max這個值始終都是預設的1024這個值,並不是user設定後的值,原來是在啟動的時候,他會去跑commEvn.sh裡頭的resetFd()這個function,裡頭會把值還原成1024,把它comment掉就好了。
[troubleshooting] WLS 8.1 亂碼解決方法
http://www.ddvip.net/program/java/index6/281.htm
in web.xml add:
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>BIG5</param-value>
</context-param>
in weblogic.xml add:
<jsp-descriptor>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>javac</param-value>
</jsp-param>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>BIG5</param-value>
</jsp-param>
</jsp-descriptor>
in web.xml add:
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>BIG5</param-value>
</context-param>
in weblogic.xml add:
<jsp-descriptor>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>javac</param-value>
</jsp-param>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>BIG5</param-value>
</jsp-param>
</jsp-descriptor>
2005/08/15
Smartly load your properties
Link
Example
Assume I have a property file which named config, and this file locate at src/albert.
This file contains two values:
name=albert
email=junyuo@gmail.com
Then you can utilize this approach to read this property file
InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("albert/config.properties");
PropertyResourceBundle rb = new PropertyResourceBundle(is);
System.out.println("name="+rb.getString("name"));
System.out.println("email="+rb.getString("email"));
Example
Assume I have a property file which named config, and this file locate at src/albert.
This file contains two values:
name=albert
email=junyuo@gmail.com
Then you can utilize this approach to read this property file
InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("albert/config.properties");
PropertyResourceBundle rb = new PropertyResourceBundle(is);
System.out.println("name="+rb.getString("name"));
System.out.println("email="+rb.getString("email"));
2005/08/02
2005/07/02
0B0-104(BEA 8.1 Certified Administrator)考試心得
0B0-104考試簡介
此項考試的全名是:BEA 8.1 Certified Administrator : System Administration,考試代號是0B0-104。考試題數共69題,時間120分鐘,通過比率66%,報名費5000元。考試的詳細資訊請參考此網址:http://www.bea.com.tw/07services/techdoc/07services_03_04.htm
0B0-104考試報名
如果你之前參加透過Prometric舉辦的考試,考試ID仍舊可以沿用,無須重新申請。報名的話,可以打電話去報名(08001611141),告訴對方你的考試ID、要報名的考試科目名稱、考試時間、考試地點即可。
0B0-104 Study Guide
http://certification.bea.com/certification/study_guide
/System_Administration_11_12_04.htm,此link有告訴你此考試的準備方向,參考書籍以及模擬考題。JavaRanch此論壇的此thread也有針對此考試有一些在準備上的討論:http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=61&t=001195
0B0-104考試心得
考試的題型只有兩種:單選題與拖拉題。就整個考試內容來說,著重於幾個部份:Cluster, Performance Tuning, JMS, LDAP與Security, Application Deployment, JMS, Node Manager及Network Channel。拖拉題只有三題:Sever Life-Cycle、Heuristic Transaction、JMS File Store Synchronization Write Policy解釋 : Disabled, Cache-Flush, Direct-Write
此項考試的全名是:BEA 8.1 Certified Administrator : System Administration,考試代號是0B0-104。考試題數共69題,時間120分鐘,通過比率66%,報名費5000元。考試的詳細資訊請參考此網址:http://www.bea.com.tw/07services/techdoc/07services_03_04.htm
0B0-104考試報名
如果你之前參加透過Prometric舉辦的考試,考試ID仍舊可以沿用,無須重新申請。報名的話,可以打電話去報名(08001611141),告訴對方你的考試ID、要報名的考試科目名稱、考試時間、考試地點即可。
0B0-104 Study Guide
http://certification.bea.com/certification/study_guide
/System_Administration_11_12_04.htm,此link有告訴你此考試的準備方向,參考書籍以及模擬考題。JavaRanch此論壇的此thread也有針對此考試有一些在準備上的討論:http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=61&t=001195
0B0-104考試心得
考試的題型只有兩種:單選題與拖拉題。就整個考試內容來說,著重於幾個部份:Cluster, Performance Tuning, JMS, LDAP與Security, Application Deployment, JMS, Node Manager及Network Channel。拖拉題只有三題:Sever Life-Cycle、Heuristic Transaction、JMS File Store Synchronization Write Policy解釋 : Disabled, Cache-Flush, Direct-Write
2005/04/12
SimpleFTP Java FTP Client Package
SimpleFTP Java FTP Client Package: "A Simple Java FTP Client Package"
2005/04/11
2005/03/18
java.util.MissingResourceException
Scenario:
I have a config.properties file. In this property file, it provides some information, such as jdbc driver url, user name, password, and so forth.
But as I wanna read this property file, it always throws this kind of exception message: java.util.MissingResourceException: Can't find bundle for base name config
How to resolve:
This root cause is not cannot find this property file. It does find this file, but the content in this file has something wrong.
This line is the snippet of the property file
ftp.type4.path=D:\batch\FTP_FILES\user_group
the problem is the slash direction, it should be
ftp.type4.path=D:/batch/FTP_FILES/user_group
or
ftp.type4.path=D:\\batch\\FTP_FILES\\user_group
I have a config.properties file. In this property file, it provides some information, such as jdbc driver url, user name, password, and so forth.
But as I wanna read this property file, it always throws this kind of exception message: java.util.MissingResourceException: Can't find bundle for base name config
How to resolve:
This root cause is not cannot find this property file. It does find this file, but the content in this file has something wrong.
This line is the snippet of the property file
ftp.type4.path=D:\batch\FTP_FILES\user_group
the problem is the slash direction, it should be
ftp.type4.path=D:/batch/FTP_FILES/user_group
or
ftp.type4.path=D:\\batch\\FTP_FILES\\user_group
2005/03/15
Example for Struts+DisplayTag+Spring Framework
Example for Struts+DisplayTag+Spring Framework
Environment:Win XP Pro
App Server: Oracle 9i AS
DataBase: Oracle 9i
IDE Tool: JDeveloper 10g
Struts: http://jakarta.apache.org/struts
DisplayTag: http://displaytag.sourceforge.net
Spring Framework: http://www.springframework.org
Page Flow:

Sample Code: download
Environment:Win XP Pro
App Server: Oracle 9i AS
DataBase: Oracle 9i
IDE Tool: JDeveloper 10g
Struts: http://jakarta.apache.org/struts
DisplayTag: http://displaytag.sourceforge.net
Spring Framework: http://www.springframework.org
Page Flow:
Sample Code: download
Subscribe to:
Posts (Atom)