console控制台错误及处理过程

1.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project lietou-bg-investigate-service: Compilation failure (编译失败)
[ERROR] D:\workspace\javaall\lietou-java\lietou-service\lietou-bg-investigate-service\src\main\java\com\lietou\bg\investigate\service\InvestigateService.java:[211,41] 错误: -source 1.6 中不支持 diamond 运算符
[ERROR] -> [Help 1]

原因:代码中包含不支持编译的语法。

解决办法:1)修改jdk为高级版本。
          2)修改编译器compiler为高级版本。
          3)删除掉不支持语法部分。[221,41]


2.
错误信息:大概是source 1.6 编译不支持 1.7,请使用更高版本。

解决方法:1)修改build path ,configration,libraries   jdk1.7版本以上。
          2)修改修改编译器compiler为高级版本。
          3)在pom.xml下 添加以下配置:
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>   
</properties>

<dependencies>
</dependencies>

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
        </plugins>
</build>

3.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project lietou-webapp: Compilation failure
[ERROR] \workspace\javaall\lietou-java\lietou-web\lietou-webapp\src\main\java\com\lietou\web\controller\HomeController.java:[1844,24] 错误: 无法将类 HunterService中的方法 updatePrivateCustomize应用到给定类型;
[ERROR] -> [Help 1]

错误原因:有依赖没有打包,没有生成相应的jar包,所以调用失败。

解决办法:找到对应的项目打包即可。 或者使用批处理命令进行打包。

4.
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'candidateController': Injection of autowired dependencies failed; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Could not autowire field: private com.lietou.crawler.resume.dedup.service.DuplicateService com.lietou.web.controller.CandidateController.duplicate;
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'duplicate' defined in ServletContext resource [/WEB-INF/app-web-dao-beans.xml]:
Cannot resolve reference to bean 'segementWordUtil' while setting bean property 'segementWordUtil';
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'segementWordUtil' defined in ServletContext resource [/WEB-INF/app-web-dao-beans.xml]:
Initialization of bean failed;
nested exception is org.springframework.beans.ConversionNotSupportedException: 
Failed to convert property value of type 'com.lietou.commons.thrift.ThriftClient' to required type 
'com.lietou.commons.thrift.PooledThriftClient' for property 'tclient';
nested exception is java.lang.IllegalStateException: 
Cannot convert value of type [com.lietou.commons.thrift.ThriftClient] to required type 
[com.lietou.commons.thrift.PooledThriftClient] for property 'tclient':
no matching editors or conversion strategy found


问题所在:Error creating bean with name 'segementWordUtil' defined in ServletContext resource [/WEB-INF/app-web-dao-beans.xml]:
Initialization of bean failed;
Cannot convert value of type [com.lietou.commons.thrift.ThriftClient] to required type
[com.lietou.commons.thrift.PooledThriftClient] for property 'tclient':
no matching editors or conversion strategy found
首先初始化位于 [/WEB-INF/app-web-dao-beans.xml]下的'segementWordUtil'失败,
找到对应的resources;
然后property 'tclient'属性里的ThriftClient与想要的PooledThriftClient不一致;
则需要为其配置需要的类型。

猜你喜欢

转载自liwuer.iteye.com/blog/2230164