Skip to content

Conversation

spencergibb
Copy link
Member

RSocket supports transports that do not require networking (rsocket-local-transport). As such, when I implementated RSocketServerFactory and RSocketServer, I returned null for RSocketServer.address() which leads to the exception below.

Caused by: java.lang.NullPointerException
	at org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer$Listener.onApplicationEvent(RSocketPortInfoApplicationContextInitializer.java:66)
	at org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer$Listener.onApplicationEvent(RSocketPortInfoApplicationContextInitializer.java:54)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:203)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:196)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:161)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:426)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
	at org.springframework.boot.rsocket.context.RSocketServerBootstrap.start(RSocketServerBootstrap.java:53)
	at io.rsocket.routing.broker.spring.BrokerAutoConfiguration$BrokerRSocketServerBootstrap.start(BrokerAutoConfiguration.java:274)
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
	... 103 more

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 26, 2020
@philwebb philwebb changed the title Checks that RSocketServer.address() is not null before setting property. RSocketPortInfoApplicationContextInitializer can throw NPE Aug 26, 2020
@philwebb philwebb added this to the 2.2.x milestone Aug 26, 2020
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 26, 2020
@wilkinsona wilkinsona self-assigned this Aug 26, 2020
@wilkinsona wilkinsona modified the milestones: 2.2.x, 2.2.10 Aug 26, 2020
@wilkinsona
Copy link
Member

Thanks, @spencergibb!

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

Successfully merging this pull request may close these issues.

4 participants