Open
Description
Current Behavior
The generation of the Runtime DTO fails on line
This is because the service is manually registered, and so the ComponentContext has no service registration. The manual registration should be used instead, and the component context can be removed throughout, replacing it simply with a BundleContext
TEST org.osgi.test.cases.webservice.junit.EndpointRegistrationTests#testNotRegisterableEndpoint() <<< ERROR: Cannot invoke "org.osgi.framework.ServiceReference.adapt(java.lang.Class)" because the return value of "org.osgi.service.component.ComponentContext.getServiceReference()" is null
java.lang.NullPointerException: Cannot invoke "org.osgi.framework.ServiceReference.adapt(java.lang.Class)" because the return value of "org.osgi.service.component.ComponentContext.getServiceReference()" is null
at org.eclipse.osgi.technology.webservices.registrar.EndpointRegistrar.getRuntimeDTO(EndpointRegistrar.java:258)
at org.osgi.test.cases.webservice.junit.WebServiceRuntimeTracker.waitForChange(WebServiceRuntimeTracker.java:146)
at org.osgi.test.cases.webservice.junit.EndpointRegistrationTests.testNotRegisterableEndpoint(EndpointRegistrationTests.java:174)
Expected Behavior
It should be possible to call the getRuntimeDTO()
method without a NullPointerException being thrown.
Steps To Reproduce
All calls to this method will fail.
Version
1.0.0-SNAPSHOT
Are you interested in contributing a solution yourself?
Perhaps, but please help me
Anything else?
No response
Metadata
Metadata
Assignees
Labels
No labels