A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

Last week we start to the project of Qingcheng. This is a project about online business, just a little like with the JingDong or TaoBao website. The most several issue is that unable to release provider or customer to the zookeeper(dubbo) server. This is the first step of the project, if not success in this, the project is unable to be began. This spent much time to fix this issue sine I can process to the next stage. Here is the issue and solve method during the beginning of the project.

1.        No qualifying bean of type 'cn.reve.dao.BrandMapper' available
Root cause: No qualifying bean of type 'cn.reve.dao.BrandMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Solve method: Make sure the annotation has been typed and the package of the class has been scanned by xml config file.
2.        Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: ${jdbc.driver}
Root Cause: MySQL is not connected due to missing the parameters in properties.
Solve method: Make sure the properties file has been scanned by the spring xml file.
3.        Could not find artifact ...:pom:0.0.1-SNAPSHOT and 'parent.relativePath
Root Cause: Missing parent dependence
4.        unable to release customer/provider to dubbo/zookeeper
Root Cause: One or more config file is not scanned.
Solve methods:
1. incorrect jar package
2. package name is incorrect.
3. zookeeper address is incorrect in common module
4. sacnned package is incorrect in dubbo config file in both provider and customer modules.
5. controller package is not scanned customer module.
6. service package is not scanned provider module.
7. dubbo config file has been scanned in both provider and customer modules.
8. Other application config files had been scanned
5. charset gbk is unabel to be mapping
        Root cause: The class is parsed by gbk charset
        Solve method: adding dependence : <encoding>utf-8</encoding> in the maven-complier-plugin
<plugin>  
        <groupId>org.apache.maven.plugins</groupId>   
        <artifactId>maven-compiler-plugin</artifactId>  
        <version>3.1</version>  
        <configuration>  
            <source>1.7</source>  
            <target>1.7</target>  
            <encoding>UTF-8</encoding>  
        </configuration>  
    </plugin>  

or
<properties>  
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>  
    </properties>

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马