Exception using docling-serve-client
Hi I created the example of the website Getting Started in a simple vanilla Java project using only the following dependency:
<dependencies>
<dependency>
<groupId>ai.docling</groupId>
<artifactId>docling-serve-client</artifactId>
<version>0.5.1</version>
</dependency>
</dependencies>
But when I run it, I get the following exception. My question here (should we provide one), and if not, could we make the exception message like in Quarkus, which gives you the final solution by, for example, providing the coordinates?
Exception in thread "main" java.lang.IllegalStateException: Neither Jackson 2 or 3 is on the classpath
at ai.docling.serve.client.DoclingServeClientBuilderFactory.newBuilder(DoclingServeClientBuilderFactory.java:49)
at ai.docling.serve.client.DoclingServeClientBuilderFactory.newBuilder(DoclingServeClientBuilderFactory.java:70)
at ai.docling.serve.client.DoclingServeClientBuilderFactory.getBuilder(DoclingServeClientBuilderFactory.java:75)
at ai.docling.serve.api.DoclingServeApi.builder(DoclingServeApi.java:47)
at org.acme.MainApp.main(MainApp.java:15)
This is a good idea!
So we can't provide the dependency with docling because we support both and we don't want to force one over the other, but we surely can make the error message better.
If you're using the quarkus docling extension then you will never run into this issue since it forces the correct dependency (because Quarkus forces it).
🎉 This issue has been resolved in v0.5.2 (Release Notes)