spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

ChatClientInputContentObservationFilter no such class

Open OptimusMX opened this issue 1 year ago • 4 comments

Caused by: java.lang.ClassNotFoundException: org.springframework.ai.chat.client.observation.ChatClientInputContentObservationFilter at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[na:na]

OptimusMX avatar Aug 17 '25 03:08 OptimusMX

Please provide a more specific code snippet that reproduces the problem, and the version of the framework you are currently using

sunyuhan1998 avatar Aug 18 '25 09:08 sunyuhan1998

Please provide a more specific code snippet that reproduces the problem, and the version of the framework you are currently using

Thank you, the issue has been resolved. It was caused by mismatched versions of two dependencies

OptimusMX avatar Aug 18 '25 10:08 OptimusMX

may I ask what is the two dependencies specifically in your case?

Reeseee avatar Sep 17 '25 05:09 Reeseee

I have a similar issue with Spring 3.4.12 and Spring AI 1.1.2. The application fails to start.

java.lang.IllegalStateException: Error processing condition on org.springframework.ai.autoconfigure.chat.client.ChatClientAutoConfiguration.chatClientBuilder at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-3.4.12.jar:3.4.12] . . . Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.ai.autoconfigure.chat.client.ChatClientAutoConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@38cccef] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-6.2.14.jar:6.2.14] . . . Caused by: java.lang.NoClassDefFoundError: org/springframework/ai/chat/client/observation/ChatClientInputContentObservationFilter . . . Caused by: java.lang.ClassNotFoundException: org.springframework.ai.chat.client.observation.ChatClientInputContentObservationFilter

kag-78 avatar Dec 17 '25 15:12 kag-78