vsftpd 出現500 OOPS: cannot change directory:/home/500 OOPS:
child diedConnection closed by remote host.無法登入,如何解決?
因為安裝時啟用了防火牆 在不關閉的狀況下要
輸入 setsebool ftpd_disable_trans 1
以 root 登入,並下達下面指令後,重新啟動 vsftpd即可。
# setsebool ftpd_disable_trans 1
# /etc/init.d/vsftpd restart
資料來源 : http://itkm.blogspot.com/2008/02/vsftp-500-oops-cannot-change.html
2009年9月24日 星期四
2009年9月23日 星期三
各種資料庫連結方式
odbc及oracle使用
Connection conn=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection( "jdbc:odbc:dbname","username", "userpassword");
mysql 使用
Connection conn=null;
Class.forName("org.gjt.mm.mysql.Driver");
Connection con = DriverManager.getConnection( "jdbc:mysql://hostip:3306/databasename?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull"
,"username","userpassword")
SQL2005使用
下載並安裝sqljdbc.jar ,classpath 一定要指定這個jar檔.
Connection conn=null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection( "jdbc:sqlserver://192.168.5.11:1433;DatabaseName=dbname;", "username", "userpassword");
SQL2000使用
Class.forName"com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection m_Connection = DriverManager.getConnection "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase", "userid", "password");
Connection conn=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection( "jdbc:odbc:dbname","username", "userpassword");
mysql 使用
Connection conn=null;
Class.forName("org.gjt.mm.mysql.Driver");
Connection con = DriverManager.getConnection( "jdbc:mysql://hostip:3306/databasename?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull"
,"username","userpassword")
SQL2005使用
下載並安裝sqljdbc.jar ,classpath 一定要指定這個jar檔.
Connection conn=null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection( "jdbc:sqlserver://192.168.5.11:1433;DatabaseName=dbname;", "username", "userpassword");
SQL2000使用
Class.forName"com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection m_Connection = DriverManager.getConnection "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase", "userid", "password");
file class 路徑指定
linux 中
new File("/var/lib/tomcat5/webapps/ROOT/erp/sop")
windows 中
new File("C:\\var\\lib\\tomcat5\\webapps\\ROOT\\erp\\sop")
new File("/var/lib/tomcat5/webapps/ROOT/erp/sop")
windows 中
new File("C:\\var\\lib\\tomcat5\\webapps\\ROOT\\erp\\sop")
2009年9月17日 星期四
iReport 3.6 + Tomcat 6.0使用
1.將 iReport\ireport\modules\ext 下的
jasperreports.* 檔案
eigenbase.* 檔案
複製到
Tomcat\lib 目錄下.
2.將 iReport\ireport\modules\ext 下的
iText-2.1.5.jar 檔案
iTextAsian.jar 檔案
jasperreports-3.6.0.jar 檔案
spring.jar 檔案
groovy-all-1.5.5 檔案
複製到
Tomcat\webapps\ROOT\WEB-INF\lib目錄下.
我是要使用iReport 產生EXCEL表,我的配置這樣就能使用了。
jasperreports.* 檔案
eigenbase.* 檔案
複製到
Tomcat\lib 目錄下.
2.將 iReport\ireport\modules\ext 下的
iText-2.1.5.jar 檔案
iTextAsian.jar 檔案
jasperreports-3.6.0.jar 檔案
spring.jar 檔案
groovy-all-1.5.5 檔案
複製到
Tomcat\webapps\ROOT\WEB-INF\lib目錄下.
我是要使用iReport 產生EXCEL表,我的配置這樣就能使用了。
2009年9月16日 星期三
iReport 3.6 PDF 字型安裝
如果iReport 發生下列錯誤,可能是PDF字型沒有裝好
Error exporting print... Could not load the following font
1. 網址 : http://prdownloads.sourceforge.net/itext/iTextAsian.jar 下載 iTextAsian.jar
2. 網址 : http://sourceforge.net/projects/itext/ 下載 iText.jar
2. 將 iText.jar 及 iTextAsian.jar存放至 iReport\ireport\modules\ext 目錄中
3. 打開iReport,進入Tools -> Options內的iReport選項設定
4. 先在Classpath頁,點擊Add JAR,將ireport/modules/ext/iTextAsian.jar 及 iText.jar 列入Classpath清單
5. 完成以上步驟後,才能在Fontpath頁上看到iTextAsian.jar 還有 iText.jar , 勾選它,再重開iReport 就完成了。
資料參考網址:http://blog.cjcht.com/index.php/henry/2009/04/
Error exporting print... Could not load the following font
1. 網址 : http://prdownloads.sourceforge.net/itext/iTextAsian.jar 下載 iTextAsian.jar
2. 網址 : http://sourceforge.net/projects/itext/ 下載 iText.jar
2. 將 iText.jar 及 iTextAsian.jar存放至 iReport\ireport\modules\ext 目錄中
3. 打開iReport,進入Tools -> Options內的iReport選項設定
4. 先在Classpath頁,點擊Add JAR,將ireport/modules/ext/iTextAsian.jar 及 iText.jar 列入Classpath清單
5. 完成以上步驟後,才能在Fontpath頁上看到iTextAsian.jar 還有 iText.jar , 勾選它,再重開iReport 就完成了。
資料參考網址:http://blog.cjcht.com/index.php/henry/2009/04/
2009年9月10日 星期四
SQL 2005 Connection timeout 連線逾時處理
DBA’s Quick Guide to Timeouts
by Chris Kempster
The author of: SQL Server 2000 for the Oracle DBA
Click here for more information, sample chapters, or to purchase this e-book.
The application development DBA needs a good understanding of the overarching application architecture and subsequent technologies (COM+, MSMQ, IIS, ASP etc) to more proactively debug and track down database performance problems. A good place to start is common timeout error. This article will provide a brief overview of where to look and how to set the values.
ADO
Within ADO, the developer can set:
connection timeout (default 15 seconds)
if the connection cannot be established within the timeframe specified
command timeout (default 30 seconds)
cancellation of the executing command for the connection if it does not respond within the specified time.
These properties also support a value of zero, representing an indefinite wait.
Here is some example code:
Dim MyConnection as ADODB.Connection
Set MyConnection = New ADODB.Connection
MyConnection.ConnectionTimeout = 30
MyConnection.Open
- and -
Set MyConnection = New ADODB.Connection
<>
MyConnection.Open strMyConn
Set myCommand = New ADODB.Command
Set myCommand.ActiveConnection = MyConnection
myCommand.CommandTimeout = 15
Take care with command timeouts are described by Microsoft:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q188858
文件原文 http://vyaskn.tripod.com/watch_your_timeouts.htm
by Chris Kempster
The author of: SQL Server 2000 for the Oracle DBA
Click here for more information, sample chapters, or to purchase this e-book.
The application development DBA needs a good understanding of the overarching application architecture and subsequent technologies (COM+, MSMQ, IIS, ASP etc) to more proactively debug and track down database performance problems. A good place to start is common timeout error. This article will provide a brief overview of where to look and how to set the values.
ADO
Within ADO, the developer can set:
connection timeout (default 15 seconds)
if the connection cannot be established within the timeframe specified
command timeout (default 30 seconds)
cancellation of the executing command for the connection if it does not respond within the specified time.
These properties also support a value of zero, representing an indefinite wait.
Here is some example code:
Dim MyConnection as ADODB.Connection
Set MyConnection = New ADODB.Connection
MyConnection.ConnectionTimeout = 30
MyConnection.Open
- and -
Set MyConnection = New ADODB.Connection
<
MyConnection.Open strMyConn
Set myCommand = New ADODB.Command
Set myCommand.ActiveConnection = MyConnection
myCommand.CommandTimeout = 15
Take care with command timeouts are described by Microsoft:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q188858
文件原文 http://vyaskn.tripod.com/watch_your_timeouts.htm
訂閱:
文章 (Atom)