关于dubbo,注册service启动就报错了,跪求大神解决 1C

在项目启动之前其他Service包下,dubbo服务都是没有问题。
当我自己写的一个service用于测试熟悉dubbo。报错了
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.bonatone.common.jam.service.IJamService': Cannot resolve reference to bean 'jamSerivce' while setting bean property 'ref'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jamSerivce' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
at com.alibaba.dubbo.container.spring.SpringContainer.start(SpringContainer.java:50)
at com.bonatone.dubbo.container.Main.main(Main.java:81)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jamSerivce' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:698)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1175)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
... 16 common frames omitted

5个回答

刚刚下午自己也遇到这个问题,第一先要确定自己是广播还是直连或者zookeeper ,我的是zookeeper,第一次报错是没开启zookeeper,第二次最坑爹,
AxxxServiceImpl 配置了@Service ,在,ref的第一个字母一定要是小写,找了半天才发现是这里的问题

qq_41519442
Qyt-Coding 我也小写了,为什么还错,我都不知道什么问题了
10 个月之前 回复
phw940710
似默非默 正解
接近 2 年之前 回复

xml配置如下
图片说明

图片说明
serivce,接口都是copy过来的,不会有问题。
问题就是出现在duboo上,还是就是ref所指的是哪里

暴露服务配置,配上就会出错。这是啥情况

你有知道dubbo是干啥的吗

jamService 这个spring加载到了没。或者被实例化了吗?如果没有,dubbo怎么注册?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问