Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the Query Specification results in 400 BAD REQUEST

svered
Member
0 Kudos
211
  • SAP Managed Tags:

Hello,

We encountered the issue when the query was being updated using the API call PUT /documents/<documentID>/dataproviders/<dataProviderID>/specification (https://help.sap.com/docs/SAP_BUSINESSOBJECTS_WEB_INTELLIGENCE/58f583a7643e48cf944cf554eb961f5b/ec565c866fdb101497906a7cb0e91070.html?version=4.2).

From the logs, we can see that it tried to add 259 universe items to data provider but not sure why it failed. Below is the XML payload and the error:

2023-10-05 08:36:33,821 [http-nio-8080-exec-1] DEBUG SapBoApiRequest - Adding 260 universe items to data provider DP0 for lineage of universe AMart.unx [AZtoKrxc4TJFuzsvQqBgEEE] on document 6948130...

2023-10-05 08:36:33,830 [http-nio-8080-exec-1] TRACE org.springframework.web.reactive.function.client.ExchangeFunctions - [15b2c73d] HTTP PUT http://abc.ad.global:8080/biprws/raylight/v1/documents/6948130/dataproviders/DP0/specification, headers={masked}

2023-10-05 08:36:33,831 [reactor-http-nio-4] DEBUG reactor.netty.resources.PooledConnectionProvider - [ba9b8447, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] Channel acquired, now: 1 active connections, 0 inactive connections and 0 pending acquire requests.

2023-10-05 08:36:33,831 [reactor-http-nio-4] DEBUG reactor.netty.http.client.HttpClientConnect - [ba9b8447-60, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] Handler is being applied: {uri=http://abc.ad.global:8080/biprws/raylight/v1/documents/6948130/dataproviders/DP0/specification, method=PUT}

2023-10-05 08:36:33,831 [reactor-http-nio-4] DEBUG reactor.netty.resources.DefaultPooledConnectionProvider - [ba9b8447-60, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] onStateChange(PUT{uri=/biprws/raylight/v1/documents/6948130/dataproviders/DP0/specification, connection=PooledConnection{channel=[id: 0xba9b8447, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080]}}, [request_prepared])

2023-10-05 08:36:33,832 [reactor-http-nio-4] TRACE org.springframework.core.codec.CharSequenceEncoder - [15b2c73d] Writing "<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<queryspec:QuerySpec xmlns:queryspec="http://com.sap.sl.queryspec" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

dataProviderId="DP0">

<queryParameters>

<duplicatedRowsProperty activated="true" value="true"/>

<maxRetrievalTimeInSecondsProperty value="300"/>

<maxRowsRetrievedProperty value="90000"/>

<removeEmptyRowsProperty activated="true" value="true"/>

<allowOtherUserToEditQueryProperty activated="true" value="true"/>

<resetContextOnRefreshProperty activated="true" value="true"/>

<stripQueryProperty/>

<useBexQueryDefaultValue activated="true" value="true"/>

</queryParameters>

<queriesTree xsi:type="queryspec:QueryDataNode">

<bOQuery identifier="fece5029-5cf6-4250-8d08-b758066b7a4b" name="Query">

<resultObjects identifier="DS0.e02df58c-c5ca-43cc-998a-2f0f9240babc" name="Amount"/>

<resultObjects identifier="DS0._b9KNiaMUEeOcT_h2pwZfdh" name="Code"/>

<resultObjects identifier="DS0._VuQ5kKadEeKn0cDgIotiye" name="DayOfMonth"/>

<resultObjects identifier="DS0._5zzi0HupEe2v3Z4PBaxihf" name="Id"/>

<resultObjects identifier="DS0.0f3fb00f-1a3a-474f-b0cf-00b032f0a624" name="S Type"/>

<resultObjects identifier="DS0.862aa0f2-dabb-4fe8-9bc8-393365ed6642" name="S T Code"/>

<!-- There are 253 more resultObjects in the log that are not listed here -->

</queriesTree>

<propertyBag key="DUPLICATED_ROWS_UNDEFINED_VALUE" value="-1"/>

<propertyBag key="RESET_CONTEXT_ON_REFRESH_UNDEFINED_VALUE" value="-1"/>

<propertyBag key="ALLOW_THE_USER_TO_EDIT_QUERY_UNDEFINED_VALUE" value="-1"/>

</queryspec:QuerySpec>"

2023-10-05 08:36:33,834 [reactor-http-nio-4] DEBUG reactor.netty.resources.DefaultPooledConnectionProvider - [ba9b8447-60, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] onStateChange(PUT{uri=/biprws/raylight/v1/documents/6948130/dataproviders/DP0/specification, connection=PooledConnection{channel=[id: 0xba9b8447, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080]}}, [request_sent])

2023-10-05 08:36:33,978 [reactor-http-nio-4] DEBUG reactor.netty.http.client.HttpClientOperations - [ba9b8447-60, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] Received response (auto-read:false) : RESPONSE(decodeResult: success, version: HTTP/1.1)

HTTP/1.1 400

Date: <filtered>

Content-Type: <filtered>

Connection: <filtered>

content-length: <filtered>

2023-10-05 08:36:33,978 [reactor-http-nio-4] DEBUG reactor.netty.resources.DefaultPooledConnectionProvider - [ba9b8447-60, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] onStateChange(PUT{uri=/biprws/raylight/v1/documents/6948130/dataproviders/DP0/specification, connection=PooledConnection{channel=[id: 0xba9b8447, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080]}}, [response_received])

2023-10-05 08:36:33,978 [reactor-http-nio-4] TRACE org.springframework.web.reactive.function.client.ExchangeFunctions - [15b2c73d] [ba9b8447-60, L:/10.23.104.23:53854 -

R:abc.ad.global/10.23.104.12:8080] Response 400 BAD_REQUEST, headers={masked}

2023-10-05 08:36:33,979 [reactor-http-nio-4] DEBUG SapBoApiRequestUtil - HTTP PUT universe items in data provider response received with status code 400 BAD_REQUEST

2023-10-05 08:36:33,980 [reactor-http-nio-4] DEBUG reactor.netty.channel.FluxReceive - [ba9b8447-60, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080] FluxReceive{pending=0, cancelled=false, inboundDone=false, inboundError=null}: subscribing inbound receiver

2023-10-05 08:36:33,980 [reactor-http-nio-4] DEBUG reactor.netty.http.client.HttpClientOperations - [ba9b8447-60, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080] Received last HTTP packet

2023-10-05 08:36:33,980 [reactor-http-nio-4] TRACE reactor.netty.channel.ChannelOperations - [ba9b8447, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080] Disposing ChannelOperation from a channel

java.lang.Exception: ChannelOperation terminal stack

at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:465) ~[reactor-netty-core-1.0.24.jar:1.0.24]

at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:702) ~[reactor-netty-http-1.0.24.jar:1.0.24]

at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:113) ~[reactor-netty-core-1.0.24.jar:1.0.24]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.84.Final.jar:4.1.84.Final]

at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.84.Final.jar:4.1.84.Final]

at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.84.Final.jar:4.1.84.Final]

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.84.Final.jar:4.1.84.Final]

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.84.Final.jar:4.1.84.Final]

at java.lang.Thread.run(Thread.java:833) ~[?:?]

2023-10-05 08:36:33,981 [reactor-http-nio-4] TRACE org.springframework.core.codec.StringDecoder - [15b2c73d] [ba9b8447-60, L:/10.23.104.23:53854 - R:abc.ad.global/10.23.104.12:8080] Decoded "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<error>

<error_code>WSR 00102</error_code>

<message>You do not have sufficient rights to refresh the query. Some objects are not available to your user profile. Contact your administrator to request the necessary rights.</message>

</error>

Does anyone know if these payload fields cause the API call to fail? Or if there might be other reason for this error?

Thank you for reading my question.

1 REPLY 1

anne-petteroe
Community Manager
Community Manager
0 Kudos
189
  • SAP Managed Tags:

Hello Svetlana,

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members.

Feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will also help you when preparing questions for the community.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage your readers to respond.

Kind regards,
Anne