Maven: run as-> maven build时候报错

1 篇文章 0 订阅

1. Could not find artifact com.taotao:taotao-parent:pom:0.0.1-SNAPSHOT and ‘parent.relativePath’ points at wrong local POM @ line 4, column 10
解决办法:
将依赖的所有父工程run as->maven install安装到本地库中,可以在repository里面查看是否已经安装
2. Could not resolve dependencies for project com.taotao:taotao-manager-web:war:0.0.1-SNAPSHOT: Could not find artifact com.taotao:taotao-manager-interface:jar:0.0.1-SNAPSHOT
解决办法:
运行的是之前的web 工程,将所有的run as maven build 的选项删除。 重新运行一下
3. Error creating bean with name ‘itemController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taotao.service.ItemService com.taotao.controller.ItemController.ItemService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘itemService’: FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.taotao.service.ItemService. No provider available for the service com.taotao.service.ItemService from the url zookeeper://192.168.195.131:2181/com.alibaba.dubbo.registry.RegistryService?application=taotao-manager-web&dubbo=2.5.3&interface=com.taotao.service.ItemService&methods=getItemById&pid=13716&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1543214347718 to the consumer 192.168.195.6 use dubbo version 2.5.3
解决办法:
先启动服务端再启动客户端
4. Invalid bound statement(not found)解决mapper映射文件不发布
逆向工程的实现类是.xml文件,在工程中有,但是编译之后就没有了。
解决办法:
在taotao-manager-dao工程的pom文件中添加如下内容:

<build>
	<resources>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>false</filtering>
        </resource>
    </resources>
</build>

5. Serialized class………must implement java.io. Serialized
表名类序列化失败,服务端和表现层通信时候,客户端要调用服务端的服务,对象要序列化和反序列化,所以要把pojo类实现Serialized接口
解决办法:
把pojo类实现Serialized接口

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值