NullPointerException when using Offset Tracking

Thanks for your reply.This problem has been bothering me for days.
Specific problems:I encountered this exception after starting SNAP (before any operations).
java.util.ServiceConfigurationError: javax.xml.stream.XMLInputFactory: Provider com.ctc.wstx.stax.WstxInputFactory not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
at java.util.ServiceLoader$LazyIterator.access$700(ServiceLoader.java:323)
at java.util.ServiceLoader$LazyIterator$2.run(ServiceLoader.java:407)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:409)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at javax.xml.stream.FactoryFinder$1.run(FactoryFinder.java:353)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:341)
Caused: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLInputFactory cannot be created
at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:367)
Caused: javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLInputFactory cannot be created
at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:370)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:313)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:227)
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:154)
at gov.nasa.worldwind.util.WWXML.openEventReaderStream(WWXML.java:353)
at gov.nasa.worldwind.util.WWXML.openEventReader(WWXML.java:502)
at gov.nasa.worldwind.util.WWXML.openEventReader(WWXML.java:464)
at gov.nasa.worldwind.ogc.OGCCapabilities.createReader(OGCCapabilities.java:89)
at gov.nasa.worldwind.ogc.OGCCapabilities.(OGCCapabilities.java:70)
at gov.nasa.worldwind.ogc.wms.WMSCapabilities.(WMSCapabilities.java:71)
at gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor.handleWMSCapabilitiesContent(SessionCacheRetrievalPostProcessor.java:248)
at gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor.handleContent(SessionCacheRetrievalPostProcessor.java:238)
at gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor.onRetrievalSuceeded(SessionCacheRetrievalPostProcessor.java:193)
at gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor.run(SessionCacheRetrievalPostProcessor.java:177)
at gov.nasa.worldwind.retrieve.URLRetriever.end(URLRetriever.java:352)
at gov.nasa.worldwind.retrieve.URLRetriever.call(URLRetriever.java:280)
at gov.nasa.worldwind.retrieve.URLRetriever.call(URLRetriever.java:27)
at gov.nasa.worldwind.util.SessionCacheUtils.retrieveSessionData(SessionCacheUtils.java:80)
at gov.nasa.worldwind.util.SessionCacheUtils.getOrRetrieveSessionCapabilities(SessionCacheUtils.java:170)
at gov.nasa.worldwind.layers.BasicTiledImageLayer.retrieveResources(BasicTiledImageLayer.java:723)
at gov.nasa.worldwind.layers.BasicTiledImageLayer$2.run(BasicTiledImageLayer.java:811)
[catch] at java.lang.Thread.run(Thread.java:748)

That’s why @gnwiii said sometimes the world view is empty. You can ignore this error as long your world view is working. Nothing else should be affected. This issue has been reported before: After update: Provider com.ctc.wstx.stax.WstxInputFactory not found - snap / Problem Reports - STEP Forum …

I am having the same problem as was reported here: Offset Tracking (ERS)
I have successfully applied the orbit files and DEM-assisted co-registration. When I attempt to run offset tracking on the co-registered stack, I get the error message “A problem occurred during the target product initialisation.
Type: OperatorException
Message: java.lang.NullPointerException”
java.lang.NullPointerException
at org.esa.s1tbx.insar.gpf.OffsetTrackingOp.getSourceBand(OffsetTrackingOp.java:299)
at org.esa.s1tbx.insar.gpf.OffsetTrackingOp.getMasterSlaveBands(OffsetTrackingOp.java:280)
at org.esa.s1tbx.insar.gpf.OffsetTrackingOp.initialize(OffsetTrackingOp.java:229)
Caused: org.esa.snap.core.gpf.OperatorException
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:432)
at org.esa.s1tbx.insar.gpf.OffsetTrackingOp.initialize(OffsetTrackingOp.java:240)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:333)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:308)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:287)
at org.esa.snap.graphbuilder.rcp.dialogs.SingleOperatorDialog.createTargetProduct(SingleOperatorDialog.java:175)
[catch] at org.esa.snap.graphbuilder.rcp.dialogs.SingleOperatorDialog.onApply(SingleOperatorDialog.java:287)
at org.esa.snap.ui.AbstractDialog.lambda$initUI$6(AbstractDialog.java:519)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I think these two problems are related, but I don’t know how to solve them. Could you please help me?

Hello,

I’ve moved this into the S1 category. Here it fits better.

The issue regarding the WstxInputFactory can be ignored. It is not harmful.

The issue with the OffsetTrackingOp is a problem.

It seems the bands you are using do not have unit information attached.
This should be considered by the operator and show an appropriate error message.

You haven’t said what kind of data you are using.
Maybe you can simply add this information to work around this problem.
Expected units are amplitude and intensity.

For this problem I have created a ticket:
[SITBX-909] OffsetTrackingOp fails if bands do not contain unit information - JIRA (atlassian.net)

1 Like

Thanks for your reply.

I’m using :
S1A_IW_GRDH_1SDV_20220120T113327_20220120T113352_041544_04F0CF_0970
S1A_IW_GRDH_1SDV_20220201T113326_20220201T113351_041719_04F6CE_7078

I operate SNAP on Windows.I don’t know how to add amplitude and intensity information.

For this ticket:
https://senbox.atlassian.net/browse/SITBX-909

The units should be checked if they are null before using them.

if (band.getUnit().contains(Unit.AMPLITUDE) || band.getUnit().contains(Unit.INTENSITY)) {
return band;
}`

In which file should the content be copied .Or Where to check it?

For an S1 product the unit should be there.
You can enter unit information in SNAP in the properties dialog:

Thanks for your reply.It’s useful to me.

I downloaded the original image amplitude and intensity in the properties dialog.

How can I add the correct value.Or need to replace image for other periods?

The images I downloaded at other times were also displayed the same way.

S1A_IW_GRDH_1SDV_20180105T113303_20180105T113328_020019_0221A7_17E1
S1A_IW_GRDH_1SDV_20180117T113302_20180117T113327_020194_02273A_1934

That’s strange. The values are actually okay.

@lveci Can you have a look at this?