You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "NikoTung (via GitHub)" <gi...@apache.org> on 2023/04/20 16:02:10 UTC

[GitHub] [dubbo] NikoTung commented on issue #12122: NullPointException when requesting MetadataService on a injected Spring bean custom filter

NikoTung commented on issue #12122:
URL: https://github.com/apache/dubbo/issues/12122#issuecomment-1516586229

   No, I didn't want to do anything with `MetadataService`. I write a custom filter injected a Spring bean on provider side and the provider starts up normally, the bean was successfully injected to the filter (not null). Also I have a consumer, during start-up this consumer will make a `org.apache.dubbo.registry.client.metadata.MetadataServiceDelegation#getMetadataInfo` request to the provider, I think this is by-design to get provider meta data. When the request come to the provider, it will first invoke the custom filter. The problem is  that the Spring bean in the invoked custom filter is `null`, it only be `null` when the consumer request `org.apache.dubbo.registry.client.metadata.MetadataServiceDelegation#getMetadataInfo`. When I try to request our business interface this custom filter work as expected, no `NullPointException`.  Very time the consumer start up, it can reproduce. This is why I guest that the  custom filter instanced twice.
   
   @AlbumenJ You may check my demo [here](https://github.com/NikoTung/dubbo3-issue).
   
    


-- 
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