I just setup a basic DXA Webapp 2.0.0 trying to get data from microservices hooked up with SDL Web 8.5 and I am trying to run it but I get a Null Pointer Exception. The DXA components were installed on the CM and all the necessary files have been published too.
Also, the CM is installed on a Windows machine and the microservices are on a Linux box.
I do see the Webapp is making a request with a URL to the content service, one with V2 and the other with V4. When I try to hit the URL with V2 in my browser it results in no resource found
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code></code>
<message xml:lang="en-US">Unable to build binary entry: No resource was found for the requested item</message>
</error>
But when I hit the v4 URL, I actually get data.
<metadata:value xmlns:data="http://docs.oasis-open.org/odata/ns/data" xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata" metadata:context="http://hostname:18081/client/v4/content.svc/$metadata#Edm.String">
{"CLASSNAME":"ComponentMetaImpl","INSTANCE":{"schemaId":7818,"isMultimedia":true,"namespaceId":1,"id":7819,"type":16,"publicationId":123,"owningPublicationId":2,"majorVersion":1,"minorVersion":0,"title":"Core","modificationDate":"2018-05-22 14:26:34.000","initialPublicationDate":"2018-05-24 11:35:54.032","lastPublicationDate":"2018-05-29 12:39:03.737","creationDate":"2018-05-22 14:26:34.000","categories":[],"author":"ABC\\user1","customMeta":{"name":"custom-meta","nameValues":{},"children":{}},"loadCustomMetas":false}}
</metadata:value>
and the URL for V4 is http://hostname:18081/client/v4/content.svc/GetComponentMetaFunctionImport(ComponentId=7819,PublicationId=123)
The publication id is 123 and the Component it is trying to get is 7819, which is the Core component.
NOTE: When I try it on a different instance of SDL Web 8.5, both the requests work.
Can someone help me as to why I am not able to hit the V2 URL in the above instance? And if that might be the issue why I am getting a Null Pointer Exception in the DXA Webapp?