0
我正在使用richfaces,並且一切似乎都可以在我的開發機器(Windows操作系統)上工作。在Linux機器上部署它,我沒有看到任何帶有richfaces組件的圖像(如排序圖像)並拋出此異常。Richfaces和無頭模式
java.lang.InternalError: Can't connect to X11 window server using 'tnsd03748:1.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
只有當代碼試圖在linux/unix環境中處理無頭時,纔會發生這種情況。當我添加-Djava.awt.headless=true
時,這個問題可能會得到解決。我只是想知道有沒有人遇到過richfaces這樣的問題,並且是否有任何配置能夠正確使用它。