qq_41698573 2019-02-22 12:52 采纳率: 0%
浏览 1032
已结题

ssm+dubbo框架 自己的service端运行不报错 web运行也不报错 一旦访问就报错

package com.pinyougou.sellergoods.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.pinyougou.mapper.TbBrandMapper;
import com.pinyougou.pojo.TbBrand;
import com.pinyougou.sellergoods.service.BrandService;
@Service
public class BrandServiceImpl implements BrandService{

    @Autowired
    private TbBrandMapper brandMapper;

    public List<TbBrand> findAll() {
        List<TbBrand> list = brandMapper.selectByExample(null);
        return list;
    }

}

自己写了一个brandService运行是正常的 zookeeper ip也没错 就是获取不到服务 启动controller访问页面时报错

错误信息如下

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brandController' defined in file [F:\workspace\pinyougou-parent\pinyougou-manager-web\target\classes\com\pinyougou\manager\controller\BrandController.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanInitializationException: Failed to init remote service reference at filed brandservice in class com.pinyougou.manager.controller.BrandController; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.pinyougou.sellergoods.service.BrandService. No provider available for the service com.pinyougou.sellergoods.service.BrandService from the url zookeeper://192.168.25.132:2181/com.alibaba.dubbo.registry.RegistryService?application=com.pinyougou.manager.controller&dubbo=2.8.4&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=4104&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1550809827732 to the consumer 192.168.201.1 use dubbo version 2.8.4

应该是无法从注册中心找到该服务;可是我服务运行也没问题 地址也没写错

  • 写回答

2条回答

  • 小小菜鸟2020 2019-02-22 14:14
    关注

    brandService 能访问吗?

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题