Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dubbo2.7.8-springboot-2.3.0.REALEASE使用http协议时报错 #766

Open
happyboy20143 opened this issue Dec 17, 2020 · 3 comments
Open

dubbo2.7.8-springboot-2.3.0.REALEASE使用http协议时报错 #766

happyboy20143 opened this issue Dec 17, 2020 · 3 comments

Comments

@happyboy20143
Copy link

报错信息如下:
java.lang.IllegalStateException: Extension instance (name: http, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: tried to access class com.googlecode.jsonrpc4j.HttpException from class org.apache.dubbo.rpc.protocol.http.HttpProtocol
at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:665) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:429) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:413) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.ServiceConfig.findConfigedPorts(ServiceConfig.java:644) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:444) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:325) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:300) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:206) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$15(DubboBootstrap.java:1103) ~[dubbo-2.7.8.jar:2.7.8]
at java.util.HashMap$Values.forEach(HashMap.java:981) ~[na:1.8.0_261]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1090) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:901) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:59) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:52) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40) ~[dubbo-2.7.8.jar:2.7.8]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at com.xdclass.user.service.ServiceApplication.main(ServiceApplication.java:19) [classes/:na]
Caused by: java.lang.IllegalAccessError: tried to access class com.googlecode.jsonrpc4j.HttpException from class org.apache.dubbo.rpc.protocol.http.HttpProtocol
at org.apache.dubbo.rpc.protocol.http.HttpProtocol.(HttpProtocol.java:58) ~[dubbo-2.7.8.jar:2.7.8]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_261]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_261]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_261]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_261]
at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_261]
at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:635) ~[dubbo-2.7.8.jar:2.7.8]
... 28 common frames omitted

2020-12-17 20:54:06.441 INFO 6960 --- [tor-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl : backgroundOperationsLoop exiting
2020-12-17 20:54:06.445 INFO 6960 --- [ main] org.apache.zookeeper.ZooKeeper : Session: 0x100155d3eb2000e closed
2020-12-17 20:54:06.445 INFO 6960 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn : EventThread shut down for session: 0x100155d3eb2000e
2020-12-17 20:54:10.497 INFO 6960 --- [ main] f.a.ReferenceAnnotationBeanPostProcessor : class org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
请求帮忙解答一下,谢谢!

@happyboy20143 happyboy20143 changed the title dubbo2.7.8-springboot-2.3.0.REALEASE报错 dubbo2.7.8-springboot-2.3.0.REALEASE使用http协议时报错 Dec 17, 2020
@shenliuyang
Copy link

extension配置错了把,
(name: http, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated
接口怎么能被实例化?

@happyboy20143
Copy link
Author

extension配置错了把,
(name: http, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated
接口怎么能被实例化?

配置没问题,版本的bug,我换为dubbo2.7.0之后就没问题了

@kukukakiki
Copy link

我看com.googlecode.jsonrpc4j.HttpException;默认修饰符是包内可见,不知道你们jsonrpc4j用的什么版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants