Not able to consume SAP OData service in mendix using GetList action of microflow. All the destination details, username & password details are correct. - Mendix Forum

Not able to consume SAP OData service in mendix using GetList action of microflow. All the destination details, username & password details are correct.

0

Not able to consume SAP OData service in mendix using "GetList" action of microflow. All the destination details, username & password details are correct. Getting the below error while running the application locally “An error has occurred while handling the request. [User 'Anonymous_e544fe18-67a6-44b2-be46-f7aa708af61c' with session id 'a1a9eaae-XXXX-XXXX-XXXX-XXXXXXXXe89b' and roles 'Administrator']

The detailed error message listed below. Kindly suggest us on the solution.

com.mendix.webui.WebUIException: Exception while retrieving data for list widget 'SmartTaxModule.InvoiceNumberListFromSAP.grid1' on page 'SmartTaxModule.InvoiceNumberListFromSAP'
                at com.mendix.webui.actions.client.RetrieveByMicroflowAction.$anonfun$apply$2(RetrieveByMicroflowAction.scala:60)

Caused by: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.thirdparty.org.json.JSONException: JSONObject["xsuaa"] not found.
                at SAPODataConnector.GetDestinationInternal (JavaAction : 'ConsumeDestinationService')
                at {"name":"SAPODataConnector.GetDestination","type":"JavaAction"}
                at SmartTaxModule.ACT_GetInvoiceDetails (JavaAction : 'Get Destination')

Advanced stacktrace:
                at SmartTaxModule.ACT_GetInvoiceDetails (JavaAction : 'Get Destination')

Advanced stacktrace:
                at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:389)

Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.thirdparty.org.json.JSONException: JSONObject["xsuaa"] not found.
                at SAPODataConnector.GetDestinationInternal (JavaAction : 'ConsumeDestinationService')
                at {"name":"SAPODataConnector.GetDestination","type":"JavaAction"}
                at SmartTaxModule.ACT_GetInvoiceDetails (JavaAction : 'Get Destination')”

asked
5 answers
0

I think you need to add a signed SAP certificate to your truststore within your Mendix environment. See below chapter 4 how to accomplish this: 

https://docs.mendix.com/developerportal/deploy/certificates

also: https://stackoverflow.com/questions/6908948/java-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find

 

answered
0

Hello Ruud,

We enabled advanced logging and also connected to the host from correct domain, and were able to see SSL Handshake exception. Please find below the error logs. 

“com.mendix.webui.WebUIException: Exception while retrieving data for list widget 'SmartTaxModule.InvoiceNumberListFromSAP.grid1' on page 'SmartTaxModule.InvoiceNumberListFromSAP'
                at com.mendix.webui.actions.client.RetrieveByMicroflowAction.$anonfun$apply$2(RetrieveByMicroflowAction.scala:60)

Caused by: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at SmartTaxModule.ACT_GetInvoiceDetails (JavaAction : 'Get list')”

Could you please let us know if we need to import the SSL certificate of the SAP Odata service into the Mendix modeller, so may be that can resolve the error ?

answered
0

I don’t know enough about the SAP ODATA connector, but it looks like the ODATA host is not available for some reason (e1d.siemens.com) ? Perhaps enable advanced logging so you can get a more detailed error log.

answered
0

Hello,

Thanks a lot for your response !

I was not using the SAP authentication in my current app, due to which i was getting the error “xsuaa” not found. I now deployed my current module into a SAP app and the above error message was not seen. Please find below the screen-shot of the datamodel and microflow:

I am now getting different error message. Please find below the log trace”

com.mendix.webui.WebUIException: Exception while retrieving data for list widget 'SmartTaxModule.InvoiceNumberListFromSAP.grid1' on page 'SmartTaxModule.InvoiceNumberListFromSAP'
    at com.mendix.webui.actions.client.RetrieveByMicroflowAction.$anonfun$apply$2(RetrieveByMicroflowAction.scala:60)

Caused by: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.net.UnknownHostException: e1d.siemens.com
    at SmartTaxModule.ACT_GetInvoiceDetails (JavaAction : 'Get list')”

answered
0

It seems that the stacktrace above is not related to the GET operation but to the widget (list) showing the data on your page. It looks like the required object ‘xsuaa’ is not available. Can you share the domainmodel and datasource microflow behind the listview?

answered