Document Intelligence exception when using Prebuilt tax document model tax.us.1099COMBO.2023 with Java SDK

Ben Graff 0 Reputation points
2024-09-12T15:57:24.7933333+00:00

Problem

When calling the prebuilt model tax.us.1099COMBO.2023 for consolidated tax statements I'm getting this exception when calling SyncPoller.getFinalResult();

Exception

java.util.concurrent.FutureTask@6a5880a0[Completed exceptionally: java.io.UncheckedIOException: java.io.IOException: java.time.format.DateTimeParseException: Text 'Various' could not be parsed at index 0]

Stack Trace

getResultWithTimeout:480,

ImplUtils (com.azure.core.implementation) pollingLoop:70,

PollingUtil (com.azure.core.util.polling) MyClass that calls getFinalResult()

Code to Reproduce

ExponentialBackoffOptions exponentialBackoffOptions = new ExponentialBackoffOptions()
                    .setMaxRetries(20) 
                    .setBaseDelay(Duration.ofMillis(5))
                    .setMaxDelay(Duration.ofSeconds(20));

RetryOptions retryOptions = new RetryOptions(exponentialBackoffOptions);

client = new DocumentIntelligenceClientBuilder()
          .credential(new AzureKeyCredential(apiKey))
          .endpoint(endpoint)
          .serviceVersion(DocumentIntelligenceServiceVersion.V2024_07_31_PREVIEW)
          .retryOptions(retryOptions)
          .buildClient();
  
SyncPoller<AnalyzeResultOperation, AnalyzeResult> analyzeDocumentPoller = client.beginAnalyzeDocument(
                    "tax.us.1099COMBO.2023", 
                    null,
                    null,
                    null,
                    null,
                    null,
                    null,
                    null,
                    new AnalyzeDocumentRequest().setBase64Source(fileData)
            );
AnalyzeResult analyzeDocumentResult = analyzeDocumentPoller.getFinalResult();        

imageimage

Expected/desired behavior

It should poll until the AnalyzeResult object is returned.

Versions

JRE: liberica-21

azure sdk client: com.azure/azure-ai-documentintelligence/1.0.0-beta.4

Other Information

I've tried mulitiple examples and it seems to be just the 1099combo model with this bug. 1099Int and 1099div samples did not throw this exception when passed into this combo model. No problem seems to occur when using the Document Intelligence Studio in the browser.

Here is a pdf of a 1099-consolidated statement with fake information that causes this exception:

Standard.Consolidated.pdf

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,666 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.