We're updating the issue view to help you get more done. 

Ncml_handler fails when ascii data (or a server function result) is requested for renamed variables.

Description

Given a simple ncml file that changes the name of a variable:

1 2 3 4 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <netcdf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="/ugrids/test4.nc"> <variable name="rangeData" orgName="nodedata" shape="node" type="float"/> </netcdf>

When I issue the following BES request using 'besstandalone':

1 2 3 4 5 6 7 8 9 10 11 12 13 14 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <bes:request xmlns:bes="http://xml.opendap.org/ns/bes/1.0#" reqID="[http-8080-1:24:fvcom_1step.nc]"> <bes:setContext name="xdap_accept">2.0</bes:setContext> <bes:setContext name="dap_explicit_containers">no</bes:setContext> <bes:setContext name="errors">xml</bes:setContext> <bes:setContext name="max_response_size">0</bes:setContext> <bes:setContainer name="catalogContainer" space="catalog">/ugrids/test4-rename-nodedata.ncml</bes:setContainer> <bes:define name="d1" space="default"> <bes:container name="catalogContainer"> <bes:constraint>rangeData</bes:constraint> </bes:container> </bes:define> <bes:get type="dods" definition="d1" returnAs="ascii" /> </bes:request>

I get back this error:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Dataset: test4-rename-nodedata.ncml rangeData, <?xml version="1.0" encoding="ISO-8859-1"?> <response reqID="[http-8080-1:24:foofoofoo]" xmlns="http://xml.opendap.org/ns/bes/1.0#"> <getAscii> <BESError> <Type>2</Type> <Message>libdap exception building response: error_code = 1002: Failed to get values as ascii: An internal error was encountered in Float64.cc at line 163: The incoming pointer does not contain any data. Please report this to support@opendap.org </Message> <Administrator>admin.email.address@your.domain.name</Administrator> </BESError> </getAscii> </response> BES server 18270: Status not OK, dispatcher returned value 2

Please note that at the beginning and the end of the error response we see character content that appears to be leaking into the response from somewhere in the BES.

Environment

None

Status

Assignee

Slav Korolev

Reporter

Nathan Potter

Labels

None

Fix versions

None

Story Points

None

Time tracking

0m

Epic Link

Priority

High