You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "CodePlayer (via GitHub)" <gi...@apache.org> on 2023/05/11 06:48:52 UTC
[GitHub] [dubbo] CodePlayer opened a new issue, #12292: Dubbo java.lang.NullPointerException when starting the application
CodePlayer opened a new issue, #12292:
URL: https://github.com/apache/dubbo/issues/12292
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 3.2.0
* Operating System Windows 10
* Java version: OpenJDK 17.0.6
### Steps to reproduce this issue
1. Just use `tri` protocal only + Nacos 2.2.2
2. Startup SpringBoot
### Expected Behavior
No error.
### Actual Behavior
```
java.lang.NullPointerException: null
at java.lang.Class.isAssignableFrom(Native Method) ~[?:?]
at org.apache.dubbo.common.utils.AnnotationUtils.isAnnotationPresent(AnnotationUtils.java:421) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.metadata.rest.jaxrs.JAXRSServiceRestMetadataResolver.supports0(JAXRSServiceRestMetadataResolver.java:50) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.metadata.rest.AbstractServiceRestMetadataResolver.supports(AbstractServiceRestMetadataResolver.java:78) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.rest.annotation.metadata.MetadataResolver.resolveConsumerServiceMetadata(MetadataResolver.java:42) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.rest.RestProtocol.protocolBindingRefer(RestProtocol.java:136) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.AbstractProtocol.refer(AbstractProtocol.java:138) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:83) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.refer(ProtocolSecurityWrapper.java:107) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:85) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:74) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:52) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.refer(InvokerCountWrapper.java:50) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.toInvokers(ServiceDiscoveryRegistryDirectory.java:413) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshInvoker(ServiceDiscoveryRegistryDirectory.java:307) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshOverrideAndInvoker(ServiceDiscoveryRegistryDirectory.java:191) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.notify(ServiceDiscoveryRegistryDirectory.java:183) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.addListenerAndNotify(ServiceInstancesChangedListener.java:243) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:329) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:225) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:187) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:88) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:184) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.subscribe(ServiceDiscoveryRegistryDirectory.java:134) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:581) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:65) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:440) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToApplicationFirstInvoker(MigrationInvoker.java:246) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.refreshInvoker(MigrationRuleHandler.java:76) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:60) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:249) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:546) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:516) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:498) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:80) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.refer(ProtocolSecurityWrapper.java:107) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:85) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:71) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:52) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.refer(InvokerCountWrapper.java:48) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.ReferenceConfig.createInvoker(ReferenceConfig.java:586) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:432) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:295) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:231) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.utils.SimpleReferenceCache.get(SimpleReferenceCache.java:132) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.lambda$referServices$6(DefaultModuleDeployer.java:409) ~[dubbo-3.2.0.jar:3.2.0]
at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4780) ~[?:?]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.referServices(DefaultModuleDeployer.java:389) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:170) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:142) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:113) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:102) ~[dubbo-3.2.0.jar:3.2.0]
at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:47) ~[dubbo-3.2.0.jar:3.2.0]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:940) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.27.jar:5.3.27]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.14.jar:2.6.14]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) ~[spring-boot-2.6.14.jar:2.6.14]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:423) ~[spring-boot-2.6.14.jar:2.6.14]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.6.14.jar:2.6.14]
```
However, application can start successfully, but prints stacktrace as above.
The key reason is that `javax.ws.rs.Path` may be not exists.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] Dubbo java.lang.NullPointerException when starting the application [dubbo]
Posted by "CrazyHZM (via GitHub)" <gi...@apache.org>.
CrazyHZM closed issue #12292: Dubbo java.lang.NullPointerException when starting the application
URL: https://github.com/apache/dubbo/issues/12292
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org