顯示具有 error 標籤的文章。 顯示所有文章
顯示具有 error 標籤的文章。 顯示所有文章

2012年6月20日 星期三

[Fixed] git push rejected (non-fast forward)

下git push時遇到被reject的錯誤
$ git push origin master
To git@github.com:${USR}/mvn-repo.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:${USR}/mvn-repo.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
只要先下git pull,在下git push就會正常了
$ git pull origin master
$ git push origin master
Reference: rip747

2012年4月25日 星期三

[Fixed] 安裝RabbitMQ出現warning: rpmts_HdrFromFdno: Header V4 DSA signature: NOKEY錯誤

加上--nogpgcheck,就可以避免這個問題的出現
sudo yum install -y rabbitmq-server-${version}.noarch.rpm --nogpgcheck
Reference: 15975604853.blog.163.com

2012年4月12日 星期四

[Fixed] 使用Maven時遇到"Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.5..."錯誤

錯誤訊息大致上是"Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.5...",
當遇到這個問題時,只要移除.m2/裡面的maven-resource-plugin資料夾,再重新執行即可
rm -rf ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.5
mvn compile
Reference: stackoverflow

2012年3月15日 星期四

[Fixed] RabbitMQ使用過程中出現java.net.SocketException: Connection reset


# 檢查 max number of open files
ulimit -a
ulimit -n

###################################################
#                Sample output                    #
###################################################
#  core file size          (blocks, -c) 0
#  data seg size           (kbytes, -d) unlimited
#  scheduling priority             (-e) 0
#  file size               (blocks, -f) unlimited
#  pending signals                 (-i) 40960
#  max locked memory       (kbytes, -l) 32
#  max memory size         (kbytes, -m) unlimited
#  open files                      (-n) 4096
#  pipe size            (512 bytes, -p) 8
#  POSIX message queues     (bytes, -q) 819200
#  real-time priority              (-r) 0
#  stack size              (kbytes, -s) 10240
#  cpu time               (seconds, -t) unlimited
#  max user processes              (-u) 40960
#  virtual memory          (kbytes, -v) unlimited
#  file locks                      (-x) unlimited

# 更進一步,可以檢查soft limit跟hard limit
ulimit -Sn
ulimit -Hn

# 當發現 open files (-n) 設定的數字太少,把它調高一點
ulimit -n 65535

# 接著,重開出問題的服務
service rabbitmq-server restart
Reference: geardnico

2012年1月17日 星期二

[Fixed] 執行Visual Studio 2010的cl.exe發生找不到mspdb100.dll的問題

執行vcvars32.bat,但每開啟一次console都必須要執行一次
[Microsoft Visual Studio 10.0 Installed Directory]\VC\bin\vcvars32.bat
Reference: stackOverflow

2011年12月14日 星期三

[Fixed] java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool

因為缺少Commons Pool這個library,補上就可以了。

1. 到Apache Commons Pool網站下載commons-pool-x.jar
2. 將commons-pool-x.jar放到Tomcat的lib/資料夾下,重開Tomcat即可
Reference: BlogJava

2011年10月31日 星期一

Fixed: VMware Workstation在CentOS 5.5中執行出現'Could not open /dev/vmmon: No such file or directory'錯誤

CentOS 5.5跑VMware Workstation,在虛擬機器啟動過程中出現以下錯誤:
Could not open /dev/vmmon: No such file or directory
解決方法是安裝VMware所需要的module,執行以下指令:
sudo vmware-modconfig --console --install-all
Reference: Opensuse Forum

2011年9月9日 星期五

Fixed: 使用MacFUSE連接NTFS硬碟出現錯誤

錯誤訊息可能如以下:
"Libary/Filesystem/fuse.fs/Support/fuse.kext failed to load - 
(libkern kext) link error; 
check the system/kernel logs for errors or try kextutil(8)" 
the MACFuse file system is not available (71)
造成錯誤的主因,應為MacFUSE的版本無法和Mac OS X相容(筆者使用OS X Lion), 安裝Tuxera釋出的MacFUSE後 (連結),即可解決這個問題。
Reference: Google Code

2011年8月23日 星期二

使用Maven遇到"java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file"錯誤

筆者在使用JAX-RS (Jersey)及Java EE 6 API時,執行"mvn test",會出現類似以下的錯誤
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ws/rs/core/MediaType
...
原因是Java EE 6只是一個Interface,必須要等到hibernate jars讀取進來,實作這些JPA interface,因此要調整Java-ee-api在pom.xml裡面的位置,才不會出現這個錯誤。


	com.sun.jersey
	jersey-server
	1.0.1




	org.hibernate
	hibernate-core
	3.6.6.Final



	org.hibernate
	hibernate-entitymanager
	3.6.6.Final



	org.hibernate
	hibernate-validator
	4.0.2.GA




	javax
	javaee-api
	6.0
	provided

Reference: stackoverflow

2011年7月31日 星期日

Homebrew做update出現Error

cd `brew --prefix`
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
git reset --hard origin/master
Reference: github

Fixed: 在Lion上執行Parallel出現"Unable to Load the Parallels Driver"

開啟 Terminal ,切換為 root 身分:
sudo su

以root權限執行以下指令:
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_hypervisor.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_hid_hook.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_usb_connect.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_netbridge.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_vnic.kext"
Reference: NightLion

2011年6月8日 星期三

Solved: Failed to load class org.slf4j.impl.StaticLogger

當使用 Hibernate 遇到" Failed to load class org.slf4j.impl.StaticLogger "這個問題時,
只需要把 slf4j-nop-1.6.1.jar 匯入即可。

Reference:陽光e站