Хотя сборка jvm работает нормально (
Код: Выделить всё
mvn spring-boot:runКод: Выделить всё
mvn native:compile -PnativeЭто исключение, которое я получаю при попытке запустить исполняемый файл
Код: Выделить всё
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.camel.component.xslt.springboot.XsltComponentAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'camelContext': Requested bean is currently in creation: I s t h e r e a n u n r e s o l v a b l e c i r c u l a r r e f e r e n c e o r a n a s y n c h r o n o u s i n i t i a l i z a t i o n d e p e n d e n c y ? < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . r e s o l v e A u t o w i r e d A r g u m e n t ( B e a n I n s t a n c e S u p p l i e r . j a v a : 3 4 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . r e s o l v e A r g u m e n t s ( B e a n I n s t a n c e S u p p l i e r . j a v a : 2 6 2 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . g e t ( B e a n I n s t a n c e S u p p l i e r . j a v a : 1 9 8 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . I n s t a n c e S u p p l i e r $ 1 . g e t ( I n s t a n c e S u p p l i e r . j a v a : 8 3 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . o b t a i n I n s t a n c e F r o m S u p p l i e r ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1 0 2 4 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . o b t a i n F r o m S u p p l i e r ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 1 2 4 6 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n I n s t a n c e ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 1 1 8 9 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . d o C r e a t e B e a n ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 5 6 5 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 5 2 5 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . l a m b d a $ d o G e t B e a n $ 0 ( A b s t r a c t B e a n F a c t o r y . j a v a : 3 3 3 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t S i n g l e t o n B e a n R e g i s t r y . g e t S i n g l e t o n ( D e f a u l t S i n g l e t o n B e a n R e g i s t r y . j a v a : 3 7 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 3 3 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 2 0 1 ) < b r / > a t o r g . a p a c h e . c a m e l . c o m p o n e n t . x s l t . s p r i n g b o o t . X s l t C o m p o n e n t A u t o C o n f i g u r a t i o n _ _ B e a n D e f i n i t i o n s . l a m b d a $ g e t C o n f i g u r e X s l t C o m p o n e n t I n s t a n c e S u p p l i e r $ 0 ( X s l t C o m p o n e n t A u t o C o n f i g u r a t i o n _ _ B e a n D e f i n i t i o n s . j a v a : 4 2 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g F u n c t i o n . a p p l y ( T h r o w i n g F u n c t i o n . j a v a : 6 3 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g F u n c t i o n . a p p l y ( T h r o w i n g F u n c t i o n . j a v a : 5 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . l a m b d a $ g e t $ 0 ( B e a n I n s t a n c e S u p p l i e r . j a v a : 1 9 4 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g S u p p l i e r . g e t ( T h r o w i n g S u p p l i e r . j a v a : 5 8 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g S u p p l i e r . g e t ( T h r o w i n g S u p p l i e r . j a v a : 4 6 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . i n v o k e B e a n S u p p l i e r ( B e a n I n s t a n c e S u p p l i e r . j a v a : 2 3 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . g e t ( B e a n I n s t a n c e S u p p l i e r . j a v a : 1 9 4 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . o b t a i n I n s t a n c e F r o m S u p p l i e r ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1 0 2 4 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . o b t a i n F r o m S u p p l i e r ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 1 2 4 6 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n I n s t a n c e ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 1 1 8 9 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . d o C r e a t e B e a n ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 5 6 5 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 5 2 5 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . l a m b d a $ d o G e t B e a n $ 0 ( A b s t r a c t B e a n F a c t o r y . j a v a : 3 3 3 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t S i n g l e t o n B e a n R e g i s t r y . g e t S i n g l e t o n ( D e f a u l t S i n g l e t o n B e a n R e g i s t r y . j a v a : 3 7 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 3 3 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 2 0 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . g e t B e a n s O f T y p e ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 7 4 0 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . g e t B e a n s O f T y p e ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 7 2 8 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . g e t B e a n s O f T y p e ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 1 4 4 9 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . B e a n F a c t o r y U t i l s . b e a n s O f T y p e I n c l u d i n g A n c e s t o r s ( B e a n F a c t o r y U t i l s . j a v a : 3 2 6 ) < b r / > a t o r g . a p a c h e . c a m e l . s p r i n g . s p i . A p p l i c a t i o n C o n t e x t B e a n R e p o s i t o r y . f i n d B y T y p e W i t h N a m e ( A p p l i c a t i o n C o n t e x t B e a n R e p o s i t o r y . j a v a : 8 4 ) < b r / > a t o r g . a p a c h e . c a m e l . s p r i n g . s p i . A p p l i c a t i o n C o n t e x t B e a n R e p o s i t o r y . f i n d B y T y p e ( A p p l i c a t i o n C o n t e x t B e a n R e p o s i t o r y . j a v a : 7 8 ) < b r / > a t o r g . a p a c h e . c a m e l . s u p p o r t . D e f a u l t R e g i s t r y . f i n d B y T y p e ( D e f a u l t R e g i s t r y . j a v a : 4 0 3 ) < b r / > a t o r g . a p a c h e . c a m e l . i m p l . e n g i n e . C u s t o m i z e r s L i f e c y c l e S t r a t e g y . o n C o m p o n e n t A d d ( C u s t o m i z e r s L i f e c y c l e S t r a t e g y . j a v a : 4 9 ) < b r / > a t o r g . a p a c h e . c a m e l . i m p l . e n g i n e . A b s t r a c t C a m e l C o n t e x t . p o s t I n i t C o m p o n e n t ( A b s t r a c t C a m e l C o n t e x t . j a v a : 5 0 4 ) < b r / > a t o r g . a p a c h e . c a m e l . i m p l . e n g i n e . A b s t r a c t C a m e l C o n t e x t . a d d C o m p o n e n t ( A b s t r a c t C a m e l C o n t e x t . j a v a : 4 9 9 ) < b r / > a t o r g . a p a c h e . c a m e l . s p r i n g . S p r i n g C a m e l C o n t e x t . d o B u i l d ( S p r i n g C a m e l C o n t e x t . j a v a : 1 1 3 ) < b r / > a t o r g . a p a c h e . c a m e l . s u p p o r t . s e r v i c e . B a s e S e r v i c e . b u i l d ( B a s e S e r v i c e . j a v a : 6 4 ) < b r / > a t o r g . a p a c h e . c a m e l . s p r i n g . b o o t . C a m e l A u t o C o n f i g u r a t i o n . d o C o n f i g u r e C a m e l C o n t e x t ( C a m e l A u t o C o n f i g u r a t i o n . j a v a : 1 3 5 ) < b r / > a t o r g . a p a c h e . c a m e l . s p r i n g . b o o t . C a m e l A u t o C o n f i g u r a t i o n . c a m e l C o n t e x t ( C a m e l A u t o C o n f i g u r a t i o n . j a v a : 1 1 9 ) < b r / > a t o r g . a p a c h e . c a m e l . s p r i n g . b o o t . C a m e l A u t o C o n f i g u r a t i o n _ _ B e a n D e f i n i t i o n s . l a m b d a $ g e t C a m e l C o n t e x t I n s t a n c e S u p p l i e r $ 0 ( C a m e l A u t o C o n f i g u r a t i o n _ _ B e a n D e f i n i t i o n s . j a v a : 3 9 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g B i F u n c t i o n . a p p l y ( T h r o w i n g B i F u n c t i o n . j a v a : 6 8 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g B i F u n c t i o n . a p p l y ( T h r o w i n g B i F u n c t i o n . j a v a : 5 4 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a o t . B e a n I n s t a n c e S u p p l i e r . l a m b d a $ g e t $ 1 ( B e a n I n s t a n c e S u p p l i e r . j a v a : 2 0 0 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . u t i l . f u n c t i o n . T h r o w i n g S u p p l ier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:231)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:1024)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1246)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1189)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:565)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:740)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:728)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1449)
at org.apache.camel.spring.spi.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:74)
at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:140)
at org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:426)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1809)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1218)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1184)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1121)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:994)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at com.example.move.files.MoveFilesSpringBootApplication.main(MoveFilesSpringBootApplication.java:10)
at java.base@25.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'camelContext': Requested bean is currently in creation: Is there an unresolvable circular reference or an asynchronous initialization dependency?
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:541)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:310)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:229)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1762)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1651)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:912)
at org.springframework.beans.factory.support.RegisteredBean.resolveAutowiredArgument(RegisteredBean.java:251)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveAutowiredArgument(BeanInstanceSupplier.java:338)
... 86 more
Код: Выделить всё
4.0.0
org.springframework.boot
spring-boot-starter-parent
4.0.3
com.example
move-files
0.0.1-SNAPSHOT
move-files
Demo project for Camel in Spring Boot
25
4.18.0
org.apache.camel.springboot
camel-spring-boot-bom
${camel.version}
pom
import
org.apache.camel.springboot
camel-spring-boot-starter
org.apache.camel.springboot
camel-file-starter
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-test
test
org.graalvm.buildtools
native-maven-plugin
org.springframework.boot
spring-boot-maven-plugin
Код: Выделить всё
package com.example.move.files;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MoveFilesSpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(MoveFilesSpringBootApplication.class, args);
}
}
Код: Выделить всё
package com.example.move.files;
import org.apache.camel.builder.RouteBuilder;
import org.springframework.stereotype.Component;
@Component
public class MoveFilesRoute extends RouteBuilder{
@Override
public void configure() throws Exception {
from("file:./src/main/resources/inputFiles/")
.to("file:./src/main/resources/outputFiles/");
}
}
Код: Выделить всё
spring:
application:
name: move-files-spring-boot-application
camel:
main:
run-controller: true
Код: Выделить всё
Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1)
Maven home: C:\Users\fesa\scoop\apps\maven\current
Java version: 25.0.2, vendor: GraalVM Community, runtime: C:\Users\fesa\scoop\apps\graalvm25\current
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
Код: Выделить всё
gcc.exe (Rev11, Built by MSYS2 project) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
То же приложение, перенесенное на Quarkus, отлично компилируется и работает в собственном режиме.
Где я допускаю ошибку?>
Подробнее здесь: https://stackoverflow.com/questions/798 ... -exception
Мобильная версия