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

MetarDecoder: EDEX - null - Unable to decode METAR/SPECI #277

Open
mjames-upc opened this issue Jan 29, 2019 · 1 comment
Open

MetarDecoder: EDEX - null - Unable to decode METAR/SPECI #277

mjames-upc opened this issue Jan 29, 2019 · 1 comment

Comments

@mjames-upc
Copy link
Member

ERROR 2019-01-29 23:56:12,368 3393 [Ingest.obs-1] MetarDecoder: EDEX - null - Unable to decode METAR/SPECI
java.util.IllegalFormatConversionException: Y != java.lang.String
        at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) ~[na:1.8.0_101]
        at java.util.Formatter$FormatSpecifier.printDateTime(Formatter.java:2835) ~[na:1.8.0_101]
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:2740) ~[na:1.8.0_101]
        at java.util.Formatter.format(Formatter.java:2526) ~[na:1.8.0_101]
        at java.util.Formatter.format(Formatter.java:2455) ~[na:1.8.0_101]
        at java.lang.String.format(String.java:2940) ~[na:1.8.0_101]
        at com.raytheon.edex.plugin.obs.metar.MetarDecoder.decode(MetarDecoder.java:848) ~[com.raytheon.edex.plugin.obs.jar:na]
        at com.raytheon.edex.plugin.obs.ObsDecoder.decode(ObsDecoder.java:89) [com.raytheon.edex.plugin.obs.jar:na]
        at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
        at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:458) [camel-core-2.18.3.jar:2.18.3]

@jrkorman
Copy link

jrkorman commented Aug 31, 2021

Looks like the problem may be the format statement at
com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java:848

String dt = String .format("%d hour precip reported from %s at %2$tY%2$tm%2$td %2$tH%2$tM", obsHr, record.getStationId(), record.getTimeObs());

Note that the date/time format is looking for the 2nd data item and should be using the 3rd item "record.getTimeObs()"

The format statement should read %d hour precip reported from %s at %3$tY%3$tm%3$td %3$tH%3$tM

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

No branches or pull requests

2 participants