1. 程式人生 > >一些錯誤和解決辦法--01

一些錯誤和解決辦法--01

今天遇到的問題個解決辦法:


1.<dubbo:application name="apple"/>


    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>


    <dubbo:reference id="appleDCService1" interface="com.netease.urs.dc.dubbo.inner.AppleDCService" check="false"/>


    <bean id="dc_service" class="com.netease.urs.apple.controller.DC_Service">
        <property name="appleDCService" ref="appleDCService1"/>
    </bean>


無法建立dc_service,因為無法注入appleDCService:nested exception is java.lang.NoClassDefFoundError: org/I0Itec/zkclient/exce



這個錯誤是由於沒有匯入兩個包:com.101tec:zkclient 和 zookeeper包


匯入後,ok



2. org.springframework.core.GenericTypeResolver.resolveTypeArguments(Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/Class;


使用springmvc搭建web服務時出錯了,原因是jar包衝突,最後經過分析是sping.jar(2.5.6)與spring-core.jar(3.1.2.RELEASE)衝突了,果斷刪掉spring.jar



3.啟動tomcat時候報錯提示1099埠被佔用:


cmd下netstat -aon|findstr "1099" 回車,檢視是哪個程序在佔用這個埠號:假設6152正在佔用:


tasklist|findstr "6152"


taskkill /pid 6152 /f  即可殺死這個程序