stash登錄時提示輸入驗證碼,可是驗證碼不顯示了,怎麼解決了?
再通過chrome的審查元素進行查看具體報錯的原因:
Error creating bean with name 'p_w_picpathCaptchaServicePrototype' defined in class path resource [stash-context.xml]: Cannot create inner bean 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#142e709' of type [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#142e709#266' defined in class path resource [stash-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager |
在百度是沒法找到解決方案的,最後通過***找到了原因,是字體的問題,但是怎麼裝也沒有用,也有說的jdk的問題,各種查找,最終是柳暗花明。
stash的配置環境的centos環境下,用xshell進行操作。
解決方案:
yum grouplist |
然後找到 Fonts
yum groupinstall Fonts |
裝完後,再重啓一下刷新,結果還是沒有解決,其中提示一個JDK中的目錄下沒有一個 **.so的東西,這時候直接再次裝這個東西
yum install **.so |
再次重啓、刷新,解決問題!