While i do not understand the error message itself, i would have a look at the rights of 'TempShipmentQueryLine' are you sure you have enough rights to write the attributes of that entity?
I fixed this in a lost hour, it should be in Mendix 5.9.0. It now doesn't assume a certain specific error (the type error) was thrown anymore but just shows you what's wrong. For security exceptions the case is different, some undetailed information is shown to the user but it also writes the actual exception to the server log.
I could not find a ticket by Samet on this topic. Note I didn't fix anything specific to non-persistent objects. The cases I found just happened when the string didn't fit into the string attribute or that the user didn't have security access to the attribute.