一样的代码,报错

tarataotao Dubbo 使用入门(上) 最后由 极客学院_吕布 于2017年11月07日回复

  • 1 回答
  • 1.7k 浏览

rg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'speakInterface': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'groupUpInterface': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.jikexueyuan.rpc.GroupUpInterface. No provider available for the service com.jikexueyuan.rpc.GroupUpInterface from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=jikexueyuan-dubbo-provider&connected=true&dubbo=2.4.10&inside.invoker.count=0&inside.invokers=&interface=com.jikexueyuan.rpc.GroupUpInterface&methods=addAge&pid=3760&revision=1.0-SNAPSHOT&side=consumer&timestamp=1510045048371 to the consumer 192.168.116.1 use dubbo version 2.4.10

 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)

 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)

 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)

 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)

 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

 at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

 at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

 at com.alibaba.dubbo.container.spring.SpringContainer.start(SpringContainer.java:50)

 at com.alibaba.dubbo.container.Main.main(Main.java:80)

都是引用同一个包接口,怎么会报这个错呢,不应该的,路径应该都是一样的才对呀

  • 极客学院_吕布 2017年11月07日 回答 #1楼
  • jsp中本身有默认的getWriter()方法,如果你的程序的代码中有调用response对象的getOutputStream()方法的话就会重了,系统不知道到底调用哪个方法了,就会报ava.lang.IllegalStateException异常 .

    还有一种情况是重定向到一个html文件,系统处理html文件的时候,是当做一个自带的servlet文件处理,同样会调用getOutputStream()方法,与jsp默认的getWriter()方法重了,就会报ava.lang.IllegalStateException异常.

  • 0 评论