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

Fix npe in delete sensor #547

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

EHJ-52n
Copy link
Member

@EHJ-52n EHJ-52n commented Jun 6, 2017

Fixes:

2017-06-05 16:29:26,290 ERROR [http-nio-127.0.0.1-8080-exec-20] [SosEventBus.java:261] Error handling event SensorDeletion[request=org.n52.sos.request.DeleteSensorRequest[service=SOS, version=2.0.0, operation=DeleteSensor], response=org.n52.sos.response.DeleteSensorResponse[service=SOS, version=2.0.0]] by handler org.n52.sos.cache.ctrl.DefaultContentModificationListener@24a5d753
java.lang.NullPointerException: null
	at org.n52.sos.cache.InMemoryCacheImpl.removeFeaturesOfInterestForOffering(InMemoryCacheImpl.java:1363) ~[InMemoryCacheImpl.class:na]
	at org.n52.sos.cache.ctrl.action.SensorDeletionUpdate.execute(SensorDeletionUpdate.java:101) ~[SensorDeletionUpdate.class:na]
	at org.n52.sos.cache.ctrl.ContentCacheControllerImpl$PartialUpdate.execute(ContentCacheControllerImpl.java:254) ~[ContentCacheControllerImpl$PartialUpdate.class:na]
	at org.n52.sos.cache.ctrl.ContentCacheControllerImpl.executePartial(ContentCacheControllerImpl.java:146) ~[ContentCacheControllerImpl.class:na]
	at org.n52.sos.cache.ctrl.ContentCacheControllerImpl.update(ContentCacheControllerImpl.java:122) ~[ContentCacheControllerImpl.class:na]
	at org.n52.sos.cache.ctrl.DefaultContentModificationListener.handle(DefaultContentModificationListener.java:112) ~[DefaultContentModificationListener.class:na]
	at org.n52.sos.cache.ctrl.DefaultContentModificationListener.handle(DefaultContentModificationListener.java:94) ~[DefaultContentModificationListener.class:na]
	at org.n52.sos.event.SosEventBus$HandlerExecution.run(SosEventBus.java:259) ~[SosEventBus$HandlerExecution.class:na]
	at org.n52.sos.event.SosEventBus.submit(SosEventBus.java:162) [SosEventBus.class:na]
	at org.n52.sos.event.SosEventBus.fire(SosEventBus.java:70) [SosEventBus.class:na]
	at org.n52.sos.request.operator.SosDeleteSensorOperatorV20.receive(SosDeleteSensorOperatorV20.java:70) [SosDeleteSensorOperatorV20.class:na]
	at org.n52.sos.request.operator.SosDeleteSensorOperatorV20.receive(SosDeleteSensorOperatorV20.java:53) [SosDeleteSensorOperatorV20.class:na]
	at org.n52.sos.request.operator.AbstractRequestOperator.receiveRequest(AbstractRequestOperator.java:173) [AbstractRequestOperator.class:na]
	at org.n52.sos.request.operator.AbstractTransactionalRequestOperator.receiveRequest(AbstractTransactionalRequestOperator.java:68) [AbstractTransactionalRequestOperator.class:na]
	at org.n52.sos.service.operator.AbstractServiceOperator.receiveRequest(AbstractServiceOperator.java:61) [AbstractServiceOperator.class:na]
	at org.n52.sos.binding.PoxBinding.doPostOperation(PoxBinding.java:73) [PoxBinding.class:na]
	at org.n52.sos.service.SosService.doPost(SosService.java:140) [SosService.class:na]

@autermann
Copy link
Member

I think this may be a bigger issue... A NPE at this point would mean that featuresOfInterestForOfferings and offeringsForFeaturesOfInterest got out sync somehow... Both model one part of an n x n relation and when we remove a feature for an offering it should be guaranteed that there is matching offering for the feature...

Copy link
Member

@autermann autermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EHJ-52n
Copy link
Member Author

EHJ-52n commented Dec 13, 2017

So, your recommendation is to check the delete sensor workflow at all for race conditions or similar!?

@himanshusharma27
Copy link

I want to work on this issue . Please assign me this issue .

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

Successfully merging this pull request may close these issues.

4 participants