2012-10-15 24 views
0

我在重新啓動HSQLDB時出錯。
我正在獲取熱點錯誤日誌。
我想在我的本地機器中重現該錯誤。
任何人都可以幫助我重現hs_err_pid * .log文件嗎?
如果是這樣,那麼步驟是什麼?我如何重現hs_err_pid * .log文件?

+2

重複其生產的相同步驟服務器上的錯誤。無法保證您可以在具有不同硬件和操作系統的其他計算機上重複發生崩潰問題。 –

+0

@Peter Lawrey-Thx很快的回覆。 –

回答

0

無論你使用哪個JRE編譯下面的代碼,如果你在JRE1.7下運行它,你將會得到錯誤。

的代碼:

import java.sql.DriverManager; 
import java.sql.SQLException; 
import javax.swing.JFileChooser; 
import javax.swing.JOptionPane; 
public class TestFileChooser{ 
    public static void main(String[] args){ 
     try{ 
      //If you comment the code below, no error will occur 
      DriverManager.getConnection(
      "jdbc:hsqldb:file:C:/DB_Test/DB_Test", 
      "userAdmin", "pass"); 
     }catch(SQLException e){ 
      JOptionPane.showMessageDialog(null,e.getMessage()); 
     } 
     JFileChooser chooser = new JFileChooser("C:"); 
     chooser.showOpenDialog(null); 
     System.exit(0); 
    } 
} 

試驗(重現該錯誤):

  1. 編譯並執行下面JRE1.7
  2. 代碼將打開一個JFileChooser
  3. 單擊按鈕以列出文件的詳細信息(在右上角)
  4. 它會顯示在表頭的文件表及其細節
  5. 點擊
  6. 程序會突然退出和文件hs_err_pid將創建