cancel
Showing results for 
Search instead for 
Did you mean: 

com.sap.cloud.sdk.quality.FileWritingODataQueryListener ERROR on SCP?

0 Kudos

Hi experts,

I created java application odata get call and when running the following code on local server(tomcat 8),

a file is created called /s4hana_pipeline/reports/service_audits/odata-audit_XXXXXXXX.log.

List<BSEG> bseg = service.getAllBSEG().filter(BSEG.BELNR.eq("XXXXXX")).execute(destination2);

But, after I deployed java on SCP,

although java application is successfully run, there was an error that cannot be created above file.

May be there is no access to write file on SCP, but actually I don't want to create the log file that have been generated from above code.

Is there a way not to create the log file or can someone know why that log file is created?

Best Regards,

Shine Zaw

Accepted Solutions (1)

Accepted Solutions (1)

mkuhr-test
Advisor
Advisor

This is fixed in version 3.25.0 which is available now on Maven Central.

Answers (2)

Answers (2)

0 Kudos

Hi Matthias and Kavitha,

Sorry for my late reply.

I have been using version 3.25.0 and no error occured after version update.

Thank you so much for fixing error and reply.

Thanks and best regards,

Shine Zaw

cschubert
Participant
0 Kudos

Edit:

Hi Shine,

I just had a deeper look into our code/dependency-tree and saw, that our odata-core module depends (accidentially) on the odata-querylistener.

As this cannot easily be fixed from your side at the moment, the only workaround would be to set the log level for the com.sap.cloud.sdk.quality package to none, following for example this guide here: https://sap.github.io/cloud-sdk/docs/java/guides/logging-overview/#sap-cloud-sdk-tomee-archetype-clo...

We are looking into this issue and will update this answer once we came up with a solution.

Sorry for the inconveniences!

Greetings
Chris

---------------------

Hi Shine,

the ODataQueryListener is part of the

com.sap.cloud.sdk.quality:odata-querylistener

module, that is part of the SAP Cloud SDK.
If at all, this should only be excluded with scope test, so it should never run on SCP.

In general this module should actually not be used "manually", but is leveraged as part of the Pipeline.
There it will get automatically added as part of the integration test to check OData calls.

I hope this helps!

Greetings
Chris

0 Kudos

Hi Christoph Schubert,

Thank you for you answer and I will looking for the answer for this issue.

Before that, I would like to confirm about setting of log level.

For log level, I think what you have provided is for Cloud foundry , but I would like to know is for SCP neo.

Can you please provide for the setting of log level for SCP neo?

And moreover, before there is a solution for the issue, I am thinking of using ODataQueryBuilder instead of using above code.

Is there a sample for ODataQueryBuilder that can use for odata get call?

Sorry for asking you so many questions, I am quite new for development of scp odata call.

Thanks and Best regards,

Shine Zaw

cschubert
Participant
0 Kudos

Hi Shine,

Then welcome to the "Team"! 😃

I'm not really familiar with Neo, but based on the following link it looks like you set the log level via the cockpit: https://help.sap.com/viewer/f88a032109f0429caea276fc6e3a95f9/Cloud/en-US/2555df65182c4b09a25e56fa3b5...

Regarding the ODataQueryBuilder: There are basically two kind of SDKs, providing different level of convenience for different use cases.
The SAP Cloud Platform SDK for Service Development (in the following "Service SDK") provides features to provide your own OData Services as well as String based consumption of OData Services.
The SAP Cloud SDK (my team/the tag that you used) builds on top of the Service SDK and provides a typesafe way to access OData Services.

I'm not able to find any examples of the Service SDK, but would anyway strongly encourage you to look into whether the SAP Cloud SDK already fits for your use case.

Greetings
Chris

0 Kudos

Hi Christoph Schubert,

Sorry for late reply.

Thank you so much for your help.

I will try to configure log level for SCP neo.

Although there is no example for OdataQueryBuilder, thank you for the explanations.

I will looking forward about the solution for the issue.

Thanks and Best Regards,

Shine Zaw

ksivakumar
Explorer

Hi Shine,

This issue is fixed and the fix would be available in the upcoming SAP Cloud SDK 3.25.0 release.

Regards,

Kavitha