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

NullPointerException in CdmDatasetFactory.processVectors #158

Open
sharon-tickell opened this issue Nov 9, 2023 · 1 comment · May be fixed by #159
Open

NullPointerException in CdmDatasetFactory.processVectors #158

sharon-tickell opened this issue Nov 9, 2023 · 1 comment · May be fixed by #159

Comments

@sharon-tickell
Copy link

I'm working with the opendap/hyrax_ncwms:1.16.8 docker image, which includes a version of ncwms2 that uses edal-java v1.5.2.

When I request the ncWMS2 capabilities for a dynamic dataset that is an output from our oceanography model, I get a NullPointerException at the call to CdmDatasetFactory.processVectors. The log results look like:

hyrax_ncwms  | uk.ac.rdg.resc.edal.exceptions.EdalException: Problem creating dataset lds/path/to/out_simple.nc at http://localhost:8080/opendap//path/to/out_simple.nc
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory.createDataset(CdmDatasetFactory.java:133)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory.createDataset(CdmDatasetFactory.java:81)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory.createDataset(CdmDatasetFactory.java:75)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.ncwms.NcwmsCatalogue.getDatasetFromId(NcwmsCatalogue.java:222)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.wms.WmsServlet.getCapabilities(WmsServlet.java:688)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.wms.WmsServlet.dispatchWmsRequest(WmsServlet.java:370)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.ncwms.NcwmsServlet.dispatchWmsRequest(NcwmsServlet.java:212)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.wms.WmsServlet.doGet(WmsServlet.java:303)
hyrax_ncwms  |  at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
hyrax_ncwms  |  at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
hyrax_ncwms  |  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
hyrax_ncwms  |  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
hyrax_ncwms  |  at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:168)
hyrax_ncwms  |  at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:233)
hyrax_ncwms  |  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
hyrax_ncwms  |  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
hyrax_ncwms  |  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
hyrax_ncwms  |  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
hyrax_ncwms  |  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
hyrax_ncwms  |  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
hyrax_ncwms  |  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
hyrax_ncwms  |  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
hyrax_ncwms  |  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
hyrax_ncwms  |  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
hyrax_ncwms  |  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
hyrax_ncwms  |  at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)
hyrax_ncwms  |  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
hyrax_ncwms  |  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
hyrax_ncwms  |  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
hyrax_ncwms  |  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
hyrax_ncwms  |  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
hyrax_ncwms  |  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
hyrax_ncwms  |  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
hyrax_ncwms  |  at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
hyrax_ncwms  |  at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
hyrax_ncwms  |  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
hyrax_ncwms  |  at java.base/java.lang.Thread.run(Thread.java:829)
hyrax_ncwms  | Caused by: java.lang.NullPointerException
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory.processVectors(CdmDatasetFactory.java:308)
hyrax_ncwms  |  at uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory.createDataset(CdmDatasetFactory.java:104)
hyrax_ncwms  |  ... 36 more

Investigations show that the exception is being generated at this line:


because vectorInfo is quite properly null for any of the non-vector variables that loop has looked up vectorInfo for.

@sharon-tickell
Copy link
Author

sharon-tickell commented Nov 9, 2023

Submitted PR #159 as a proposed fix for this issue

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