AbstractStreamProcess requires the addition of synchronization on process description to avoid race conditions between threads invoking getCurrentDescription().
Observed Error
2020-11-16 22:33:26.151 ERROR SOSService:478306e1 [EventBus-4] - Cannot generate offering urn:socom:sensor:uas:uas001-process
java.lang.IllegalArgumentException: Item 'FeatureDetectionOutput' already exists
at net.opengis.OgcPropertyList.checkName(OgcPropertyList.java:437)
at net.opengis.OgcPropertyList.add(OgcPropertyList.java:137)
at org.vast.sensorML.AbstractProcessImpl.addOutput(AbstractProcessImpl.java:529)
at org.sensorhub.impl.processing.AbstractStreamProcess.getCurrentDescription(AbstractStreamProcess.java:190)
at org.sensorhub.impl.service.sos.StreamDataProviderFactory.generateCapabilities(StreamDataProviderFactory.java:136)
at org.sensorhub.impl.service.sos.StreamWithStorageProviderFactory.generateCapabilities(StreamWithStorageProviderFactory.java:104)
at org.sensorhub.impl.service.sos.SOSServlet.generateCapabilities(SOSServlet.java:381)
at org.sensorhub.impl.service.sos.SOSServlet.showProviderCaps(SOSServlet.java:407)
at org.sensorhub.impl.service.sos.StreamWithStorageProviderFactory.handleEvent(StreamWithStorageProviderFactory.java:227)
at org.sensorhub.impl.common.AsyncEventHandler$ListenerQueue$1.run(AsyncEventHandler.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Issue
AbstractStreamProcess requires the addition of synchronization on process description to avoid race conditions between threads invoking getCurrentDescription().
Observed Error
2020-11-16 22:33:26.151 ERROR SOSService:478306e1 [EventBus-4] - Cannot generate offering urn:socom:sensor:uas:uas001-process java.lang.IllegalArgumentException: Item 'FeatureDetectionOutput' already exists at net.opengis.OgcPropertyList.checkName(OgcPropertyList.java:437) at net.opengis.OgcPropertyList.add(OgcPropertyList.java:137) at org.vast.sensorML.AbstractProcessImpl.addOutput(AbstractProcessImpl.java:529) at org.sensorhub.impl.processing.AbstractStreamProcess.getCurrentDescription(AbstractStreamProcess.java:190) at org.sensorhub.impl.service.sos.StreamDataProviderFactory.generateCapabilities(StreamDataProviderFactory.java:136) at org.sensorhub.impl.service.sos.StreamWithStorageProviderFactory.generateCapabilities(StreamWithStorageProviderFactory.java:104) at org.sensorhub.impl.service.sos.SOSServlet.generateCapabilities(SOSServlet.java:381) at org.sensorhub.impl.service.sos.SOSServlet.showProviderCaps(SOSServlet.java:407) at org.sensorhub.impl.service.sos.StreamWithStorageProviderFactory.handleEvent(StreamWithStorageProviderFactory.java:227) at org.sensorhub.impl.common.AsyncEventHandler$ListenerQueue$1.run(AsyncEventHandler.java:91) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)