Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watsonx Orchestrate Logs issue #1229

Open
Vitals9367 opened this issue Nov 27, 2024 · 3 comments
Open

Watsonx Orchestrate Logs issue #1229

Vitals9367 opened this issue Nov 27, 2024 · 3 comments

Comments

@Vitals9367
Copy link

com.ibm.watsonOverview
We are fetching logs from WxO assistant and this is an error that some people are getting. It's inconsistent. Seems like it fails to parse log response from assistant.

We are wondering if this is a SDK issue or product returns invalid logs.

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.30.jar!/:na]
3602
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[tomcat-embed-core-10.1.30.jar!/:na]
3603
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.30.jar!/:na]
3604
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) ~[tomcat-embed-core-10.1.30.jar!/:na]
3605
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.30.jar!/:na]
3606
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.30.jar!/:na]
3607
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.30.jar!/:na]
3608
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:731) ~[tomcat-embed-core-10.1.30.jar!/:na]
3609
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) ~[tomcat-embed-core-10.1.30.jar!/:na]
3610
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384) ~[tomcat-embed-core-10.1.30.jar!/:na]
3611
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.30.jar!/:na]
3612
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905) ~[tomcat-embed-core-10.1.30.jar!/:na]
3613
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) ~[tomcat-embed-core-10.1.30.jar!/:na]
3614
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.30.jar!/:na]
3615
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) ~[tomcat-embed-core-10.1.30.jar!/:na]
3616
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.30.jar!/:na]
3617
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) ~[tomcat-embed-core-10.1.30.jar!/:na]
3618
at java.base/java.lang.Thread.run(Thread.java:1570) ~[na:na]
3619
Caused by: com.ibm.cloud.sdk.core.service.exception.InvalidServiceResponseException: Error processing the HTTP response
3620
at com.ibm.cloud.sdk.core.service.BaseService.processServiceCall(BaseService.java:524) ~[sdk-core-9.20.0.jar!/:na]
3621
at com.ibm.cloud.sdk.core.service.BaseService$IBMCloudSDKServiceCall.execute(BaseService.java:582) ~[sdk-core-9.20.0.jar!/:na]
3622
at com.ibm.dnb.chat.service.WatsonServiceImpl.getAllLogsDateTitle(WatsonServiceImpl.java:155) ~[!/:0.0.1-SNAPSHOT]
3623
... 165 common frames omitted
3624
Caused by: com.google.gson.JsonSyntaxException: java.io.IOException: The following error occurred while deserializing JSON object into discriminator class: com.ibm.watson.assistant.v2.model.RuntimeResponseGeneric
3625
at com.google.gson.Gson.fromJson(Gson.java:1241) ~[gson-2.10.1.jar!/:na]
3626
at com.google.gson.Gson.fromJson(Gson.java:1186) ~[gson-2.10.1.jar!/:na]
3627
at com.ibm.cloud.sdk.core.util.ResponseUtils.getValue(ResponseUtils.java:149) ~[sdk-core-9.20.0.jar!/:na]
3628
at com.ibm.cloud.sdk.core.util.ResponseConverterUtils$6.convert(ResponseConverterUtils.java:137) ~[sdk-core-9.20.0.jar!/:na]
3629
at com.ibm.cloud.sdk.core.service.BaseService.processServiceCall(BaseService.java:522) ~[sdk-core-9.20.0.jar!/:na]
3630
... 167 common frames omitted
3631
Caused by: java.io.IOException: The following error occurred while deserializing JSON object into discriminator class: com.ibm.watson.assistant.v2.model.RuntimeResponseGeneric
3632
at com.ibm.cloud.sdk.core.util.DiscriminatorBasedTypeAdapterFactory$Adapter.read(DiscriminatorBasedTypeAdapterFactory.java:256) ~[sdk-core-9.20.0.jar!/:na]
3633
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[gson-2.10.1.jar!/:na]
3634
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) ~[gson-2.10.1.jar!/:na]
3635
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) ~[gson-2.10.1.jar!/:na]
3636
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212) ~[gson-2.10.1.jar!/:na]
3637
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433) ~[gson-2.10.1.jar!/:na]
3638
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393) ~[gson-2.10.1.jar!/:na]
3639
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212) ~[gson-2.10.1.jar!/:na]
3640
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433) ~[gson-2.10.1.jar!/:na]
3641
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393) ~[gson-2.10.1.jar!/:na]
3642
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212) ~[gson-2.10.1.jar!/:na]
3643
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433) ~[gson-2.10.1.jar!/:na]
3644
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393) ~[gson-2.10.1.jar!/:na]
3645
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[gson-2.10.1.jar!/:na]
3646
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) ~[gson-2.10.1.jar!/:na]
3647
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) ~[gson-2.10.1.jar!/:na]
3648
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212) ~[gson-2.10.1.jar!/:na]
3649
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433) ~[gson-2.10.1.jar!/:na]
3650
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393) ~[gson-2.10.1.jar!/:na]
3651
at com.google.gson.Gson.fromJson(Gson.java:1227) ~[gson-2.10.1.jar!/:na]
3652
... 171 common frames omitted
3653
Caused by: java.io.IOException: Unable to determine implicit deserialization target class for discriminator value: button
3654
at com.ibm.cloud.sdk.core.util.DiscriminatorBasedTypeAdapterFactory$Adapter.getDeserTargetClass(DiscriminatorBasedTypeAdapterFactory.java:302) ~[sdk-core-9.20.0.jar!/:na]
3655
at com.ibm.cloud.sdk.core.util.DiscriminatorBasedTypeAdapterFactory$Adapter.read(DiscriminatorBasedTypeAdapterFactory.java:246) ~[sdk-core-9.20.0.jar!/:na]
3656
... 190 common frames omitted
3657

3658

How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
It's breaking and this return line.

ListLogsOptions options = new ListLogsOptions.Builder(env.getProperty("watson.assistant.id"))
	.sort("-request_timestamp")
	.filter(filter)
	.cursor(cursor)
	.pageLimit(400)
	.build();
return assistant.listLogs(options).execute().getResult();

SDK Version

<dependency>
	<groupId>com.ibm.watson</groupId>
	<artifactId>ibm-watson</artifactId>
	<version>13.0.0</version>
</dependency>
@apaparazzi0329
Copy link
Contributor

Is there any way you would be able to show me the log entry you are receiving that is not being parsed correctly? With it, I would be able to compare that entry with what the java sdk is expecting

@Vitals9367
Copy link
Author

Vitals9367 commented Dec 18, 2024

@apaparazzi0329 Sure, response from `/logs?version=2024-08-25&filter=response.context.global.system.user_id::608c87d3-17c6-423d-b0b5-cf97987a6900,request.input.text::!""&pageLimit=400&sort=-request_timestamp

response.json

@Vitals9367
Copy link
Author

Comment from IBM support:

It's because Assistant API returns the extra fields (properties) which are not defined inside the SDK https://github.com/watson-developer-cloud/java-sdk/blob/master/assistant/src/main/java/com/ibm/watson/assistant/v2/model/

Generally, there are three ways to resolve:

Assistant API: not to return non-defined fields
Watson Java SDK: define all existing fields
Watson Java SDK: set a flag to ignore unknown fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants