Hello, I just generated a camel spring boot application with the archetype and added the CamelValidationConfig class, but it is working as expected, I can see the bean being created without NoClassDefFoundError. I am afraid you are mixing different camel versions. can you try starting fresh using the archetype? for example, *mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-spring-boot -DarchetypeVersion=4.4.0 *
Greetings, Federico Il giorno gio 21 mar 2024 alle ore 01:01 Mitch Trachtenberg < mjt...@gmail.com> ha scritto: > Good day all, > > I'm at a loss as to running schema validation in 4.3.0. I tried (with > Gemini's help) adding a file like that below; notice that the > ValidatingProcessor is defined in > org.apache.camel.support.processor.validation.ValidatingProcessor: > > import org.apache.camel.CamelContext; > import org.apache.camel.support.processor.validation.ValidatingProcessor; > import org.springframework.beans.factory.annotation.Autowired; > import org.springframework.context.annotation.Bean; > import org.springframework.context.annotation.Configuration; > import java.io.File; > > @Configuration > public class CamelValidationConfig { > > @Autowired > private CamelContext camelContext; > > @Bean > public ValidatingProcessor validatingProcessor() { > ValidatingProcessor processor = new ValidatingProcessor(); > // Configure XSD schema as needed (see variations in the route > section below) > File schemaFile = new File("classpath:order.xsd"); > processor.setSchemaFile(schemaFile); > > return processor; > } > } > > But when I add camel-validator to my pom, I get a complaint: > Exception in thread "main" java.lang.IllegalStateException: > java.lang.NoClassDefFoundError: > org/apache/camel/support/SingleInputLanguageSupport > > Any suggestions? I've tried adding camel-support, but I really have no > idea what to add. This is 4.3.0 with spring boot. > > Thanks for any suggestions, > Mitch >