Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring boot native image support Java 17 #401

Open
mmarimuthu opened this issue May 20, 2024 · 0 comments
Open

Spring boot native image support Java 17 #401

mmarimuthu opened this issue May 20, 2024 · 0 comments

Comments

@mmarimuthu
Copy link

mmarimuthu commented May 20, 2024

Is there any fix for Orika Mapper facade with spring boot native image.

SpringBoot Version: 3.2.5
Java : 17
Orika Version: 3.2.0

Usage

    @Autowired
    private MapperFacade mapperFacade

Spring Boot Logs:

2024-05-20 18:02:26,430||INFO|main|org.apache.catalina.core.StandardService - Starting service [Tomcat]
2024-05-20 18:02:26,430||INFO|main|org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.20]
2024-05-20 18:02:26,485||INFO|main|o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2024-05-20 18:02:28,746||INFO|main|org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2024-05-20 18:02:28,840||INFO|main|o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path ''
2024-05-20 18:02:29,012||INFO|main|c.g.org.JobApplication - Started JobApplication in 4.401 seconds (process running for 6.288)
2024-05-20 18:02:41,631||INFO|http-nio-8080-exec-1|o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-05-20 18:02:41,722||ERROR|http-nio-8080-exec-1|o.a.c.c.C.[.[.[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentEventFunction': Unsatisfied dependency expressed through field 'documentEventService': Error creating bean with name 'documentEventService': Instantiation of supplied bean failed] with root cause
java.lang.NoSuchMethodException: ma.glasnost.orika.converter.DefaultConverterFactory.<init>()
        at [email protected]/java.lang.Class.checkMethod(DynamicHub.java:1038)
        at [email protected]/java.lang.Class.getConstructor0(DynamicHub.java:1204)
        at [email protected]/java.lang.Class.newInstance(DynamicHub.java:626)
        at ma.glasnost.orika.impl.UtilityResolver.resolveUtility(UtilityResolver.java:131)
        at ma.glasnost.orika.impl.UtilityResolver.getDefaultConverterFactory(UtilityResolver.java:61)
        at ma.glasnost.orika.impl.DefaultMapperFactory$MapperFactoryBuilder.<init>(DefaultMapperFactory.java:281)
        at ma.glasnost.orika.impl.DefaultMapperFactory$Builder.<init>(DefaultMapperFactory.java:562)
        at com.gac.creds.service.DocumentEventService.<init>(DocumentEventService.java:70)
        at org.springframework.beans.factory.support.InstanceSupplier.lambda$using$0(InstanceSupplier.java:105)
        at org.springframework.beans.factory.support.InstanceSupplier$1.get(InstanceSupplier.java:83)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:949)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1217)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
        at org.springframework.beans.factory.aot.AutowiredFieldValueResolver.resolveValue(AutowiredFieldValueResolver.java:188)
        at org.springframework.beans.factory.aot.AutowiredFieldValueResolver.resolveAndSet(AutowiredFieldValueResolver.java:167)
        at com.gac.creds.function.DocumentEventFunction__Autowiring.apply(DocumentEventFunction__Autowiring.java:19)
        at org.springframework.beans.factory.support.InstanceSupplier$1.get(InstanceSupplier.java:83)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:949)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1217)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234)
        at org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry.lookup(BeanFactoryAwareFunctionRegistry.java:124)
        at org.springframework.cloud.function.context.FunctionCatalog.lookup(FunctionCatalog.java:39)
        at org.springframework.cloud.function.web.util.FunctionWebRequestProcessingHelper.doFindFunction(FunctionWebRequestProcessingHelper.java:205)
        at org.springframework.cloud.function.web.util.FunctionWebRequestProcessingHelper.findFunction(FunctionWebRequestProcessingHelper.java:62)
        at org.springframework.cloud.function.web.mvc.FunctionHandlerMapping.getHandlerInternal(FunctionHandlerMapping.java:100)
        at org.springframework.cloud.function.web.mvc.FunctionHandlerMapping.getHandlerInternal(FunctionHandlerMapping.java:44)
        at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:507)
        at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1283)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1065)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
        at [email protected]/java.lang.Thread.run(Thread.java:833)
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:807)
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:210)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant